[
https://issues.apache.org/jira/browse/MNG-7170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17361585#comment-17361585
]
Mickael Istria commented on MNG-7170:
-------------------------------------
Patch
[https://github.com/apache/maven/commit/5cdb8332f99a36e5a1da202da43e3c7dfbb49322]
for MNG-5669 has fixed that for master/Maven 4.
I tried to apply it to maven-3.8.1 but it seems to have important dependencies
on some major Maven 4 commits; so it seems tricky to backport it fully. So I've
just reincorporate the related changes, added a test and submitted a PR for the
maven-3.8.x branch: https://github.com/apache/maven/pull/478
> Allow to associate pomFile/${basedir} with
> DefaultProjectBuilder.build(ModelSource, ...)
> ----------------------------------------------------------------------------------------
>
> Key: MNG-7170
> URL: https://issues.apache.org/jira/browse/MNG-7170
> Project: Maven
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.8.1
> Reporter: Mickael Istria
> Priority: Major
>
> In LemMinX-Maven Language Server for pom.xml files, we're building models
> from "working copy" (unsaved) pom files. We do so by invoking
> {code}DefaultProjectBuilder.build( ModelSource modelSource,
> ProjectBuildingRequest request ){code}
> One pitfall is that this cascades to pomFile being null for the Model, and as
> a result {code}${basedir}{code} is not resolved.
> One could expect that the {code}ModelSource2.getLocationURI(){code} could be
> used to derive the pomFile when possible. LemMinX-Maven happens to properly
> set this.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)