[ https://issues.apache.org/jira/browse/MRESOLVER-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17047198#comment-17047198 ]
William Leung edited comment on MRESOLVER-98 at 2/28/20 4:29 AM: ----------------------------------------------------------------- Still not works after updated resolver to 1.4.1 & resolver-provider to 3.6.3 {code:xml} // pom.xml <project> ... ... <properties> <resolverVersion>1.4.1</resolverVersion> <mavenVersion>3.6.3</mavenVersion> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.maven.resolver</groupId> <artifactId>maven-resolver-api</artifactId> <version>${resolverVersion}</version> </dependency> ... ... <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-resolver-provider</artifactId> <version>${mavenVersion}</version> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.apache.maven.resolver</groupId> <artifactId>maven-resolver-ant-tasks</artifactId> <version>1.2.0</version> </dependency> </dependencies> </project> {code} {code:bash} mvn dependency:tree {code} {noformat} [INFO] my.ci:my-ci-maven-resolver:pom:{{snapshot-version}} [INFO] \- org.apache.maven.resolver:maven-resolver-ant-tasks:jar:1.2.0:compile [INFO] +- org.apache.maven.resolver:maven-resolver-api:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-util:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-impl:jar:1.4.1:compile [INFO] | +- org.apache.maven.resolver:maven-resolver-spi:jar:1.4.1:compile [INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile [INFO] +- org.apache.maven.resolver:maven-resolver-connector-basic:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-transport-classpath:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-transport-file:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-transport-http:jar:1.4.1:compile [INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile [INFO] | | \- commons-codec:commons-codec:jar:1.10:compile [INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile [INFO] | \- org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime [INFO] +- org.slf4j:slf4j-nop:jar:1.7.25:runtime [INFO] +- org.apache.maven:maven-resolver-provider:jar:3.6.3:compile [INFO] | +- org.apache.maven:maven-model:jar:3.6.3:compile [INFO] | +- org.apache.maven:maven-model-builder:jar:3.6.3:compile [INFO] | | +- org.apache.maven:maven-artifact:jar:3.6.3:compile [INFO] | | \- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.4:compile [INFO] | +- org.apache.maven:maven-repository-metadata:jar:3.6.3:compile [INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.2.1:compile [INFO] | \- javax.inject:javax.inject:jar:1:compile [INFO] +- org.apache.maven:maven-settings-builder:jar:3.5.0:compile [INFO] | +- org.apache.maven:maven-builder-support:jar:3.5.0:compile [INFO] | +- org.apache.maven:maven-settings:jar:3.5.0:compile [INFO] | +- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile [INFO] | | \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile [INFO] | \- org.apache.commons:commons-lang3:jar:3.5:compile [INFO] +- org.codehaus.plexus:plexus-interpolation:jar:1.25:compile [INFO] \- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.3:compile [INFO] \- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile {noformat} {code:xml} // build.xml <project> ... <target name="test"> <resolver:resolve> <dependencies> <pom file="../maven/resolver/pom.xml"/> </dependencies> <path refid="cp" /> <properties prefix="dep." /> </resolver:resolve> <echo message="prop1: ${org.apache.maven.resolver:maven-resolver-api:jar}"/> <echo message="prop2: ${dep.org.apache.maven.resolver:maven-resolver-api:jar}"/> <echo message="cp: ${toString:cp}" /> </target> </project> {code} {code:bash} ant test {code} {noformat} test: [resolver:resolve] Resolving artifacts [echo] prop1: .../.m2/repository/org/apache/maven/resolver/maven-resolver-api/1.4.1/maven-resolver-api-1.4.1.jar [echo] prop2: .../.m2/repository/org/apache/maven/resolver/maven-resolver-api/1.3.3/maven-resolver-api-1.3.3.jar [echo] cp: .../.m2/repository/org/apache/maven/resolver/maven-resolver-api/1.3.3/maven-resolver-api-1.3.3.jar:... {noformat} what ever the default property ${org.apache.maven.resolver:maven-resolver-api:jar} is correct but the resolved properties with prefix and paths still incorrect pointed to artifacts that not override by dependencyManagement was (Author: william-leung): Still not works after updated resolver to 1.4.1 & resolver-provider to 3.6.3 {code:xml} // pom.xml <project> ... ... <properties> <resolverVersion>1.4.1</resolverVersion> <mavenVersion>3.6.3</mavenVersion> </properties> <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.maven.resolver</groupId> <artifactId>maven-resolver-api</artifactId> <version>${resolverVersion}</version> </dependency> ... ... <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-resolver-provider</artifactId> <version>${mavenVersion}</version> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.apache.maven.resolver</groupId> <artifactId>maven-resolver-ant-tasks</artifactId> <version>1.2.0</version> </dependency> </dependencies> </project> {code} {code:bash} mvn dependency:tree {code} {noformat} [INFO] my.ci:my-ci-maven-resolver:pom:{{snapshot-version}} [INFO] \- org.apache.maven.resolver:maven-resolver-ant-tasks:jar:1.2.0:compile [INFO] +- org.apache.maven.resolver:maven-resolver-api:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-util:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-impl:jar:1.4.1:compile [INFO] | +- org.apache.maven.resolver:maven-resolver-spi:jar:1.4.1:compile [INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile [INFO] +- org.apache.maven.resolver:maven-resolver-connector-basic:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-transport-classpath:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-transport-file:jar:1.4.1:compile [INFO] +- org.apache.maven.resolver:maven-resolver-transport-http:jar:1.4.1:compile [INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.6:compile [INFO] | | \- commons-codec:commons-codec:jar:1.10:compile [INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile [INFO] | \- org.slf4j:jcl-over-slf4j:jar:1.7.25:runtime [INFO] +- org.slf4j:slf4j-nop:jar:1.7.25:runtime [INFO] +- org.apache.maven:maven-resolver-provider:jar:3.6.3:compile [INFO] | +- org.apache.maven:maven-model:jar:3.6.3:compile [INFO] | +- org.apache.maven:maven-model-builder:jar:3.6.3:compile [INFO] | | +- org.apache.maven:maven-artifact:jar:3.6.3:compile [INFO] | | \- org.eclipse.sisu:org.eclipse.sisu.inject:jar:0.3.4:compile [INFO] | +- org.apache.maven:maven-repository-metadata:jar:3.6.3:compile [INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.2.1:compile [INFO] | \- javax.inject:javax.inject:jar:1:compile [INFO] +- org.apache.maven:maven-settings-builder:jar:3.5.0:compile [INFO] | +- org.apache.maven:maven-builder-support:jar:3.5.0:compile [INFO] | +- org.apache.maven:maven-settings:jar:3.5.0:compile [INFO] | +- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile [INFO] | | \- org.sonatype.plexus:plexus-cipher:jar:1.4:compile [INFO] | \- org.apache.commons:commons-lang3:jar:3.5:compile [INFO] +- org.codehaus.plexus:plexus-interpolation:jar:1.25:compile [INFO] \- org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.3.3:compile [INFO] \- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile {noformat} {code:xml} // build.xml <project> ... <target name="test"> <resolver:resolve> <dependencies> <pom file="../maven/resolver/pom.xml"/> </dependencies> <path refid="cp" /> <properties prefix="dep." /> </resolver:resolve> <echo message="prop1: ${org.apache.maven.resolver:maven-resolver-api:jar}"/> <echo message="prop2: ${dep.org.apache.maven.resolver:maven-resolver-api:jar}"/> <echo message="cp: ${toString:cp}" /> </target> </project> {code} {code:bash} ant test {code} {noformat} test: [resolver:resolve] Resolving artifacts [echo] prop1: .../.m2/repository/org/apache/maven/resolver/maven-resolver-api/1.4.1/maven-resolver-api-1.4.1.jar [echo] prop2: .../.m2/repository/org/apache/maven/resolver/maven-resolver-api/1.3.3/maven-resolver-api-1.3.3.jar [echo] cp: .../.m2/repository/org/apache/maven/resolver/maven-resolver-api/1.3.3/maven-resolver-api-1.3.3.jar:... {noformat} what ever the default property ${org.apache.maven.resolver:maven-resolver-api:jar} is correct but stetted properties with prefix and paths still incorrect pointed to artifacts that not override by dependencyManagement > resolver ant task doesn't appear to obey dependencyManagement > ------------------------------------------------------------- > > Key: MRESOLVER-98 > URL: https://issues.apache.org/jira/browse/MRESOLVER-98 > Project: Maven Resolver > Issue Type: Bug > Components: ant tasks > Affects Versions: ant-tasks-1.2.0 > Reporter: Jay Kahrman > Priority: Major > Fix For: waiting-for-feedback > > > We have a dependency in our pom which has dependencies that don't specify an > upper bound to the version range. To avoid getting different versions in > every build we use a dependencyManagement section in the POM to lock down the > version. This works via the maven 3 CLI, and via the old ant-tasks utility we > were using (). The maven-resolver-ant-tasks jar doesn't appear to obey the > dependencyManagement section, however. > > I'm not sure is this is related to MRESOLVER-33 and/or MRESOLVER-10 and if > updating maven-resolver-ant-tasks to depend on Maven Resolver 1.4.0 would > solve the problem. > -- This message was sent by Atlassian Jira (v8.3.4#803005)