After looking at various suggestions, I still can't seem to have any successful maven strategy for ear files.
I have this structure:
parent pom.xml: ...
<modules>
<module>MyProject-ear</module>
<module>MyProject-ejb</module>
<module>MyProject-war</module>
</modules>
(ejb/war/ear have this as parent)
I'm using maven-war-plugin / maven-ejb-plugin / maven-ear-plugin.
EAR module has the ejb/war projects as dependencies.
Now, if I want to build my ear, I need to build the war first. If I don't, it's just not the latest version.
Is there a better way?
EDIT: FYI, opened a netbeans bug to have a working solution to run my project just by clicking "run": http://netbeans.org/bugzilla/show_bug.cgi?id=218807
That looks fine. I use the same layout myself.
When building you just have to be positioned at the top pom and run mvn install
. You don't have to go down the hierarchy and build the war
first.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.