> I'm trying to package my application with its dependencies such that the
> main jar file is executable.  That means have a Class Path entry in the
> Manifest of the main jar.  I can get this to work with the following in my
> pom.xml:
>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-jar-plugin</artifactId>
>                 <configuration>
>                     <archive>
>                     <manifest>
>                       <mainClass>com.copart.handheld.Main</mainClass>
>                       <packageName>com.copart.handheld</packageName>
>                       <addClasspath>true</addClasspath>
>                     </manifest>
>                   </archive>
>                 </configuration>
>             </plugin>
>
> That puts entries into the Manifest like the following:
>
> Class-Path: someJar-1.0-SNAPSHOT.jar anotherJar-1.0-SNAPSHOT.jar yetA
>  notherJar-1.0-SNAPSHOT.jar
>
> This is what I want.
>
> However, when I use the Assembly plugin to create a ZIP file and instruct
> it to include the dependent jars, I can't get it to name them like the
> above.  I'm using the following tag:
>
>
> <outputFileNameMapping>${artifactId}.${extension}</outputFileNameMapping>
>
> That produces jars like:
>     someJar.jar
>     anotherJar.jar
>     yetAnotherJar.jar

See http://jira.codehaus.org/browse/MASSEMBLY-67

From the notes:

The solution here is to use an outputFileNameMapping such as this:

${artifactId}-${baseVersion}.${extension}

Using ${baseVersion} for cases where you want to preserve the
-SNAPSHOT naming, the plugin retains the ability to use ${version} for
the timestamp-buildnumber naming, which is useful for describing the
exact library version included in the assembly.

I've added an integration test:
/basic-features/outputFileNameMapping-withArtifactBaseVersion to
verify that this is fixed.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to