Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.3.1
-
Fix Version/s: 2.4
-
Component/s: None
-
Labels:None
-
Environment:Windows XP SP2, Maven 2.0.7, JDK 1.5.0_12
-
Number of attachments :
Description
The file name included in the class path in the generated Manifest.mf file is incorrect if a different bundle file name is defined in the configuration for the ear plugin. The file name used in the class path is the original file name, not the defined bundle file name (which is the actual file name in the created ear).
In my POM I have:
pom.xml
... <dependencies> <dependency> <groupId>jbossaop-poc</groupId> <artifactId>aop</artifactId> <type>jar</type> </dependency> ... </dependencies> <build> <plugins> <plugin> <artifactId>maven-ear-plugin</artifactId> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> <modules> <jarModule> <groupId>jbossaop-poc</groupId> <artifactId>aop</artifactId> <bundleFileName>aop-${pom.version}.aop</bundleFileName> <includeInApplicationXml>true</includeInApplicationXml> </jarModule> </modules> </configuration> </plugin> </plugins> </build>
In the resulting ear file, the included artifact 'aop-1.0-SNAPSHOT.jar' has been renamed to 'aop-1.0-SNAPSHOT.aop'. However, in the Manifest.mf (in the ear) the class path incorrectly specifies:
Class-Path: aop-1.0-SNAPSHOT.jar
Attached is a multi-module project that should reproduce this.
Attachments
Issue Links
| This issue relates to: | ||||
| MEAR-60 | Improve support for skinny war files |
|
|
|
Yep, good point. This is probably applicable to all plugins that update the file name of libs.
However, I wonder why you're using a manifest for an EAR. The way to define dependencies is through the application.xml, not the manifest.