application.xml is not the correct and not the same in the EAR package
-----------------------------------------------------------------------
Key: MECLIPSE-354
URL: http://jira.codehaus.org/browse/MECLIPSE-354
Project: Maven 2.x Eclipse Plugin
Issue Type: Bug
Affects Versions: 2.5
Environment: Windows XP; JDK1.4; RAD6
Reporter: Olivier Chaumont
When I execute mvn eclipse:rad command on an EAR maven project, the eclipse
plugin generate the file META-INF/application.xml.
To generate the content of this file the eclipse plugin read the config of the
"maven-ear-plugin" in the pom.xml.
Below the config of the "maven-ear-plugin":
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<displayName>${project.name}</displayName>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<generateApplicationXml>true</generateApplicationXml>
<generatedDescriptorLocation>${basedir}/target</generatedDescriptorLocation>
<modules>
<webModule>
<groupId>com.bnpparibas.assurance.ic</groupId>
<artifactId>mypres</artifactId>
<contextRoot>mypres1</contextRoot>
<bundleFileName>mypres-1.0.war</bundleFileName>
</webModule>
<webModule>
<groupId>com.bnpparibas.assurance.ic</groupId>
<artifactId>mypres</artifactId>
<contextRoot>mypres2</contextRoot>
<bundleFileName>mypres-1.0.war</bundleFileName>
</webModule>
<ejbModule>
<groupId>com.bnpparibas.assurance.ic</groupId>
<artifactId>Ref_SERV_EJB</artifactId>
<bundleFileName>myEJB.jar</bundleFileName>
</ejbModule>
</modules>
<finalName>${project.name}-${project.version}</finalName>
;</configuration>
</plugin>
The generated application.xml file with mvn eclipse:rad :
<?xml version="1.0" encoding="UTF-8"?>
<application xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Application_ID"
version="1.4">
<description/>
<display-name>myEAR2</display-name>
<module id="EjbModule_1195818055166">
<ejb>Ref_SERV_EJB.jar</ejb>
</module>
<module id="WebModule_1195818055167">
<web>
<web-uri>mypres.war</web-uri>
<context-root>mypres1</context-root>
</web>
</module>
</application>
The generated application.xml file with mvn install:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>myEAR2</display-name>
<module>
<web>
<web-uri>mypres-1.0.war</web-uri>
<context-root>mypres1</context-root>
</web>
</module>
<module>
<web>
<web-uri>mypres-1.0.war</web-uri>
<context-root>mypres2</context-root>
</web>
</module>
<module>
<ejb>myEJB.jar</ejb>
</module>
</application>
The problem is that the application.xml generated by eclipse plugin and the one
generated by ear plugin is not the same, and I think ear plugin is good one:
1- There is one web module in the application.xml file and not two like in the
pom.xml file.
2- The name of the web-uri and the ejb module is not the value of the
bundleFileName, bit the value of the artifactId.
3- The doctype is not the same (it is possible to configure it?)
Also, I think it would be better that maven-eclipse-plugin doesn't generate the
application.xml file because maven-ear-plugin do the same thing. Perhaps it is
possible that maven-eclipse-plugin call maven-ear-plugin code to generate it,
and so we are sure that the files will be the same.
Thanks a lot.
Olivier
--
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