[ https://jira.codehaus.org/browse/MEAR-88?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=335989#comment-335989 ]
Chris Graham commented on MEAR-88: ---------------------------------- I'd keep it. What Robert says in Comment #1, is _mostly_ correct. Except for all of the other eclipse embedded tools where the m2e integration is not available. An edge case, sure, but still a valid one. > Improve documentation on combining Eclipse and Maven Integration > ---------------------------------------------------------------- > > Key: MEAR-88 > URL: https://jira.codehaus.org/browse/MEAR-88 > Project: Maven Ear Plugin > Issue Type: Improvement > Reporter: Chris Graham > Priority: Trivial > > This could be implemented as another example. > Eclipse and Maven Integration > If you have used {{mvn eclipse:eclipse}} to generate the metadata for an EAR > project, it will want the {{application.xml}} file in the > {{src\main\application\META-INF}} directory. > If you edit application.xml using the WTP based Application Deployment > Descriptor editor, it will use the name of the projects (Web, EJB etc) as the > name of the modules. Here is an example: > {code:xml} > <?xml version="1.0" encoding="UTF-8"?> > <application xmlns="http://java.sun.com/xml/ns/j2ee" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee > http://java.sun.com/xml/ns/j2ee/application_1_4.xsd" version="1.4"> > <display-name>FireDragon</display-name> > <module> > <web> > <web-uri>FireDragonWeb.war</web-uri> > <context-root>firedragon</context-root> > </web> > </module> > </application> > {code} > Obviously this does not have the typical maven based version naming > convention applied to it. This allows us to run the application internally > within eclipse/rsa using the test environments. > However, when maven is used to create the ear using mvn package, it will > create the versionised application.xml file, if told to. However, by default > it will not pick up the generated (versionized) one, it will use the existing > one in the {{src\main\application\META-INF}} directory. > The solution to resolve this conflict is to have maven generate the > application.xml and use the generated one as opposed to the existing one. > This can be achieved via these two directives: > {code:xml} > <generateApplicationXml>true</generateApplicationXml> > <applicationXml>${project.build.directory}/application.xml</applicationXml> > {code} > The first line tells maven to generate a new application.xml file, by default > in the target directory. > The second line tells maven to use it. > Simple! > -Chris -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira