You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by kh...@apache.org on 2016/04/04 20:40:23 UTC

svn commit: r1737724 - in /maven/plugins/trunk/maven-jar-plugin/src: it/mjar-71-01/ main/java/org/apache/maven/plugins/jar/ site/ site/apt/ site/apt/examples/

Author: khmarbaise
Date: Mon Apr  4 18:40:23 2016
New Revision: 1737724

URL: http://svn.apache.org/viewvc?rev=1737724&view=rev
Log:
[MJAR-210] Remove useDefaultManifestFile parameter
 o Removed the parameter useDefaultManifestFile, 
   defaultManifestFile and removed the docs about that.
   Everything can be handled by MavenArchiveConfiguration.

Removed:
    maven/plugins/trunk/maven-jar-plugin/src/site/apt/examples/default-manifest-file.apt.vm
Modified:
    maven/plugins/trunk/maven-jar-plugin/src/it/mjar-71-01/pom.xml
    maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
    maven/plugins/trunk/maven-jar-plugin/src/site/apt/examples/manifest-customization.apt.vm
    maven/plugins/trunk/maven-jar-plugin/src/site/apt/index.apt.vm
    maven/plugins/trunk/maven-jar-plugin/src/site/site.xml

Modified: maven/plugins/trunk/maven-jar-plugin/src/it/mjar-71-01/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/it/mjar-71-01/pom.xml?rev=1737724&r1=1737723&r2=1737724&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/it/mjar-71-01/pom.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/it/mjar-71-01/pom.xml Mon Apr  4 18:40:23 2016
@@ -36,7 +36,9 @@ under the License.
         <artifactId>maven-jar-plugin</artifactId>
         <version>@pom.version@</version>
         <configuration>
-          <useDefaultManifestFile>true</useDefaultManifestFile>
+          <archive>
+            <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
+          </archive>
         </configuration>
       </plugin>
     </plugins>

Modified: maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java?rev=1737724&r1=1737723&r2=1737724&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/main/java/org/apache/maven/plugins/jar/AbstractJarMojo.java Mon Apr  4 18:40:23 2016
@@ -101,27 +101,6 @@ public abstract class AbstractJarMojo
     private MavenArchiveConfiguration archive = new MavenArchiveConfiguration();
 
     /**
-     * Path to the default MANIFEST file to use. It will be used if <code>useDefaultManifestFile</code> is set to
-     * <code>true</code>.
-     *
-     * @since 2.2
-     */
-    // CHECKSTYLE_OFF: LineLength
-    @Parameter( defaultValue = "${project.build.outputDirectory}/META-INF/MANIFEST.MF", required = true, readonly = true )
-    // CHECKSTYLE_ON: LineLength
-    private File defaultManifestFile;
-
-    /**
-     * Set this to <code>true</code> to enable the use of the <code>defaultManifestFile</code>.<br/>
-     * Starting with <b>3.0.0</b> the property has been renamed from <code>jar.useDefaultManifestFile</code> to
-     * <code>maven.jar.useDefaultManifestFile</code>.
-     *
-     * @since 2.2
-     */
-    @Parameter( property = "maven.jar.useDefaultManifestFile", defaultValue = "false" )
-    private boolean useDefaultManifestFile;
-
-    /**
      *
      */
     @Component
@@ -202,14 +181,6 @@ public abstract class AbstractJarMojo
     }
 
     /**
-     * Default Manifest location. Can point to a non existing file. Cannot return null.
-     */
-    protected File getDefaultManifestFile()
-    {
-        return defaultManifestFile;
-    }
-
-    /**
      * Generates the JAR.
      *
      */
@@ -238,14 +209,6 @@ public abstract class AbstractJarMojo
                 archiver.getArchiver().addDirectory( contentDirectory, getIncludes(), getExcludes() );
             }
 
-            File existingManifest = getDefaultManifestFile();
-
-            if ( useDefaultManifestFile && existingManifest.exists() && archive.getManifestFile() == null )
-            {
-                getLog().info( "Adding existing MANIFEST to archive. Found under: " + existingManifest.getPath() );
-                archive.setManifestFile( existingManifest );
-            }
-
             archiver.createArchive( session, project, archive );
 
             return jarFile;

Modified: maven/plugins/trunk/maven-jar-plugin/src/site/apt/examples/manifest-customization.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/site/apt/examples/manifest-customization.apt.vm?rev=1737724&r1=1737723&r2=1737724&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/site/apt/examples/manifest-customization.apt.vm (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/site/apt/examples/manifest-customization.apt.vm Mon Apr  4 18:40:23 2016
@@ -33,7 +33,7 @@ Manifest customization
   The default contents of the manifest is described in the documentation for
   {{{http://maven.apache.org/shared/maven-archiver/examples/manifest.html}Maven Archiver}}.
 
-  Starting with version 2.1, the maven-jar-plugin uses Maven Archiver 2.1. This
+  Starting with version 2.1, the maven-jar-plugin uses Maven Archiver ${mavenArchiverVersion}. This
   means that it no longer creates the Specification and Implementation details
   in the manifest by default. If you want them you have to say so explicitly in
   your plugin configuration. This is also is described in the documentation for

Modified: maven/plugins/trunk/maven-jar-plugin/src/site/apt/index.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/site/apt/index.apt.vm?rev=1737724&r1=1737723&r2=1737724&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/site/apt/index.apt.vm (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/site/apt/index.apt.vm Mon Apr  4 18:40:23 2016
@@ -76,8 +76,6 @@ ${project.name}
 
   * {{{./examples/manifest-customization.html}Manifest Customization}}
 
-  * {{{./examples/default-manifest-file.html}Using a Default Manifest File}}
-
   * {{{./examples/include-exclude.html}Howto include/exclude Content from a jar archive}}
 
   * {{{./examples/attached-jar.html}How to create an additional attached jar artifact from the project}}

Modified: maven/plugins/trunk/maven-jar-plugin/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-jar-plugin/src/site/site.xml?rev=1737724&r1=1737723&r2=1737724&view=diff
==============================================================================
--- maven/plugins/trunk/maven-jar-plugin/src/site/site.xml (original)
+++ maven/plugins/trunk/maven-jar-plugin/src/site/site.xml Mon Apr  4 18:40:23 2016
@@ -35,7 +35,6 @@ under the License.
     <menu name="Examples">
       <item name="Creating an Executable JAR File" href="http://maven.apache.org/shared/maven-archiver/examples/classpath.html"/>
       <item name="Manifest Customization" href="examples/manifest-customization.html"/>
-      <item name="Using a Default Manifest File" href="examples/default-manifest-file.html"/>
       <item name="Using Your Own Manifest File" href="http://maven.apache.org/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"/>