[Git][java-team/maven-jar-plugin][upstream] New upstream version 3.1.0

Emmanuel Bourg gitlab at salsa.debian.org
Mon Jul 30 08:50:27 BST 2018


Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / maven-jar-plugin


Commits:
a22f950f by Emmanuel Bourg at 2018-07-30T07:45:07Z
New upstream version 3.1.0
- - - - -


11 changed files:

- + .gitignore
- + Jenkinsfile
- pom.xml
- src/main/filtered-resources/META-INF/plexus/components.xml
- src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
- src/main/java/org/apache/maven/plugins/jar/JarMojo.java
- src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
- src/site/apt/examples/create-test-jar.apt.vm
- src/site/apt/index.apt.vm
- src/site/site.xml
- src/test/java/org/apache/maven/plugins/jar/JarMojoTest.java


Changes:

=====================================
.gitignore
=====================================
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+target/
+.project
+.classpath
+.settings/
+.svn/
+bin/
+# Intellij
+*.ipr
+*.iml
+.idea
+out/
+.DS_Store
+/bootstrap
+/dependencies.xml
+.java-version


=====================================
Jenkinsfile
=====================================
--- /dev/null
+++ b/Jenkinsfile
@@ -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.
+ */
+
+asfMavenTlpStdBuild()


=====================================
pom.xml
=====================================
--- a/pom.xml
+++ b/pom.xml
@@ -1,22 +1,22 @@
 <?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
+  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.
+  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">
@@ -25,12 +25,12 @@ under the License.
   <parent>
     <artifactId>maven-plugins</artifactId>
     <groupId>org.apache.maven.plugins</groupId>
-    <version>30</version>
+    <version>31</version>
     <relativePath>../../pom/maven/maven-plugins/pom.xml</relativePath>
   </parent>
 
   <artifactId>maven-jar-plugin</artifactId>
-  <version>3.0.2</version>
+  <version>3.1.0</version>
   <packaging>maven-plugin</packaging>
 
   <name>Apache Maven JAR Plugin</name>
@@ -54,14 +54,19 @@ under the License.
   </prerequisites>
 
   <scm>
-    <connection>scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-jar-plugin-3.0.2</connection>
-    <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-jar-plugin-3.0.2</developerConnection>
-    <url>http://svn.apache.org/viewvc/maven/plugins/tags/maven-jar-plugin-3.0.2</url>
+    <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-jar-plugin.git</connection>
+    <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-jar-plugin.git</developerConnection>
+    <url>https://github.com/apache/maven-jar-plugin/tree/${project.scm.tag}</url>
+    <tag>maven-jar-plugin-3.1.0</tag>
   </scm>
   <issueManagement>
     <system>JIRA</system>
     <url>https://issues.apache.org/jira/browse/MJAR</url>
   </issueManagement>
+  <ciManagement>
+    <system>Jenkins</system>
+    <url>https://builds.apache.org/job/maven-box/job/maven-jar-plugin/</url>
+  </ciManagement>
   <distributionManagement>
     <site>
       <id>apache.website</id>
@@ -70,8 +75,10 @@ under the License.
   </distributionManagement>
 
   <properties>
-    <mavenArchiverVersion>3.1.1</mavenArchiverVersion>
+    <mavenArchiverVersion>3.2.0</mavenArchiverVersion>
     <mavenVersion>3.0</mavenVersion>
+    <javaVersion>7</javaVersion>
+    <surefire.version>2.21.0</surefire.version>
   </properties>
 
   <dependencies>
@@ -101,15 +108,20 @@ under the License.
       <artifactId>maven-plugin-annotations</artifactId>
       <scope>provided</scope>
     </dependency>
+    <!--
+      ! other dependencies contain references to older versions
+      ! so we define it here explicit to make sure we get the
+      ! correct version for plexus-archiver and plexus-utils.
+    -->
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-archiver</artifactId>
-      <version>3.4</version>
+      <version>3.5</version>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>3.0.24</version>
+      <version>3.1.0</version>
     </dependency>
     <dependency>
       <groupId>junit</groupId>


=====================================
src/main/filtered-resources/META-INF/plexus/components.xml
=====================================
--- a/src/main/filtered-resources/META-INF/plexus/components.xml
+++ b/src/main/filtered-resources/META-INF/plexus/components.xml
@@ -67,13 +67,13 @@
             <!-- START SNIPPET: jar-lifecycle -->
             <phases>
               <process-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.7:resources
