You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2021/06/26 22:37:00 UTC

[jira] [Closed] (MNG-7170) Allow to associate pomFile/${basedir} with DefaultProjectBuilder.build(ModelSource, ...)

     [ https://issues.apache.org/jira/browse/MNG-7170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov closed MNG-7170.
-------------------------------
    Fix Version/s: 3.8.2
         Assignee: Michael Osipov
       Resolution: Fixed

Fixed with [5a8997312680a4b9c69a129801524691bc546c08|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=5a8997312680a4b9c69a129801524691bc546c08] for {{maven-3.8.x}} branch.

You can remove your workaround as soon as 3.8.2 is out.

> 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
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.8.2
>
>
> 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)