Given that I have the following dependency for my multi-module CI:
<groupId>my_group</groupId>
<artifactId>artifact1</artifactId>
<version>2.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>my_group</groupId>
<artifactId>artifact2</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
On my CI I want to compile artifact 2. However, on my dev I rarely touch it and since compilation of that artifact requires some external dependencies and significant time I would very much like to skip it and use whatever latest release exists.
Up until now I had a profile that overrode artifact2 version with RELEASE, e.g.: use-released-artifact2 my_group artifact2 RELEASE
and locally I would run with -Puse-released-artifact2. Great.
Now maven3 deprecates RELEASE and LATEST pseudo-versions and I'm trying to find a solution that:
- doesn't leave modified pom.xml files to be identified as "modified" by git. in the past that led to developer inadvertently committing the wrong file. for the same reason I can't just add ignore to this file.
- doesn't require the developer to follow the release schedule and substitute parameters in their "mvn clean install..." line.
- doesn't go through lengthy resolution as version ranges do.
- doesn't force me to commit a version on every release (besides version plugin doesn't support advancing to version "next-1" afaik).
any ideas?
Clarification:
I don't want to run artifcat2 build at all. Moreover, artifact2 isn't available at 2.0.0-SNAPSHOT in the repository as it has not been released yet. I really want to take the latest release (e.g. 1.5.7) from the repository to compile artifact1 against that.