You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2019/01/12 18:46:27 UTC

[maven-dependency-plugin] branch MDEP-586 created (now d9c1009)

This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a change to branch MDEP-586
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git.


      at d9c1009  Fix ResourceArtifact-1.0.jar mock. Remove unused files.

This branch includes the following new commits:

     new e213ac1  Unpacking different resources into different location from the same artifact do work.
     new 36b1d3f  Setup ResourceArtifact-1.0.jar as a mock JAR to be dealt with mrm-maven-plugin.
     new c2f9613  Upgrade mrm-maven-plugin to version 1.2.0. Add src/main/resources to ResourceArtifact-1.0.jar folder.
     new d9c1009  Fix ResourceArtifact-1.0.jar mock. Remove unused files.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-dependency-plugin] 01/04: Unpacking different resources into different location from the same artifact do work.

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MDEP-586
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit e213ac14bf116b5646eea84a6add379621551d35
Author: Andre Tadeu de Carvalho <an...@gmail.com>
AuthorDate: Wed Jan 9 02:47:29 2019 -0200

    Unpacking different resources into different location from the same artifact do work.
---
 .../ResourceArtifact/1.0/ResourceArtifact-1.0.jar  | Bin 0 -> 604 bytes
 .../projects/mdep-586-unpacking-resources/pom.xml  |  85 +++++++++++++++++++++
 .../mdep-586-unpacking-resources/verify.groovy     |  45 +++++++++++
 3 files changed, 130 insertions(+)

diff --git a/src/it/projects/mdep-586-unpacking-resources/lib/test/ResourceArtifact/1.0/ResourceArtifact-1.0.jar b/src/it/projects/mdep-586-unpacking-resources/lib/test/ResourceArtifact/1.0/ResourceArtifact-1.0.jar
new file mode 100644
index 0000000..7c41edc
Binary files /dev/null and b/src/it/projects/mdep-586-unpacking-resources/lib/test/ResourceArtifact/1.0/ResourceArtifact-1.0.jar differ
diff --git a/src/it/projects/mdep-586-unpacking-resources/pom.xml b/src/it/projects/mdep-586-unpacking-resources/pom.xml
new file mode 100644
index 0000000..8733381
--- /dev/null
+++ b/src/it/projects/mdep-586-unpacking-resources/pom.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.maven.plugins.dependency.its</groupId>
+    <artifactId>mdep-586-unpacking-resource</artifactId>
+    <version>1.0-SNAPSHOT</version>
+    <packaging>pom</packaging>
+
+    <description>Unpacking different files in the same JAR in different locations</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>test</groupId>
+            <artifactId>ResourceArtifact</artifactId>
+            <version>1.0</version>
+        </dependency>
+    </dependencies>
+
+    <repositories>
+        <repository>
+            <id>lib</id>
+            <url>file:${project.basedir}/lib</url>
+        </repository>
+    </repositories>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-dependency-plugin</artifactId>
+                <version>@project.version@</version>
+                <executions>
+                    <execution>
+                        <id>unpack-resource1</id>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>ResourceArtifact</includeArtifactIds>
+                            <includes>resource1.txt</includes>
+                            <outputDirectory>resources1</outputDirectory>
+                            <markersDirectory>
+                                ${project.build.directory}/resource1/dependency-maven-plugin-markers
+                            </markersDirectory>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>unpack-resource2</id>
+                        <goals>
+                            <goal>unpack-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeArtifactIds>ResourceArtifact</includeArtifactIds>
+                            <includes>resource2.txt</includes>
+                            <outputDirectory>resources2</outputDirectory>
+                            <markersDirectory>
+                                ${project.build.directory}/resource2/dependency-maven-plugin-markers
+                            </markersDirectory>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>
\ No newline at end of file
diff --git a/src/it/projects/mdep-586-unpacking-resources/verify.groovy b/src/it/projects/mdep-586-unpacking-resources/verify.groovy
new file mode 100644
index 0000000..ad9e168
--- /dev/null
+++ b/src/it/projects/mdep-586-unpacking-resources/verify.groovy
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File file = new File( basedir, "build.log" );
+assert file.exists();
+
+try
+{
+    File file1 = new File( basedir, "resources1/resource1.txt" )
+    if ( !file1.exists() || !file1.isFile() )
+    {
+        println( "Error: cannot open file resources1/resource1.txt" )
+        return false
+    }
+    File file2 = new File( basedir, "resources2/resource2.txt" )
+    if ( !file2.exists() || !file2.isFile() )
+    {
+        println( "Error: cannot open file resources2/resource2.txt" )
+        return false
+    }
+}
+catch ( Throwable e )
+{
+    e.printStackTrace()
+    return false;
+}
+
+
+return true
\ No newline at end of file


