[ 
https://issues.apache.org/jira/browse/MRESOLVER-98?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17025436#comment-17025436
 ] 

Kapil Somani commented on MRESOLVER-98:
---------------------------------------

Hi [~michael-o], I tried rebuilding resolver task with resolverVersion updated 
to 1.4.0 (from 1.3.3)

I'm getting below test failure

{{testResolveArtifact:}}

 

{{1580241309555 Using remote repository central 
(https://repo1.maven.org/maven2/, default, releases)}}

{{1580241309555 Collecting dependencies}}

{{15125 [{color:#FF0000}*ERROR*{color}] *Tests* *run: 6*, Failures: 0, *Errors: 
3*, Skipped: 0, Time elapsed: 1.457 s *<<< {color:#FF0000}FAILURE{color}!* - in 
org.apache.maven.resolver.internal.ant.*ReactorTest*}}

{{15125 [{color:#FF0000}*ERROR*{color}] 
testResolveVersionRange(org.apache.maven.resolver.internal.ant.ReactorTest)  
Time elapsed: 1.37 s  <<< ERROR!}}

{{org.apache.tools.ant.BuildException: java.lang.ClassCastException: 
java.lang.NoClassDefFoundError cannot be cast to java.lang.Exception}}

{{ at 
org.apache.maven.resolver.internal.ant.ReactorTest.testResolveVersionRange(ReactorTest.java:95)}}

{{Caused by: java.lang.ClassCastException: java.lang.NoClassDefFoundError 
cannot be cast to java.lang.Exception}}

{{ at 
org.apache.maven.resolver.internal.ant.ReactorTest.testResolveVersionRange(ReactorTest.java:95}})

 

 

 

 

I then skipped tests to create artifact 
_maven-resolver-ant-tasks-1.2.1-SNAPSHOT.jar_ to include it in my build.xml

{color:#FF0000}{{BUILD FAILED}}{color}

{{/sandbox/ksomani/workspaces/scheduler/build.xml:135: 
java.lang.NoClassDefFoundError: 
org/apache/maven/resolver/internal/ant/org/eclipse/aether/internal/impl/CacheUtils}}

{{ }}

{{Total time: 0 seconds}}

 

Where build.xml:135 reads:

{{131 <taskdef uri="antlib:org.apache.maven.resolver.ant"
        resource="org/apache/maven/resolver/ant/antlib.xml"
        classpathref="maven.resolver.ant.jar" />}}

{{135 <resolver:pom file="pom.xml" id="scheduler.pom"/>}}

{{136   <resolver:localrepo dir="${maven-localrepo}"/>}}

 

 

 

 

 

{{Answering the question you posed for [~jkahrman], here is the pom.xml we are 
using}}

 

{{<?xml version="1.0" encoding="UTF-8"?>}}

{{<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";>}}

*{{..[SNIP]..}}*

{{<properties>}}

{{        <guava.version>27.1-jre</guava.version>}}

{{        <ec.version>9.2.0</ec.version>}}

{{</properties>}}

{{*..[SNIP]..*}}

{{</dependencies>}}

{{<dependencyManagement>}}

{{        <dependencies>}}

{{            <!--}}

{{                lock down mapdb's unbounded dependencies}}

{{                these can be removed once mapdb is upgraded to a version 
that}}

{{                specifies an upper bound on the versions it depends upon}}

{{             -->}}

{{            <dependency>}}

{{                <groupId>com.google.guava</groupId>}}

{{                <artifactId>guava</artifactId>}}

{{                <version>${guava.version}</version>}}

{{            </dependency>}}

{{            <dependency>}}

{{                <groupId>org.eclipse.collections</groupId>}}

{{                <artifactId>eclipse-collections-api</artifactId>}}

{{                <version>${ec.version}</version>}}

{{            </dependency>}}

{{            <dependency>}}

{{                <groupId>org.eclipse.collections</groupId>}}

{{                <artifactId>eclipse-collections</artifactId>}}

{{                <version>${ec.version}</version>}}

{{            </dependency>}}

{{            <dependency>}}

{{                <groupId>org.eclipse.collections</groupId>}}

{{                <artifactId>eclipse-collections-forkjoin</artifactId>}}

{{                <version>${ec.version}</version>}}

{{            </dependency>}}

{{            <!-- end mapdb dependency lock down -->}}

{{        </dependencies>}}

{{    </dependencyManagement>}}

{{</project>}}

 

 

 

 

Please let me know if you need more details

 

Thanks 

> 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)

Reply via email to