+                org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources
               </process-resources>
               <compile>
                 org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
               </compile>
               <process-test-resources>
-                org.apache.maven.plugins:maven-resources-plugin:2.7:testResources
+                org.apache.maven.plugins:maven-resources-plugin:3.0.2:testResources
               </process-test-resources>
               <test-compile>
                 org.apache.maven.plugins:maven-compiler-plugin:3.5.1:testCompile


=====================================
src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
=====================================
--- a/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
@@ -37,7 +37,7 @@ import java.io.File;
  * Base class for creating a jar from project classes.
  *
  * @author <a href="evenisse at apache.org">Emmanuel Venisse</a>
- * @version $Id: AbstractJarMojo.java 1740869 2016-04-25 18:08:04Z khmarbaise $
+ * @version $Id$
  */
 public abstract class AbstractJarMojo
     extends AbstractMojo


=====================================
src/main/java/org/apache/maven/plugins/jar/JarMojo.java
=====================================
--- a/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jar/JarMojo.java
@@ -30,7 +30,7 @@ import java.io.File;
  * Build a JAR from the current project.
  *
  * @author <a href="evenisse at apache.org">Emmanuel Venisse</a>
- * @version $Id: JarMojo.java 1740869 2016-04-25 18:08:04Z khmarbaise $
+ * @version $Id$
  */
 @Mojo( name = "jar", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, threadSafe = true,
        requiresDependencyResolution = ResolutionScope.RUNTIME )


=====================================
src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
=====================================
--- a/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/jar/TestJarMojo.java
@@ -30,7 +30,7 @@ import org.apache.maven.plugins.annotations.ResolutionScope;
  * Build a JAR of the test classes for the current project.
  *
  * @author <a href="evenisse at apache.org">Emmanuel Venisse</a>
- * @version $Id: TestJarMojo.java 1740869 2016-04-25 18:08:04Z khmarbaise $
+ * @version $Id$
  */
 // CHECKSTYLE_OFF: LineLength
 @Mojo( name = "test-jar", defaultPhase = LifecyclePhase.PACKAGE, requiresProject = true, threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST )


=====================================
src/site/apt/examples/create-test-jar.apt.vm
=====================================
--- a/src/site/apt/examples/create-test-jar.apt.vm
+++ b/src/site/apt/examples/create-test-jar.apt.vm
@@ -28,15 +28,15 @@
 
 How to create a jar containing test classes
 
-  When you want to create a jar containing test-classes, you would probably want to reuse those classes.
+  When you want to create a jar containing <test-classes>, you would probably want to reuse those classes.
   There are two ways to solve this:
   
-  * Create an attached jar with the test-classes from the current project and loose its transitive <<<test>>>-scoped dependencies.
+  * Create an attached jar with the <test-classes> from the current project and loose its transitive <<<test>>>-scoped dependencies.
   
-  * Create a separate project with the test-classes.
+  * Create a separate project with the <test-classes>.
   
   []
-  
+
 * The easy way 
   
   You can produce a jar which will include your test classes and resources.
@@ -75,6 +75,7 @@ How to create a jar containing test classes
     <dependency>
       <groupId>groupId</groupId>
       <artifactId>artifactId</artifactId>
+      <classifier>tests</classifier>
       <type>test-jar</type>
       <version>version</version>
       <scope>test</scope>
@@ -84,9 +85,18 @@ How to create a jar containing test classes
 </project>
 +-----------------+
 
+  Based on such configuration there will be two jar files generated. The first one contains the 
+  classes from <<<src/main/java>>> whereas the second one will contain the classes from <<<src/test/java>>>.
+  The generated jar files follow the naming schema <<<artifactId-version.jar>>> for the first one and
+  <<<artifactId-version-classifier.jar>>> for the second one. The parts <<<artifactId>>>, <<<versions>>>
+  will be replaced by the values given within your project <<<pom.xml>>> file. The <<<classifier>>>
+  will be set to <<<tests>>> which is a default of the maven-jar-plugin which can be changed if you need by
+  using the configuration in the jar goal
+  {{{../test-jar-mojo.html}using the configuration in the jar goal}}.
+
   <<Note:>> The downside of this solution is that you don't get the transitive <<<test>>>-scoped dependencies automatically. 
   Maven only resolves the <<<compile>>>-time dependencies, so you'll have to add all the other required <<<test>>>-scoped dependencies by hand.
