You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Böhringer Jochen <Jo...@tcc-products.de> on 2004/12/30 12:02:00 UTC
Set Class-Path in jar file
Hi,
I want to generate a jar with the jar plugin and set the Class-Path to include the name of some of the project dependencies.
The jar will be a library jar, so I cannot use uberjar or similar plugins to generate a standalone application.
My current approach is to set the
maven.jar.manifest=src/meta-inf/Manifest.mf
property in the project.properties and have only a single line in this referenced Manifest.mf:
Class-Path: commons-logging-1.0.4.jar fmcojagt-3.5.0.1.jar mqwfcommons-SNAPSHOT.jar
The jar plugin merges this line with the one which is automatically generated.
This works, but I think there might be another solution. I found the property:
maven.jar.manifest.classpath.add=true
and included it in my project.properties. Then the jar plugin includes an empty Class-Path: property in the generated jar. Is it possible to use the maven.jar.manifest.classpath.add=true attribute and specify the entries added to the classpath with a dependency property?
Thx
Jochen
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org