[ 
https://jira.codehaus.org/browse/MEAR-142?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aliaksei Lahachou updated MEAR-142:
-----------------------------------

    Attachment: ear-bundle-file-name.zip

bundleFileName is handled inconsistently, when maven-ear-plugin configuration 
is merged from a profile. I attached a test project to demonstrate the problem:

* {{mvn package}} - builds an EAR package with ejb-1.jar and war-1.war inside.
* {{mvn package -Pinclude-ejb-2}} should build an EAR package with ejb-1.jar, 
ejb-2.jar and war-1.war, but bundleFileName is ignored for ejb-1.jar.
* Interestingly, adding a module in profile makes maven-ear-plugin ignore 
bundleFileName for modules of the same type. {{mvn package -Pinclude-war-2}} 
should build an EAR package with ejb-1.jar, war-1.war and war-2.war, but this 
time bundleFileName is ignored for war-1.war.

> bundleFileName ignored when plugin used with multiple profile
> -------------------------------------------------------------
>
>                 Key: MEAR-142
>                 URL: https://jira.codehaus.org/browse/MEAR-142
>             Project: Maven 2.x Ear Plugin
>          Issue Type: Bug
>    Affects Versions: 2.6
>         Environment: linux, or windows same behaviour
> maven 2, jdk 1.5
>            Reporter: Stefano Ghezzi
>         Attachments: ear-bundle-file-name.zip
>
>
> I want to build ear with different sets of modules based on the profiles 
> activated
> In every profile i have a configuration like this
> <profile>
>         <id>profile1</id>
>         <dependencies>
>             <dependency>
>             ......
>             </dependency>
>         </dependencies>
>             <build>
>                 <plugins>
>                     <plugin>
>                             <groupId>org.apache.maven.plugins</groupId>
>                             <artifactId>maven-ear-plugin</artifactId>
>                             <version>2.6</version>
>                             <configuration>
>                             <modules>
>                               <ejbModule>
>                                <groupId>xxxx</groupId>
>                                <artifactId>xxx-yyy</artifactId>
>                                <bundleFileName>xxx-yyy.jar</bundleFileName>
>                               </ejbModule>
>                     </modules>
>                 </configuration>
>             </plugin>
>          </plugins>
>     </build>
>     </profile>
> As soon as i use two different profiles the bundleFileName attribute is 
> ignored and ejb/jar/war are packaged with the original filename
> Only workaround possibile at the moment:
> have only two profiles
> replicate all the ejb/jar/war in the two profiles
> but obviously this is less than optimal
> bye

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to