apache / apache/maven-build-cache-extension

[MBUILDCACHE-77] Archetypes can't be build using maven build cache in CI/CD environments.

Open
#276 0 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
163
Forks
77
Avg merge
1d 2h
Merged PRs (30d)
4

Description

**[aitor moragas](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER283345)** opened **[MBUILDCACHE-77](https://issues.apache.org/jira/browse/MBUILDCACHE-77?redirect=false)** and commented

Our build  in the CI/CD pipeline is like follows:

 
* compute next version
* update next version in all components
* launch build

 

For archetype projects the build can never be cached because of the way the hash is computed.

This is a snippet of the buildinfo.xml file produced:

 

 

```java



      ../../pom.xml
   
 

```

The fact that the parent pom.xml has been updated with the new version makes it impossible that the hash matches and therefore the build is always done (never skipped as present in the cache).

 

When computing the effective pom, we need something equivalent to \ for maven plugins.

 

 

 

 

---

**Affects:** 1.1.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the generated buildinfo.xml and trace how the effective POM is used when hashing archetype projects. Determine how an equivalent of for Maven plugins should treat the updated parent pom.xml, then verify that the CI/CD build can reuse the cache instead of rebuilding.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.