apache / apache/maven

[MNG-7591] Enhance MavenWorkspaceReader to find workspace projects

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

Description

**[Christoph Läubrich](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=laeubi)** opened **[MNG-7591](https://issues.apache.org/jira/browse/MNG-7591?redirect=false)** and commented

The org.apache.maven.repository.internal.MavenWorkspaceReader currently allows for finding a model for a given artifact.

But recently I noticed at m2eclipse (IDE extension) that when loading a maven project maven also loads all the parent projects, of course we have them in the IDE as well, so such action can lead to multiple times loading the same maven project.

I therefore like to suggest to enhance MavenWorkspaceReader with a method:

MavenProject findProject( Artifact artifact );

or just

MavenProject findProject( File pomFile );

to allow for example DefaultProjectBuilder to take this into account when loading parents.

---

**Issue Links:**
- [MNG-7496](https://issues.apache.org/jira/browse/MNG-7496) DefaultArtifactDescriptorReader.loadPom() should query the MavenWorkspaceReader first

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.