You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Darbois <Th...@edifixio.com> on 2008/04/17 15:58:11 UTC
Classpath Manifest and format of libraries. Maven-jar-Plugin
Hello
I'm having trouble with a multi module project that I m working on.
I need a class path inside the manifest of the built jar (plugin maven jar and configuration <addClasspath>true</addClasspath> in my parent pom defined in pluginmanagement).
The classpath is perfectly formatted when I'm running the project from the parent pom, but when I'm running maven from one of the module the class path is not well formatted: it add a version tag at the end of the name of the library the module depends on.
Example:
A module toto(packaging : jar, version : 0.1) dependending on an other module test (packaging : jar, version : 0.1) both are called by the pom parent (packaging : pom, version : 0.1) using <modules> and both are inheriting from him (<parent><artifactId>parent</artifactId>[...]</parent>)
The parent pom look likes :
<modules>
<module>toto</module>
<module>test</module>
</modules>
<build>
<finalName>${artifactId}</finalName>
<pluginManagement><plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
The module toto contains :
<dependencies>
<dependency>
<groupId>
XXX
</groupId>
<artifactId>test</artifactId>
<version>0.1</version>
</dependency>
</dependencies>
When I m packaging from the parent pom the classpath inside of the manifest of toto.jar looks like :
Class-Path: test.jar
When I'm packaging from toto the classpath inside the manifest of toto.jar looks like :
Class-Path: test-0.1.jar
Is there anywhere to format the name of the libraries inside the class-path. I know we can alter the directory where to find the library (with <classpathPrefix>) but the name I can't find any information?
Thanks for your time.
Tomas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org