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/08/17 22:22:00 UTC

[jira] [Assigned] (MNG-7218) org.apache.maven.model.Build.getSourceDirectory() incorrectly returns absolute dir on 3.8.2

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

Michael Osipov reassigned MNG-7218:
-----------------------------------

    Assignee: Michael Osipov

> org.apache.maven.model.Build.getSourceDirectory() incorrectly returns absolute dir on 3.8.2
> -------------------------------------------------------------------------------------------
>
>                 Key: MNG-7218
>                 URL: https://issues.apache.org/jira/browse/MNG-7218
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.8.2
>         Environment: Maven core jars 3.8.2 (works with 3.8.1 or prior)
> Maven resolver jars 1.7.1
> Mac OS X 10.15.7 
> Java 8
>            Reporter: Alex Miller
>            Assignee: Michael Osipov
>            Priority: Major
>              Labels: regression
>             Fix For: 3.8.3
>
>
> I have some existing code that started returning an absolute directory from org.apache.maven.model.Build.getSourceDirectory() in 3.8.2 (vs 3.8.1). This is an unexpected breaking change in behavior and contradicts the javadoc which says: "The path given is relative to the project descriptor."
> I am building the model from a pom.xml on disk. I am setting "project.basedir" property to "." and loading the FileModelSource "./pom.xml".
> When I build the model and get the Build.getSourceDirectory() it returned "src/main/java" on 3.8.1 and prior versions.
> In 3.8.2 it now returns "/Users/me/code/mvn-dir-resolution/./src/main/java".
> I created a reproducible runnable case here:
> [https://github.com/puredanger/mvn-dir-resolution]
>  
> I suspect this is related to the change in MNG-7170, but don't know for certain.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)