apache / apache/maven

[MNG-6848] Ci Friendly builds broke with 3.6.2

Open
#8,446 10 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

**[Patrick Barry](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=patrickjamesbarry)** opened **[MNG-6848](https://issues.apache.org/jira/browse/MNG-6848?redirect=false)** and commented

We currently use ci friendly versions introduced in 3.5.0

https://maven.apache.org/docs/3.5.0/release-notes.html Using of CI friendly versions via ${revision}, ${sha1} and/or ${changelist} has been fixed MNG-6057, MNG-6090 and MNG-5895. It is very important to know if you are using the previously named properties for a version in your pom you have to use flatten-maven-plugin if you like to do an mvn install or mvn deploy more details can be found at Maven CI Friendly Versions.

 

Our parent pom are defined with the following version attributes:

```java
${version}${revision}
pom
com.group
my-proj

0.0.1
-SNAPSHOT

```

and then on our build machine, we mvn install -Drevision=\

our sub-modules inherit the version from parent like this:

```java

com.group
my-proj

${version}${revision}
..

```

This allows us to only have to define the version in one spot and all sub-modules will stay in sync with parent.

This generated a warning but still worked until 3.6.2

```
15:56:14 [WARNING] Some problems were encountered while building the effective model for com.group:little-proj:jar:2.0.0.48015:56:14 [WARNING] 'version' contains an expression but should be a constant. @ com.group:my-proj:${version}${revision}, /var/build/workspace/project/pom.xml, line 17, column 14
```

is now...

```
15:54:12 [ERROR] 'dependencies.dependency.version' for com.group:little-proj:jar is missing. @ com.group:test-proj:${version}${revision}, /var/build/workspace/test/./test-proj/pom.xml, line 89, column 22
```

we use flatten plugin

```java

org.codehaus.mojo
flatten-maven-plugin
1.1.0


flatten
process-resources

flatten


true
resolveCiFriendliesOnly



flatten.clean
clean

clean




true
resolveCiFriendliesOnly

```

If this is not the proper way to use Ci-Friendly versions, what is?

 

---

**Affects:** 3.6.2

2 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.