[maven-dependency-plugin] 02/04: Setup ResourceArtifact-1.0.jar as a mock JAR to be dealt with mrm-maven-plugin.

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MDEP-586
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit 36b1d3f39c780d626745fc38130a64a0406c8746
Author: Andre Tadeu de Carvalho <an...@gmail.com>
AuthorDate: Fri Jan 11 15:31:06 2019 -0200

    Setup ResourceArtifact-1.0.jar as a mock JAR to be dealt with mrm-maven-plugin.
---
 .../ResourceArtifact-1.0.pom                       |  30 +++++++++++++++++++++
 .../ResourceArtifact-1.0.jar/resource1.txt}        |  27 +------------------
 .../ResourceArtifact-1.0.jar/resource2.txt}        |  27 +------------------
 .../ResourceArtifact/1.0/ResourceArtifact-1.0.jar  | Bin 604 -> 0 bytes
 .../projects/mdep-586-unpacking-resources/pom.xml  |   9 +------
 .../mdep-586-unpacking-resources/verify.groovy     |  26 ++++--------------
 6 files changed, 38 insertions(+), 81 deletions(-)

diff --git a/src/it/mrm/repository/ResourceArtifact-1.0.jar/ResourceArtifact-1.0.pom b/src/it/mrm/repository/ResourceArtifact-1.0.jar/ResourceArtifact-1.0.pom
new file mode 100644
index 0000000..322146d
--- /dev/null
+++ b/src/it/mrm/repository/ResourceArtifact-1.0.jar/ResourceArtifact-1.0.pom
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <groupId>org.apache.maven.its.dependency</groupId>
+    <artifactId>ResourceArtifact</artifactId>
+    <version>1.0</version>
+    <packaging>jar</packaging>
+
+</project>
\ No newline at end of file
diff --git a/src/it/projects/mdep-586-unpacking-resources/verify.groovy b/src/it/mrm/repository/ResourceArtifact-1.0.jar/resource1.txt
similarity index 57%
copy from src/it/projects/mdep-586-unpacking-resources/verify.groovy
copy to src/it/mrm/repository/ResourceArtifact-1.0.jar/resource1.txt
index ad9e168..53e657c 100644
--- a/src/it/projects/mdep-586-unpacking-resources/verify.groovy
+++ b/src/it/mrm/repository/ResourceArtifact-1.0.jar/resource1.txt
@@ -17,29 +17,4 @@
  * under the License.
  */
 
-File file = new File( basedir, "build.log" );
-assert file.exists();
-
-try
-{
-    File file1 = new File( basedir, "resources1/resource1.txt" )
-    if ( !file1.exists() || !file1.isFile() )
-    {
-        println( "Error: cannot open file resources1/resource1.txt" )
-        return false
-    }
-    File file2 = new File( basedir, "resources2/resource2.txt" )
-    if ( !file2.exists() || !file2.isFile() )
-    {
-        println( "Error: cannot open file resources2/resource2.txt" )
-        return false
-    }
-}
-catch ( Throwable e )
-{
-    e.printStackTrace()
-    return false;
-}
-
-
-return true
\ No newline at end of file
+Resource 1
diff --git a/src/it/projects/mdep-586-unpacking-resources/verify.groovy b/src/it/mrm/repository/ResourceArtifact-1.0.jar/resource2.txt
similarity index 57%
copy from src/it/projects/mdep-586-unpacking-resources/verify.groovy
copy to src/it/mrm/repository/ResourceArtifact-1.0.jar/resource2.txt
index ad9e168..132d211 100644
--- a/src/it/projects/mdep-586-unpacking-resources/verify.groovy
+++ b/src/it/mrm/repository/ResourceArtifact-1.0.jar/resource2.txt
@@ -17,29 +17,4 @@
  * under the License.
  */
 
-File file = new File( basedir, "build.log" );
-assert file.exists();
-
-try
-{
-    File file1 = new File( basedir, "resources1/resource1.txt" )
-    if ( !file1.exists() || !file1.isFile() )
-    {
-        println( "Error: cannot open file resources1/resource1.txt" )
-        return false
-    }
-    File file2 = new File( basedir, "resources2/resource2.txt" )
-    if ( !file2.exists() || !file2.isFile() )
-    {
-        println( "Error: cannot open file resources2/resource2.txt" )
-        return false
-    }
-}
-catch ( Throwable e )
-{
-    e.printStackTrace()
-    return false;
-}
-
-
-return true
\ No newline at end of file
+Resource 2
diff --git a/src/it/projects/mdep-586-unpacking-resources/lib/test/ResourceArtifact/1.0/ResourceArtifact-1.0.jar b/src/it/projects/mdep-586-unpacking-resources/lib/test/ResourceArtifact/1.0/ResourceArtifact-1.0.jar
deleted file mode 100644
index 7c41edc..0000000
Binary files a/src/it/projects/mdep-586-unpacking-resources/lib/test/ResourceArtifact/1.0/ResourceArtifact-1.0.jar and /dev/null differ
diff --git a/src/it/projects/mdep-586-unpacking-resources/pom.xml b/src/it/projects/mdep-586-unpacking-resources/pom.xml
index 8733381..2cf1e58 100644
--- a/src/it/projects/mdep-586-unpacking-resources/pom.xml
+++ b/src/it/projects/mdep-586-unpacking-resources/pom.xml
@@ -30,19 +30,12 @@ under the License.
 
     <dependencies>
         <dependency>
