Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.6.2, 3.6.3
-
None
-
None
Description
This is a regression against 3.6.1.
If a plugin is managed and declared using
<groupId>${project.groupId}</groupId> <artifactId>my-plugin</artifactId> <version>${project.version}</version>
then with Maven 3.6.2 the latest version available in the local maven repo is taken instead of ${project.version}
Steps to reproduce:
# 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
If the last build is repeated with Maven 3.6.1, then the output is as expected.
Attachments
Issue Links
- is fixed by
-
MNG-6983 Plugin key can get out of sync with artifactId and groupId
- Closed