You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by de...@apache.org on 2010/08/19 20:24:19 UTC

svn commit: r987259 - /maven/site/trunk/src/site/apt/guides/mini/guide-manifest.apt

Author: dennisl
Date: Thu Aug 19 18:24:19 2010
New Revision: 987259

URL: http://svn.apache.org/viewvc?rev=987259&view=rev
Log:
[MNGSITE-118] Improve guide-manifest.html

o I removed all the old and confusing text and replaced it with a link to Maven Archiver.

Modified:
    maven/site/trunk/src/site/apt/guides/mini/guide-manifest.apt

Modified: maven/site/trunk/src/site/apt/guides/mini/guide-manifest.apt
URL: http://svn.apache.org/viewvc/maven/site/trunk/src/site/apt/guides/mini/guide-manifest.apt?rev=987259&r1=987258&r2=987259&view=diff
==============================================================================
--- maven/site/trunk/src/site/apt/guides/mini/guide-manifest.apt (original)
+++ maven/site/trunk/src/site/apt/guides/mini/guide-manifest.apt Thu Aug 19 18:24:19 2010
@@ -2,126 +2,18 @@
  Guide to Working with Manifests
  ------
  Jason van Zyl
+ Dennis Lundberg
  ------
- 12 October 2005
+ 2010-08-19
  ------
 
 Guide to Working with Manifests
 
- In order to modify the manifest of the resultant JAR produced by the jar plug-in you need to create a configuration
- for the jar plug-in. In this first example we'll add some entries to the manifest by specifying what we'd like
- in the <<<configuration>>> element of the jar plug-in:
+ In order to modify the manifest of the archive produced by the packaging
+ plug-ins you need to create a configuration for it. The definitive guide for
+ this is {{{/shared/maven-archiver/index.html}the site for the Maven Archiver shared component}}.
+ This component is used by all our packaging plugins.
 
-+----+
-
-<project>
-  ...
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2</version>
-        <configuration>
-          <archive>
-            <manifestEntries>
-              <mode>development</mode>
-              <url>${pom.url}</url>
-            </manifestEntries>
-          </archive>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  ...
-</project>
-
-+----+
-
- As you see above you can use literal values or you can have values from the POM interpolated into literals
- or simply use straight POM expressions. So this is what your resultant <<<MANIFEST.MF>>> will look like inside
- the generated JAR:
-
-+----+
-
-Manifest-Version: 1.0
-Archiver-Version: Plexus Archiver
-Created-By: Apache Maven
-Built-By: jvanzyl
-Build-Jdk: 1.4.2_09
-Extension-Name: my-app
-Specification-Vendor: MyCompany Inc
-Implementation-Vendor: MyCompany Inc
-Implementation-Title: my-app
-Implementation-Version: 1.0-SNAPSHOT
-mode: development
-url: http://maven.apache.org
-
-+----+
-
- If you need to do more then simply add some manifest entries there are more options like activating indexing of the
- JAR, setting the main-class, packageName ... Here's an example of what the <<<configuration>>> element of the
- JAR plug-in might look like:
-
-+----+
-
-<project>
-  ...
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <version>2.2</version>
-        <configuration>
-          <archive>
-            <!--
-            <index>true</true>
-            -->
-            <manifest>
-              <mainClass>com.mycompany.app.App</mainClass>
-              <packageName>com.mycompany.app</packageName>
-              <!-- options
-              <addClasspath>true</addClasspath>
-              <addExtensions/>
-              <classpathPrefix/>
-              -->
-            </manifest>
-            <manifestEntries>
-              <mode>development</mode>
-              <url>${pom.url}</url>
-            </manifestEntries>
-            <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
-          </archive>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  ...
-</project>
-
-+----+
-
- So this is what your resultant <<<MANIFEST.MF>>> will look like inside the generated JAR:
-
-+----+
-
-Manifest-Version: 1.0
-Archiver-Version: Plexus Archiver
-Created-By: Apache Maven
-Built-By: jvanzyl
-Package: org.com.foo.app
-Build-Jdk: 1.4.2_09
-Extension-Name: my-app
-Specification-Vendor: MyCompany Inc
-Implementation-Vendor: MyCompany Inc
-Implementation-Title: my-app
-Implementation-Version: 1.0-SNAPSHOT
-Main-Class: org.com.foo.App
-mode: development
-url: http://maven.apache.org
-
-+----+
 
 ~~ suggestion by jorg
 ~~ it would be nice if the Specification-Version could be easily generated to be major.minor of pom.currentVersion i.e. that