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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

Sylwester Lachiewicz (Jira)

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

Peter Palaga updated MNG-6767:
------------------------------
    Description:
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.

  was:
This is a regression against 3.6.1

Steps to reproduce will follow.


> 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
>            Reporter: Peter Palaga
>            Priority: Major
>
> 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.3.2#803003)