You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Guillaume Nodet (Jira)" <ji...@apache.org> on 2022/10/20 08:11:01 UTC

[jira] [Updated] (MNG-6767) Plugin with ${project.groupId} resolved improperly

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

Guillaume Nodet updated MNG-6767:
---------------------------------
    Fix Version/s: 4.0.0-alpha-2

> Plugin with ${project.groupId} resolved improperly
> --------------------------------------------------
>
>                 Key: MNG-6767
>                 URL: https://issues.apache.org/jira/browse/MNG-6767
>             Project: Maven
>          Issue Type: Bug
>    Affects Versions: 3.6.2, 3.6.3
>            Reporter: Peter Palaga
>            Assignee: Michael Osipov
>            Priority: Major
>             Fix For: 3.8.2, 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> This is a regression against 3.6.1.
> If a plugin is managed and declared using
> {code:java}
> <groupId>${project.groupId}</groupId>
> <artifactId>my-plugin</artifactId>
> <version>${project.version}</version>
> {code}
> then with Maven 3.6.2 the latest version available in the local maven repo is taken instead of ${project.version}
> Steps to reproduce:
> {code:java}
> # clone the reproducer
> git clone https://github.com/ppalaga/MNG-6767.git
> cd MNG-6767
> # build the master branch using maven 3.6.1 or 3.6.2
> mvn clean install
> # es expected this installed the version 0.0.2 of the groupid-resolution-plugin to the local maven repo
> # now let's switch to the 0.0.1.x branch where the version is 0.0.1-SNAPSHOT
> git checkout -b 0.0.1.x origin/0.0.1.x
> # make sure you use Maven 3.6.2
> mvn -version
> # Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T17:06:16+02:00)
> # ...
> # build again 
> mvn clean install
> # inspect the console output: 
> # EXPECTED 
> # [INFO] --- groupid-resolution-plugin:0.0.1-SNAPSHOT:hello (hello) @ groupid-resolution-jar ---
> # [INFO] Hello from 0.0.1-SNAPSHOT
> # ACTUAL:
> # [INFO] --- groupid-resolution-plugin:0.0.2:hello (hello) @ groupid-resolution-jar ---
> # [INFO] Hello from 0.0.2
> {code}
> If the last build is repeated with Maven 3.6.1, then the output is as expected.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)