I have two modules at the same hierarchy level, each a child of the same parent pom.xml
: foo (jar) and bar (war). foo is a dependency of bar:
<dependency>
<groupId>parentArtifact</groupId>
<artifactId>foo</artifactId>
<version>1.0</version>
</dependency>
When I run mvn install
in bar, foo does not get rebuilt. It does if I run a build at the parentArtifact level but I don't want to do it, for speed (there are other modules).
How can I force a rebuild of foo every time a build is run in bar?
but I don't want to do it, for speed (there are other modules).
but in the title you've written:to rebuild..
so go to the root level and rebuilt it viamvn clean package
or usemvn clean verify
if you have integration tests.