apache / apache/maven

[MNG-7496] DefaultArtifactDescriptorReader.loadPom() should query the MavenWorkspaceReader first

Open
#9,121 2 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-7496](https://issues.apache.org/jira/browse/MNG-7496?redirect=false)** and commented

Now WorkspaceReaders work in extensions and while I develop a basic implementation in Tycho I noticed that I get asked for a pom, but not for the model first.

The reason is that DefaultArtifactDescriptorReader.loadPom() do not query the workspace reader but always resolves the pom artifact and then reads the pom file. But afterwards, it do query the maven reader and use the model there.

I don't know if there is an need to download the pom always (but not use it...), at least in my case it requires me to write the model to disk (with possibly incomplete content as I only get the pom artifact, but not the actual artifact the model is searched for) to make maven happy or I'll get nasty:

[WARNING] The POM for ... is missing, no dependency information available

My idea would be, to simply first as the WSR for the model and if it is present do not perform any actions or, at least ask the WSR first before fail and issue a warning...

---

**Affects:** 3.8.6

**Issue Links:**
- [MNG-7591](https://issues.apache.org/jira/browse/MNG-7591) Enhance MavenWorkspaceReader to find workspace projects

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.