[ 
http://jira.codehaus.org/browse/MEAR-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=129302#action_129302
 ] 

B. Garvelink commented on MEAR-75:
----------------------------------

Here's a vote in favour of raising the priority for this issue. Consider the 
following scenario:

 * We have converted a large, existing application to Maven. The application 
uses EJB 2.1 and throughout all the EJB and WEB deployment descriptors the 
{{<ejb-link>EjbModule.jar#EJB-NAME</ejb-link>}} element is used for wiring 
everything together.
 * To make the ejb-links work, we're using the {{<bundleFileName>}} directive 
to strip version numbers from the JARs and WARs upon inclusion in the EAR file.
 * This breaks the manifest class-paths of the wars and ejb-jar's that have 
been included int he ear, as mentioned in the original issue. On WebSphere 
v5.1, this is a serious problem; correct manifest class-paths in the embedded 
modules are a requirement (e.g. if a WAR and EJB-JAR are are part of the same 
EAR, and the WAR uses the EJB's, the manifest class-path for the WAR file must 
mention the EJB-JAR file by its name within the EAR). The manifest class-path 
of the ear itself, as Stephane mentions in comment 1, isn't so important.

In my opinion, the maven-ear-plugin is justified in rewriting the manfest 
class-paths of its included modules on the basis that these modules become part 
of a larger assembly and (in that scope) no longer exist on their own. The 
original modules remain unchanged in the repository. Rewriting the manifest 
class paths is easier than rewriting the ejb-links, and has a potentially wider 
applicability.

We're in the process of selecting the least painful of a number of 
work-arounds. If the maven-ear-plugin would update the manifest classpaths for 
the modules it includes, that'd be mighty helpful.

> Incorrect file name in class path (in manifest) if specifying different 
> bundleFileName for module
> -------------------------------------------------------------------------------------------------
>
>                 Key: MEAR-75
>                 URL: http://jira.codehaus.org/browse/MEAR-75
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>    Affects Versions: 2.3.1
>         Environment: Windows XP SP2, Maven 2.0.7, JDK 1.5.0_12
>            Reporter: Anders Hammar
>            Priority: Minor
>         Attachments: jbossaop-poc.zip
>
>
> 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:
> {code:title=pom.xml|borderStyle=solid}
>       ...
>       <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>
> {code}
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to