Uploaded image for project: 'Maven EAR Plugin'
  1. Maven EAR Plugin
  2. MEAR-75

Incorrect file name in class path (in manifest) if specifying different bundleFileName for module

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.1
    • 2.4
    • None
    • Windows XP SP2, Maven 2.0.7, JDK 1.5.0_12

    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

        1. jbossaop-poc.zip
          19 kB
          Anders Hammar

        Issue Links

          Activity

            People

              snicoll Stephane Nicoll
              afloom Anders Hammar
              Votes:
              6 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: