maven-dependency-plugin icon indicating copy to clipboard operation
maven-dependency-plugin copied to clipboard

[MDEP-892] go-offline does not correctly resolve overridden properties

Open jira-importer opened this issue 2 years ago • 2 comments

Arnout Engelen opened MDEP-892 and commented

When a project shares a parent pom with a dependency, and overrides a property of that parent pom, this is not picked up by {}dependency:go-offline{}.

I have shared a reproducer at https://codeberg.org/raboof/maven-property-resolution . The scenario is one and other-mod both have parent pom other-parent. other-parent specifies version 7.4 of a dependency, but one overrides this to 7.3. Other plugins (including mvn dependency:tree) pick 7.3 in this scenario, but mvn dependency:go-offline downloads version 7.4.

It seems https://github.com/apache/maven-dependency-plugin/pull/2 (unmerged) fixed this, but its successor https://github.com/apache/maven-dependency-plugin/pull/135 (unmerged) does not.

An alternative is to use https://github.com/qaware/go-offline-maven-plugin instead.


Affects: 3.6.1

jira-importer avatar Nov 03 '23 18:11 jira-importer

Karl Heinz Marbaise commented

Can you tell which versions of the maven-dependency-plugin you are exactly using .. and JDK + Maven version.. unfortunately I can figure out that based on the example project...

jira-importer avatar Nov 05 '23 19:11 jira-importer

Arnout Engelen commented

Apologies for being unclear, I just updated the reproducer to pin the version to the latest release, 3.6.1, and it still shows the problem.

 

I tested with maven 3.9.5 and JDK 19.0.2

jira-importer avatar Nov 14 '23 11:11 jira-importer