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