Kogel, Jonck-van-der
2009-04-17 16:04:02 UTC
Hi,
I'm trying to get Maven to correctly set my class path entry in the Jar
manifest file. It's all working as it should except for my system scoped
jars, these get excluded from the manifests class path for some reason.
I have several system scoped dependencies as such:
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc</artifactId>
<version>1.3.1</version>
<scope>system</scope>
<systemPath>${maven.home}/repository/com/ibm/db2jcc/1.3.1/db2jcc.jar
</systemPath>
</dependency>
But here is what the manifest.mf looks like after Maven runs, as you can
see the DB2 driver is not included:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: kogeljo
Build-Jdk: 1.6.0_05
Main-Class: com.completer.startup.App
Class-Path: lib/spring-beans-2.5.6.jar lib/commons-logging-1.1.1.jar l
ib/spring-core-2.5.6.jar lib/spring-context-2.5.6.jar lib/aopalliance
-1.0.jar lib/spring-context-support-2.5.6.jar lib/spring-dao-2.0.8.ja
r lib/spring-jdbc-2.5.6.jar lib/spring-tx-2.5.6.jar lib/spring-suppor
t-2.0.8.jar lib/commons-dbcp-1.2.2.jar lib/commons-pool-1.3.jar lib/c
ommons-beanutils-core-1.7.0.jar lib/commons-collections-2.0.jar lib/c
glib-full-2.0.2.jar lib/log4j-1.2.15.jar lib/mail-1.4.jar lib/activat
ion-1.1.jar
Currently I have the maven-jar-plugin configured as such:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.completer.startup.App</mainClass>
<addClasspath>true</addClasspath>
<addExtensions/>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
Could someone please tell me what I'm doing wrong?
Thanks, Jonck
I'm trying to get Maven to correctly set my class path entry in the Jar
manifest file. It's all working as it should except for my system scoped
jars, these get excluded from the manifests class path for some reason.
I have several system scoped dependencies as such:
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc</artifactId>
<version>1.3.1</version>
<scope>system</scope>
<systemPath>${maven.home}/repository/com/ibm/db2jcc/1.3.1/db2jcc.jar
</systemPath>
</dependency>
But here is what the manifest.mf looks like after Maven runs, as you can
see the DB2 driver is not included:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: kogeljo
Build-Jdk: 1.6.0_05
Main-Class: com.completer.startup.App
Class-Path: lib/spring-beans-2.5.6.jar lib/commons-logging-1.1.1.jar l
ib/spring-core-2.5.6.jar lib/spring-context-2.5.6.jar lib/aopalliance
-1.0.jar lib/spring-context-support-2.5.6.jar lib/spring-dao-2.0.8.ja
r lib/spring-jdbc-2.5.6.jar lib/spring-tx-2.5.6.jar lib/spring-suppor
t-2.0.8.jar lib/commons-dbcp-1.2.2.jar lib/commons-pool-1.3.jar lib/c
ommons-beanutils-core-1.7.0.jar lib/commons-collections-2.0.jar lib/c
glib-full-2.0.2.jar lib/log4j-1.2.15.jar lib/mail-1.4.jar lib/activat
ion-1.1.jar
Currently I have the maven-jar-plugin configured as such:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.completer.startup.App</mainClass>
<addClasspath>true</addClasspath>
<addExtensions/>
<classpathPrefix>lib/</classpathPrefix>
</manifest>
</archive>
</configuration>
</plugin>
Could someone please tell me what I'm doing wrong?
Thanks, Jonck