[jbosstools-issues] [JBoss JIRA] Resolved: (JBIDE-6767) If there is JBoss Maven Integration facet, new Seam Web Project wizard unnecessarily copies seam libraries to ear project
Snjezana Peco (JIRA)
jira-events at lists.jboss.org
Sat Aug 7 20:49:49 EDT 2010
[ https://jira.jboss.org/browse/JBIDE-6767?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Snjezana Peco resolved JBIDE-6767.
----------------------------------
Fix Version/s: 3.2.0.M2
(was: 3.2.x)
Resolution: Done
There is a problem with JBoss (or WTP) deployer.
m2eclipse-wtp creates the following component.xml file :
...
<dependent-module archiveName="/lib/jbpm-jpdl-3.2.2.jar" deploy-path="/lib" handle="module:/classpath/var/M2_REPO/org/jbpm/jbpm-jpdl/3.2.2/jbpm-jpdl-3.2.2.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="/lib/drools-api-5.0.1.jar" deploy-path="/lib" handle="module:/classpath/var/M2_REPO/org/drools/drools-api/5.0.1/drools-api-5.0.1.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="/lib/richfaces-api-3.3.1.GA.jar" deploy-path="/lib" handle="module:/classpath/var/M2_REPO/org/richfaces/framework/richfaces-api/3.3.1.GA/richfaces-api-3.3.1.GA.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
<dependent-module archiveName="/lib/mvel2-2.0.10.jar" deploy-path="/lib" handle="module:/classpath/var/M2_REPO/org/mvel/mvel2/2.0.10/mvel2-2.0.10.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
...
The jbpm-jpdl-3.2.2.jar, drools-api-5.0.1.jar, richfaces-api-3.3.1.GA.jar... are deployed correctly to the EAR's lib directory, but mvel2-2.0.10.jar is deployed to the EAR's lib/lib directory.
The problem is that manifest in mvel2-2.0.10.jar contains the Main-Class: declaration; WTP treats such jars as an application client and deploys them incorrectly.
The problem can be reproduced as follows:
- disable the JBoss Maven Seam Configurator
- create a mavenized Seam EAR Project
- publish the project
or
- disable the JBoss Maven Seam Configurator
- create a mavenized Seam EAR Project
- add
<dependency>
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam-pdf</artifactId>
</dependency>
to the EAR's pom.xml
- publish the project
jboss-seam-pdf includes itext.jar which also contains the Main-Class declaration. Because of that, itext.jar will be deployed to the lib/lib directory.
I have made a workaround within the JBoss Maven Seam Configurator that changes mvel deployment in component.xml to the following:
...
<dependent-module archiveName="mvel2-2.0.10.jar" deploy-path="/lib" handle="module:/classpath/var/M2_REPO/org/mvel/mvel2/2.0.10/mvel2-2.0.10.jar">
<dependency-type>uses</dependency-type>
</dependent-module>
...
The workaround fixes the problem when creating a mavenized Seam Web project, but doesn't fix it if the user adds a jar with the Main-Class declaration in the Ear's pom.xml (itext.jar, for instance).
> If there is JBoss Maven Integration facet, new Seam Web Project wizard unnecessarily copies seam libraries to ear project
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: JBIDE-6767
> URL: https://jira.jboss.org/browse/JBIDE-6767
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: maven
> Affects Versions: 3.2.0.M1
> Reporter: Snjezana Peco
> Assignee: Snjezana Peco
> Fix For: 3.2.0.M2
>
>
> Copying libraries causes the exception described in the forum thread.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list