Multi-module maven and snapshots resolving

6 days ago 4
ARTICLE AD BOX

I have multi-module maven repo.

The root pom.xml has modules listed, each module has the same version, all very common, no surprises:

<modules> <module>foo-api</module> ...etc </modules>

The project version is e.g. 0.0.5-SNAPSHOT

This version gets pushed couple of times to the private artifactory, essentially, we are updating the SNAPSHOT version. This is all good.

The problem is the following: once when I have snapshots published for e.g. version 0.0.5-SNAPSHOT, Maven chooses to download them from the artifactory, instead of just using the local modules. In other words:

before publishing snapshot, maven builds module and uses locally after publishing snapshot, maven downloads them from artifactory

I have to bump the snapshot version everytime because of this, and that is not what I want.

Can I tell Maven: "use current modules first" as dependencies?

Read Entire Article