-
+  
 * The preferred way
 
   In order to let Maven resolve all <<<test>>>-scoped transitive dependencies you should create a separate project.
@@ -100,14 +110,17 @@ How to create a jar containing test classes
 </project>
 +-----------------+
 
-   * Move the sources files from <<<src/test/java>>> you want to share from the original project to the <<<src/main/java>>> of this project.
+   * Move the sources files from <<<src/test/java>>> you want to share from 
+     the original project to the <<<src/main/java>>> of this project.
      The same type of movement counts for the resources as well of course.
    
-   * Move the required <<<test>>>-scoped dependencies and from the original project to this project and remove the scope (i.e. changing it to the <<<compile>>>-scope).
-     And yes, that means that the junit dependency (or any other testing framework dependency) gets the default scope too.
-     You'll probably need to add some project specific dependencies as well to let it all compile again.
+   * Move the required <<<test>>>-scoped dependencies and from the original 
+     project to this project and remove the scope (i.e. changing it to the <<<compile>>>-scope).
+     And yes, that means that the junit dependency (or any other testing 
+     framework dependency) gets the default scope too. You'll probably need 
+     to add some project specific dependencies as well to let it all compile again.
   
-  Now you have your reusable test-classes and you can refer to it as you're used to:
+  Now you have your reusable <test-classes> and you can refer to it as you're used to:
    
 +-----------------+
 <project>


=====================================
src/site/apt/index.apt.vm
=====================================
--- a/src/site/apt/index.apt.vm
+++ b/src/site/apt/index.apt.vm
@@ -75,9 +75,7 @@ ${project.name}
 * Usage
 
   General instructions on how to use the JAR Plugin can be found on the {{{./usage.html}usage page}}. Some more
-  specific use cases are described in the examples given below. Last but not least, users occasionally contribute
-  additional examples, tips or errata to the
-  {{{http://docs.codehaus.org/display/MAVENUSER/JAR+Plugin}plugin's wiki page}}.
+  specific use cases are described in the examples given below. 
 
   In case you still have questions regarding the plugin's usage, please have a look at the {{{./faq.html}FAQ}} and feel
   free to contact the {{{./mail-lists.html}user mailing list}}. The posts to the mailing list are archived and could


=====================================
src/site/site.xml
=====================================
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -33,9 +33,9 @@ under the License.
       <item name="Download" href="download.html"/>
     </menu>
     <menu name="Examples">
-      <item name="Creating an Executable JAR File" href="/shared/maven-archiver/examples/classpath.html"/>
+      <item name="Creating an Executable JAR File" href="../../shared/maven-archiver/examples/classpath.html"/>
       <item name="Manifest Customization" href="examples/manifest-customization.html"/>
-      <item name="Using Your Own Manifest File" href="/shared/maven-archiver/examples/manifestFile.html"/>
+      <item name="Using Your Own Manifest File" href="../../shared/maven-archiver/examples/manifestFile.html"/>
       <item name="Additional attached JAR" href="examples/attached-jar.html"/>
       <item name="Create Test JAR" href="examples/create-test-jar.html"/>
       <item name="Include/Exclude content" href="examples/include-exclude.html"/>


=====================================
src/test/java/org/apache/maven/plugins/jar/JarMojoTest.java
=====================================
--- a/src/test/java/org/apache/maven/plugins/jar/JarMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/jar/JarMojoTest.java
@@ -27,7 +27,7 @@ import org.apache.maven.plugins.jar.JarMojo;
 /**
  * Test for {@link JarMojo}
  *
- * @version $Id: JarMojoTest.java 1720830 2015-12-18 17:40:21Z khmarbaise $
+ * @version $Id$
  */
 public class JarMojoTest
     extends AbstractMojoTestCase
@@ -46,7 +46,7 @@ public class JarMojoTest
     /**
      * tests the proper discovery and configuration of the mojo
      *
-     * @throws Exception
+     * @throws Exception in case of an error.
      */
     public void testJarTestEnvironment()
         throws Exception



View it on GitLab: https://salsa.debian.org/java-team/maven-jar-plugin/commit/a22f950f20ca4cbc1933ee055ed8ce5baa123da6

-- 
View it on GitLab: https://salsa.debian.org/java-team/maven-jar-plugin/commit/a22f950f20ca4cbc1933ee055ed8ce5baa123da6
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20180730/8cbbd183/attachment.html>


More information about the pkg-java-commits mailing list