I have a simple project containing some WAR artifacts and one EAR artifact which bundles it together.
<modules>
<module>service1</module>
<module>service2</module>
<module>ear</module>
</modules>
If I run mvn package
with that pom it works fine. The reactor recognizes the artifacts and I don't have to use the local repository.
I want to build service1 and service2 seperatly. After that I want to build ear using the build results from service1 and service2.
If I run mvn package
only for ear, it searches the artifacts in the local repository and it will fail, because there are not there.
How can I tell the ear plugin to look somewhere else e.g. the target folder of the modules itself?
Background: I want to build every feature branch and don't want to mess up my local repository nor duplicate it for every branch.