apache / apache/maven

[MNG-6507] CI-friendly versioning doesn't work when included as dependency

Open
#7,193 4 comments 0 reactions 0 assignees View on GitHub
enhancement priority:minor
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[mike duigou](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=bondolo)** opened **[MNG-6507](https://issues.apache.org/jira/browse/MNG-6507?redirect=false)** and commented

I saw in the 3.6.0 release notes that several issues for CI friendly versions had been fixed so decided to try the feature.

One of our reactor projects is (simplified):

Reactor pom.xml:

``
`    4.0.0`
`    `
`        com.example.app`
`        Infrastructure`
`        7`
`    `
`    com.example.app`
`    Reactor`
`    App Reactor`
`    App Reactor Project`
`    ${revision}${changelist}`
`    pom    `
`        3.2.0`
`        -SNAPSHOT`
`        ${revision}${changelist}`
`    `
`    `
`        core`
`        configuration`
`    ``  `
`  ....``  `
` `

The configuration project pom.xml uses CI-friendly versioning:

``
`    4.0.0`
`    `
`        com.example.app`
`        Reactor`
`        ${revision}${changelist}`
`    `
`    com.example.app`
`    Configuration`
`    App Configuration`
`    jar`
`     .....`` `
`  `

The core project pom.xml uses CI-friendly versioning:

``
`    4.0.0`
`    `
`        com.example.app`
`        Reactor`
`        ${revision}${changelist}`
`    `
`    com.example.app`
`    Core`
`    App Core`
`    jar`
`    `
`        `
`            `
`            com.example.app`
`            Configuration`
`            ${revision}${changelist}`
`            test`
`        `
`         .....`
`      `
`       .....`
`     `

 

When building the reactor everything works as expected but building the core project independently results in maven attempting to resolve a version ${revision}${changelist} from the repos:

`[ERROR] Failed to execute goal on project Core: Could not resolve dependencies for project com.example:Core:jar:3.6.0-SNAPSHOT: Failed to collect dependencies at com.example.app:Configuration:jar:3.6.0-SNAPSHOT: Failed to read artifact descriptor for com.example.app:Configuration:jar:3.6.0-SNAPSHOT: Failure to find com.example.app:Reactor:pom:${revision}${changelist} in [http://artifactory.example.com:8081/artifactory/libs-release] was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]`
`org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project Core: Could not resolve dependencies for project com.example:Core:jar:3.6.0-SNAPSHOT: Failed to collect dependencies at com.example.app:Configuration:jar:3.6.0-SNAPSHOT`
`... stack omitted ...`
`Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.example:Core:jar:3.6.0-SNAPSHOT: Failed to collect dependencies at com.example.app:Configuration:jar:3.6.0-SNAPSHOT`
`... stack omitted ...`
`Caused by: org.eclipse.aether.collection.DependencyCollectionException: Failed to collect dependencies at com.example.app:Configuration:jar:3.6.0-SNAPSHOT`
`... stack omitted ...`` `
`Caused by: org.eclipse.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for com.example.app:Configuration:jar:3.6.0-SNAPSHOT`
`... stack omitted ...`` `
`Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Failure to find com.example.app:Reactor:pom:${revision}${changelist} in [http://artifactory.example.com:8081/artifactory/libs-release] was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced`
`... stack omitted ...`` `
`Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find com.example.app:Reactor:pom:${revision}${changelist} in [http://artifactory.example.com:8081/artifactory/libs-release] was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced`
`... stack omitted ...`
`Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find com.example.app:Reactor:pom:${revision}${changelist} in [http://artifactory.example.com:8081/artifactory/libs-release] was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced`
`... stack omitted ...`

 

It appears there are some places that should be doing the property substitution that are not, specifically in this case when including a pom as a dependency.

 

---

**Affects:** 3.6.0

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.