-            <groupId>test</groupId>
+            <groupId>org.apache.maven.its.dependency</groupId>
             <artifactId>ResourceArtifact</artifactId>
             <version>1.0</version>
         </dependency>
     </dependencies>
 
-    <repositories>
-        <repository>
-            <id>lib</id>
-            <url>file:${project.basedir}/lib</url>
-        </repository>
-    </repositories>
-
     <build>
         <plugins>
             <plugin>
diff --git a/src/it/projects/mdep-586-unpacking-resources/verify.groovy b/src/it/projects/mdep-586-unpacking-resources/verify.groovy
index ad9e168..b771bf3 100644
--- a/src/it/projects/mdep-586-unpacking-resources/verify.groovy
+++ b/src/it/projects/mdep-586-unpacking-resources/verify.groovy
@@ -18,28 +18,12 @@
  */
 
 File file = new File( basedir, "build.log" );
-assert file.exists();
+assert file.isFile();
 
-try
-{
-    File file1 = new File( basedir, "resources1/resource1.txt" )
-    if ( !file1.exists() || !file1.isFile() )
-    {
-        println( "Error: cannot open file resources1/resource1.txt" )
-        return false
-    }
-    File file2 = new File( basedir, "resources2/resource2.txt" )
-    if ( !file2.exists() || !file2.isFile() )
-    {
-        println( "Error: cannot open file resources2/resource2.txt" )
-        return false
-    }
-}
-catch ( Throwable e )
-{
-    e.printStackTrace()
-    return false;
-}
+File file1 = new File( basedir, "resources1/resource1.txt" )
+assert file1.isFile()
 
+File file2 = new File( basedir, "resources2/resource2.txt" )
+assert file2.isFile()
 
 return true
\ No newline at end of file


[maven-dependency-plugin] 04/04: Fix ResourceArtifact-1.0.jar mock. Remove unused files.

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MDEP-586
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit d9c10097c7b6f29858acf7c0f9f5fe7b3c817bd1
Author: Andre Tadeu de Carvalho <an...@gmail.com>
AuthorDate: Fri Jan 11 17:37:50 2019 -0200

    Fix ResourceArtifact-1.0.jar mock. Remove unused files.
---
 .../src/main/resources/resource1.txt                 | 20 --------------------
 .../src/main/resources/resource2.txt                 | 20 --------------------
 .../ResourceArtifact-1.0.pom                         |  0
 3 files changed, 40 deletions(-)

diff --git a/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource1.txt b/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource1.txt
deleted file mode 100644
index 53e657c..0000000
--- a/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource1.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-Resource 1
diff --git a/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource2.txt b/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource2.txt
deleted file mode 100644
index 132d211..0000000
--- a/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource2.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-Resource 2
diff --git a/src/it/mrm/repository/ResourceArtifact-1.0.jar/ResourceArtifact-1.0.pom b/src/it/mrm/repository/ResourceArtifact-1.0.pom
similarity index 100%
rename from src/it/mrm/repository/ResourceArtifact-1.0.jar/ResourceArtifact-1.0.pom
rename to src/it/mrm/repository/ResourceArtifact-1.0.pom


[maven-dependency-plugin] 03/04: Upgrade mrm-maven-plugin to version 1.2.0. Add src/main/resources to ResourceArtifact-1.0.jar folder.

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MDEP-586
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit c2f9613d12cae0662267cfd655647b1d77ab88f0
Author: Andre Tadeu de Carvalho <an...@gmail.com>
AuthorDate: Fri Jan 11 15:49:28 2019 -0200

    Upgrade mrm-maven-plugin to version 1.2.0. Add src/main/resources to ResourceArtifact-1.0.jar folder.
---
 pom.xml                                              |  2 +-
 .../src/main/resources/resource1.txt                 | 20 ++++++++++++++++++++
 .../src/main/resources/resource2.txt                 | 20 ++++++++++++++++++++
 3 files changed, 41 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 5496cb4..895e884 100644
--- a/pom.xml
+++ b/pom.xml
@@ -400,7 +400,7 @@ under the License.
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>mrm-maven-plugin</artifactId>
-            <version>1.0.0</version>
+            <version>1.2.0</version>
             <executions>
               <execution>
                 <goals>
diff --git a/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource1.txt b/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource1.txt
new file mode 100644
index 0000000..53e657c
--- /dev/null
+++ b/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource1.txt
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+Resource 1
diff --git a/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource2.txt b/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource2.txt
new file mode 100644
index 0000000..132d211
--- /dev/null
+++ b/src/it/mrm/repository/ResourceArtifact-1.0.jar/src/main/resources/resource2.txt
@@ -0,0 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+Resource 2