1

I'm converting an existing project structure to Maven where there's EJBs and JARs contained in EARs that are deployed. My issue is with making EARs. It seems obvious to use the Maven EAR plugin, which either takes an existing application.xml or generates one on basis of configuration.modules. I feel I'm not entirely leveraging Maven if I would not use the modules configuration (although it would allow developers to reuse the existing application.xml editor), but I'm thinking about many of our developers who love to click around in RAD/Eclipse to get things configured. So I took a look at RAD/Eclipse in full expectation to see some m2e support that would allow me to point-and-pick my EAR modules, and then see the modules in the POM file being populated accordingly. But I'm not able to find such thing. I believe I installed m2e (1.3.0) and m2e-wtp (0.17.0) although it seems to bring me very little in terms of WTP/EAR support. Also I spent most of tonight googling around, to no avail. Should I forget about it and have devs just manually edit the POM file, or am I overlooking some nifty UI for this purpose? Thanks for your pointers!


Seeing a comment and an answer that drive me to elaborate. I do appreciate that when using Maven, Maven is leading. No argument there. And I know that I can take control over the application.xml back using generateApplicationXml, but that's not even what I'm after, again Maven can be leading. But as I can use the "Maven POM Editor" to edit the basic structure of the POM, would there be any UI available to edit the configuration.modules? Our devs are very acustomed to IDE-centric development, and them having to start editing POM file XML in order to manage modules is something that scares me slightly...

4

1 回答 1

0

如果要手动配置 application.xml,可以将文件包含到源文件夹中并将generateApplicationXml属性设置为false,这样 maven 就不会覆盖它。

详见:http ://maven.apache.org/plugins/maven-ear-plugin/generate-application-xml-mojo.html#generateApplicationXml

于 2013-05-29T08:24:18.747 回答