apache / apache/maven

[MNG-5614] Continuous Delivery Friendly Versions not present in installed artifacts

Open
#6,703 2 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Axel Fontaine](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=axel.fontaine)** opened **[MNG-5614](https://issues.apache.org/jira/browse/MNG-5614?redirect=false)** and commented

Consider a parent pom with these tags:
...
\${revision}\
...
\
\0-SNAPSHOT\
\
...

If I start the build with:
mvn install -Drevision=666

The revision gets replaced correctly at runtime (correct), but the placeholder remains in the installed artifact in the local repository (wrong).

To make matters worse, if you have a Maven Plugin child module with these tags in the pom:
...
\
...
\${revision}\
\
...
\maven-plugin\
...
\
\
\${project.groupId}\
\other-artifact\
\${project.version}\
\
\

Once the plugin gets used in yet another module, the resolution of other-artifact will fail at runtime with:
Plugin ...:666 or one of its dependencies could not be resolved: Could not find artifact ...:other-artifact:jar:0-SNAPSHOT

Until this is fixed the functionality provided by MNG-5576 is virtually useless.

By speaking about the fix, why bother with replacing variables? Why bother with parent POMs? How about simply installing and deploying the effective POM? This would solve a whole range of problems at once. And at the end of the day, this will simplify many things, at the cost of slightly larger installed POMs.

---

**Affects:** 3.2.1

**Issue Links:**
- [MNG-6608](https://issues.apache.org/jira/browse/MNG-6608) Why can't project.version in pom.xml be set as a variable?

1 votes, 8 watchers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.