Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: maven-archiver-2.4
-
Fix Version/s: maven-archiver-2.4
-
Component/s: maven-archiver
-
Labels:None
-
Environment:windows XP, maven 2.0.9, jdk 1.4.2_11
-
Number of attachments :
Description
Hello,
My need is to dynamically create the Manifest, based on pom datas. For classpath, I'd like to list dependencies using only their artifactId (without version).
so, on maven2 jar plugin, I've tried to add the configuration, as defined at http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Custom
Dependency to version 2.4 of maven-archiver is well managed.
Using it, I generate the following entry in the MANIFEST.MF :
...
Class-Path: null.null null.null null.null null.null
...
As you can see, I have 4 dependencies. Where is the problem ?
... I've tried to use it with maven-artifact:2.0.9 - no more success.
Have you an idea ? Does it works for you ?
Thinks for your help
Herve
It works fine for me:
<plugin>
{artifact.artifactId}<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<finalName>HbrLibrary</finalName>
<archive>
<index>true</index>
<!-- currently, log4j -->
<manifest>
<addClasspath>true</addClasspath>
<classpathLayoutType>custom</classpathLayoutType>
<customClasspathLayout>$$
.$$
{artifact.extension}</customClasspathLayout>
</manifest>
<manifestEntries>
<ServiceLibrary>true</ServiceLibrary>
</manifestEntries>
<!-- do not update the archive when its timestamp is older than any of the included files -->
<forced>false</forced>
</archive>
</configuration>
<!-- support for the customClasspathLayout -->
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-archiver</artifactId>
<version>2.4</version>
</dependency>
</dependencies>
</plugin>