apache / apache/maven

[MNG-6616] Create public API for Projects Artifacts Cache where one project can be invalidated

Open
#8,596 4 comments 0 reactions 0 assignees View on GitHub
priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
21h 11m
Merged PRs (30d)
312

Description

**[Balazs Zsoldos](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=balazs.zsoldos)** opened **[MNG-6616](https://issues.apache.org/jira/browse/MNG-6616?redirect=false)** and commented

By introducing the Projects Artifact Cache, single builds became faster. However, there are tools that embed Maven and do not restart the complete JVM process between builds: M2E, mvnsh, etc.

These tools cannot force the refresh of project artifacts currently based on a stable public API of Maven. It would be nice if there was a public stable API, where projects could be invalidated in the cache even one-by-one, so the recompilation of a project would be the fastest possible.

In case of designing such an API, it should not be only about project artifacts cache, so if new caches introduced later by maven internally, the API should invalidate the project-specific records in all of them.

I mean that the API interface should not be called ProjectArtifactCache, but more like ProjectCache, where the first current implementation would invalidate records in ProjectArtifactCache, but later if new caches are introduced, the same API call would manage those caches, too.

 

---

**Affects:** 3.6.0

**Issue Links:**
- [MNG-6530](https://issues.apache.org/jira/browse/MNG-6530) Regression in ProjectBuilder when file change between invocations (introduced by MNG-6311)

- [MNG-5669](https://issues.apache.org/jira/browse/MNG-5669) same pom.xml is read multiple times

- [MNG-6311](https://issues.apache.org/jira/browse/MNG-6311) Maven intolerably slow when import scope used heavily in large project

- [MNG-7027](https://issues.apache.org/jira/browse/MNG-7027) Invalidate project cache upon changes

0 votes, 5 watchers

Contributor guide

Open the contributing guide

Research direction

Start by reading the issue links MNG-6530, MNG-5669, MNG-6311, and MNG-7027 to understand the existing project-cache behavior and related invalidation work. Then identify Maven's current Projects Artifact Cache entry point and determine how a stable public API could cover project-specific records across current and future caches. Done means the API scope and behavior are agreed and documented with appropriate Maven tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.