[ https://issues.apache.org/jira/browse/MNG-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17149534#comment-17149534 ]
Stephanie Wang edited comment on MNG-6950 at 7/1/20, 4:00 PM: -------------------------------------------------------------- [~michael-o] How is the link answering the question? This [line|https://github.com/apache/maven/blob/65ec04c2363b16d08b760fe7e494b56b347bffee/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml#L93] shows that the version of maven-dependency-plugin as still 2.8. The new feature that introduces `(optional)` flag is not available in v2.8, it is in v3.1.2. Perhaps we need to make a PR to update maven-depnendency-plugin version as stated in [this issue|https://issues.apache.org/jira/browse/MNG-6893]? Please let us know. was (Author: stephaniewang526): [~michael-o] How is the link answering the question? This [line|https://github.com/apache/maven/blob/65ec04c2363b16d08b760fe7e494b56b347bffee/maven-model-builder/src/main/resources/org/apache/maven/model/pom-4.0.0.xml#L93] shows that the version of maven-dependency-plugin as still 2.8. The new feature that introduces `(optional)` flag is not available in v2.8, it is in v3.1.2. Could you verify that this change will indeed address our problem? > Outdated version of maven-dependency-plugin in Maven 3.6.3 > ---------------------------------------------------------- > > Key: MNG-6950 > URL: https://issues.apache.org/jira/browse/MNG-6950 > Project: Maven > Issue Type: Bug > Components: core, Dependencies, Inheritance and Interpolation > Affects Versions: 3.6.3 > Environment: Java 11.0.7; Maven 3.6.3; Linux > Reporter: Nuoyu Yang > Priority: Major > Attachments: Screenshot 2020-06-30 at 4.25.31 PM.png > > > When I run "mvn dependency:tree" with maven 3.6.3 to view the dependency > hierarchy of the project currently being built, the result shows that the > version of maven-dependency-plugin is 2.8. > For example, I have a pom.xml file like this: > > {code:java} > <project xmlns="http://maven.apache.org/POM/4.0.0" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 > http://maven.apache.org/xsd/maven-4.0.0.xsd"> > <modelVersion>4.0.0</modelVersion> > <groupId>org.codehaus.mojo.flatten.its</groupId> > <artifactId>test</artifactId> > <version>0.0.1-SNAPSHOT</version> > <dependencies> > <dependency> > <groupId>junit</groupId> > <artifactId>junit</artifactId> > <version>4.13</version> > </dependency> > </dependencies> > </project> > {code} > When I run "mvn dependency:tree", the result is as follows: > !Screenshot 2020-06-30 at 4.25.31 PM.png|width=699,height=302! > It shows that the maven-dependency-plugin version is 2.8. > I have checked the org.apache:apache:23 where the maven-dependency-plugin is > managed and the its version is defined as 3.1.1. But the output of > dependency:tree shows the version is 2.8. So I think it is not an updating > issue but a bug. -- This message was sent by Atlassian Jira (v8.3.4#803005)