Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Blocker
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: WTP integration
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
I have an EAR project whose application.xml gets dynamically generated by the maven-ear-plugin and which I can package correctly by calling "mvn package" - "package correctly" as in it gets correctly packaged & is deployable on a server.
But if I try to deploy that project using WTP's Run on Server feature it fails and I get a "application.xml not found" message during server startup because the whole "META-INF" directory is missing.
What I would expect is that m2eclipse somehow kicks Maven to generate the application.xml and then puts it in the correct place so it is found by the server / WTP upon deploying (same holds true for jboss-app.xml and everything else that is dynamically generated by the maven-ear-plugin).
See the attached archive for a testcase for an example. How to reproduce:
1. extract archive
2. import project A, B and C into Eclipse
3. verify that project C has project A & B listed as referenced projects in Eclipse's project settings.
4. now run "Run on Server" for project C. Server startup will fail with "application.xml not found".
5. Package project "C" manually with "mvn package" to verify that the META-INF/application.xml does gets correctly generated.
This doesn't work with 0.9.6 as well as with what is currently available via the development update site (0.9.7.200811301806).
Please fix that for the next release since it is the last bit that is missing for a nice WTP integration.
Further note that somehow my WARs lib directory got duplicated so that I had WEB-INF/lib/...*.jar in the root of my EAR which isn't reproducible with that testcase (sorry, but I'm currently lacking the time). Therefore please have a look at this as well.
Oops, looks like I skipped that ticket, I'll look into it.
What app server are you using exactly (jboss-app.xml hints to JBoss AS)?
Regarding m2eclipse behavior, since I'm the culprit for the current EAR support implementation, I'll try to explain the choices made.
Calling maven-ear-plugin API would have been the ideal solution, I didn"t do it for a few reasons :
If you have any ideas to help enhance the current implementation, please open a new enhancement ticket, I'd be pleased to do it the "proper" way.
The duplicated web libs is a due to a WTP bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=247090). Apparently it seems harmless.
regards,
Fred Bricon