Maven Ear Plugin
  1. Maven Ear Plugin
  2. MEAR-75

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.1
    • Fix Version/s: 2.4
    • Labels:
      None
    • Environment:
      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.

      1. jbossaop-poc.zip
        19 kB
        Anders Hammar

        Issue Links

          Activity

          Anders Hammar created issue -
          Stephane Nicoll made changes -
          Field Original Value New Value
          Priority Major [ 3 ] Minor [ 4 ]
          Barend Put made changes -
          Link This issue relates to MEAR-60 [ MEAR-60 ]
          Stephane Nicoll made changes -
          Priority Minor [ 4 ] Major [ 3 ]
          Fix Version/s 2.4 [ 14487 ]
          Stephane Nicoll made changes -
          Fix Version/s 2.4 [ 14487 ]
          Fix Version/s 2.3.3 [ 15180 ]
          Assignee Stephane Nicoll [ sni ]
          Stephane Nicoll made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Stephane Nicoll made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Closed [ 6 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 09:57:13 UTC 2015 [ 1428227833271 ]
          Mark Thomas made changes -
          Workflow jira [ 12720291 ] Default workflow, editable Closed status [ 12750253 ]
          Mark Thomas made changes -
          Project Import Sun Apr 05 23:36:55 UTC 2015 [ 1428277015909 ]
          Mark Thomas made changes -
          Workflow jira [ 12957830 ] Default workflow, editable Closed status [ 12994697 ]
          Mark Thomas made changes -
          Assignee sni [ sni ] Stephane Nicoll [ snicoll ]

            People

            • Assignee:
              Stephane Nicoll
              Reporter:
              Anders Hammar
            • Votes:
              6 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development