I have a classical multimodule project with cross dependency
parent pom:
<modules>
<module>mod1</module>
<module>mod2</module>
</modules>
...
<dependencyManagement>
<dependencies>
<dependency>
<groupId>grp</groupId>
<artifactId>mod1</artifactId>
<version>${project.version}</version>
</dependency>
...
mod2 pom:
<dependencies>
<dependency>
<groupId>grp</groupId>
<artifactId>mod1</artifactId>
</dependency>
...
It builds mvn clean install
fine, however when CI runs sonar using mvn sonar:sonar ...
the maven tries to download mod1
snapshot dependency from repo, which supposed to be part of the same reactor.
Downloading from nexus: http://...mod1/1.0.0-SNAPSHOT/maven-metadata.xml
And it most cases it could not find the snapshot as it was not deployed yet, but it just keeps going. However it slows down the build as I have several modules and each takes a while to make a roundtrip to repository.
Why?