Version of parent POM may not be respected mvn 3.3.3 to resolve properties

This seems like a regression error in mvn, but I just wanted to confirm by not making an explicit error.

Suppose I have a project structure, for example:

foo-parent 0.0.1-SNAPSHOT
   -> foo-common 0.0.1-SNAPSHOT (parent is foo-parent 0.0.1-SNAPSHOT)
   -> foo-business 0.0.1-SNAPSHOT (parent is foo-parent 0.0.1-SNAPSHOT)

Say that I have a property defined in foo-parent( 0.0.1-SNAPSHOT) as

<foo.bar.version>abc</foo.bar.version>

When checking the effective pom (using mvn-3.2.1) for foo-business, it correctly shows foo.bar.version:

>mvn help:effective-pom -f foo-business/pom.xml | grep "foo.bar.version"
<foo.bar.version>abc</foo.bar.version>

Then I installed these artifacts in my local repo (for the next steps of reproducing errors).

Now, if I made changes to the property foo-parentand its version before0.0.2-SNAPSHOT

foo-parent 0.0.2-SNAPSHOT
   -> foo-common 0.0.1-SNAPSHOT (parent is foo-parent 0.0.1-SNAPSHOT -- picked from local repo)
   -> foo-business 0.0.1-SNAPSHOT (parent is foo-parent 0.0.1-SNAPSHOT -- picked from local repo)

defined in foo-parent( 0.0.2-SNAPSHOT) as

<foo.bar.version>xyz</foo.bar.version>

By checking the effective pom again (using mvn-3.2.1) for foo-business, it correctly shows foo.bar.version:

>mvn help:effective-pom -f foo-business/pom.xml | grep "foo.bar.version"
<foo.bar.version>abc</foo.bar.version>

, , mvn-3.3.3, , , pom (0.0.1-SNAPSHOT), (../foo-parent).

>mvn333 help:effective-pom -f foo-business/pom.xml | grep "foo.bar.version"
<foo.bar.version>xyz</foo.bar.version>

, . , , ? , .

@https://github.com/kilokahn/maven-testers/tree/master/foo-parent

!

+4
1

MNG-5840, @khmarbaise. , apache-maven-3.3.9. @khmarbaise

0

Source: https://habr.com/ru/post/1615073/


All Articles