[ https://jira.codehaus.org/browse/MDEP-373?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=307536#comment-307536 ]
Sergei Ivanov commented on MDEP-373: ------------------------------------ After a subsequent re-run of CI job, when it completes successfully, the plugin outputs the following (I have reduced the output to just the direct dependency chain): {noformat} [INFO] --- maven-dependency-plugin:2.5.1:tree (display-dependency-tree) @ xxx-yyy-zzz --- [INFO] com.company:xxx-yyy-zzz:jar:3.0.1-SNAPSHOT [INFO] +- com.company:xxx-yyy-zz1:jar:3.0.16:compile [INFO] | +- com.company:aaa-bbb:jar:3.0.0:compile (version selected from constraint [3.0.0,)) {noformat} > dependency:tree sporadically fails to resolve version ranges when bound to > lifecycle > ------------------------------------------------------------------------------------ > > Key: MDEP-373 > URL: https://jira.codehaus.org/browse/MDEP-373 > Project: Maven 2.x Dependency Plugin > Issue Type: Bug > Components: tree > Affects Versions: 2.5.1 > Environment: Maven 3.0.4 > Linux 2.6.9-42.0.8.ELsmp #1 SMP Tue Jan 23 12:49:51 EST 2007 x86_64 x86_64 > GNU/Linux > Java 1.6.0_27 32bit > Jenkins 1.465 > Reporter: Sergei Ivanov > > We use version ranges for dependencies on our internal artifacts. > We also have {{dependency:tree}} goal bound to the {{verify}} phase in the > lifecycle for all our projects. That way, we can always have a quick look at > the CI build logs in order to find our what dependency versions had the > project build pulled in. > The problem is that the invocation of dependency plugin sporadically fails > with a dependency resolution exception, even though the entire build up to > the verify phase went through without issues, and it can be seen that the > artifact in question was correctly resolved by Maven from the specified > version range. > It looks like some non-deterministic ordering issue (unlikely a race > condition, because we don't run Maven in a concurrent mode). When the CI job > is re-run, the issue disappears. > Exception trace looks as follows (artifact names had to be obfuscated): > {noformat} > Waiting for Jenkins to finish collecting data > mavenExecutionResult exceptions not empty > message : Failed to execute goal > org.apache.maven.plugins:maven-dependency-plugin:2.5.1:tree > (display-dependency-tree) on project xxx-yyy-zzz: Cannot build project > dependency graph > cause : Cannot build project dependency graph > Stack trace : > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute > goal org.apache.maven.plugins:maven-dependency-plugin:2.5.1:tree > (display-dependency-tree) on project xxx-yyy-zzz: Cannot build project > dependency graph > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) > at > org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) > at > org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) > at > org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) > at > org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) > at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) > at hudson.maven.Maven3Builder.call(Maven3Builder.java:98) > at hudson.maven.Maven3Builder.call(Maven3Builder.java:64) > at hudson.remoting.UserRequest.perform(UserRequest.java:118) > at hudson.remoting.UserRequest.perform(UserRequest.java:48) > at hudson.remoting.Request$2.run(Request.java:287) > at > hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) > at java.util.concurrent.FutureTask.run(FutureTask.java:138) > at > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) > at java.lang.Thread.run(Thread.java:662) > Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot build > project dependency graph > at > org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:219) > at > org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) > at > org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) > ... 27 more > Caused by: > org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException: > Could not resolve dependencies for project > com.company:xxx-yyy-zzz:jar:3.0.1-SNAPSHOT: Failed to collect dependencies > for [com.company:xxx-yyy-zz1:jar:3.0.16 (compile), > com.company:xxx-yyy-zz2:jar:3.0.3 (compile), > net.company:connector:jar:2.6.3.B (compile), > org.slf4j:jcl-over-slf4j:jar:1.6.2 (runtime), > log4j:apache-log4j-extras:jar:1.0 (runtime), > org.springframework:spring-context:jar:3.1.1.RELEASE (compile), > junit:junit:jar:4.10 (test), org.mockito:mockito-core:jar:1.9.0 (test), > org.slf4j:slf4j-api:jar:1.6.2 (compile), org.slf4j:slf4j-log4j12:jar:1.6.2 > (runtime), log4j:log4j:jar:1.2.16 (runtime)] > at > org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder.buildDependencyGraph(Maven3DependencyGraphBuilder.java:80) > at > org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder.buildDependencyGraph(DefaultDependencyGraphBuilder.java:63) > at > org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:202) > ... 29 more > Caused by: org.apache.maven.project.DependencyResolutionException: Could not > resolve dependencies for project com.company:xxx-yyy-zzz:jar:3.0.1-SNAPSHOT: > Failed to collect dependencies for [com.company:xxx-yyy-zz1:jar:3.0.16 > (compile), com.company:xxx-yyy-zz2:jar:3.0.3 (compile), > net.company:connector:jar:2.6.3.B (compile), > org.slf4j:jcl-over-slf4j:jar:1.6.2 (runtime), > log4j:apache-log4j-extras:jar:1.0 (runtime), > org.springframework:spring-context:jar:3.1.1.RELEASE (compile), > junit:junit:jar:4.10 (test), org.mockito:mockito-core:jar:1.9.0 (test), > org.slf4j:slf4j-api:jar:1.6.2 (compile), org.slf4j:slf4j-log4j12:jar:1.6.2 > (runtime), log4j:log4j:jar:1.2.16 (runtime)] > at > org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:158) > at > org.apache.maven.shared.dependency.graph.internal.Maven3DependencyGraphBuilder.buildDependencyGraph(Maven3DependencyGraphBuilder.java:74) > ... 31 more > Caused by: org.sonatype.aether.collection.DependencyCollectionException: > Failed to collect dependencies for [com.company:xxx-yyy-zz1:jar:3.0.16 > (compile), com.company:xxx-yyy-zz2:jar:3.0.3 (compile), > net.company:connector:jar:2.6.3.B (compile), > org.slf4j:jcl-over-slf4j:jar:1.6.2 (runtime), > log4j:apache-log4j-extras:jar:1.0 (runtime), > org.springframework:spring-context:jar:3.1.1.RELEASE (compile), > junit:junit:jar:4.10 (test), org.mockito:mockito-core:jar:1.9.0 (test), > org.slf4j:slf4j-api:jar:1.6.2 (compile), org.slf4j:slf4j-log4j12:jar:1.6.2 > (runtime), log4j:log4j:jar:1.2.16 (runtime)] > at > org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258) > at > org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308) > at > org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:150) > ... 32 more > Caused by: org.sonatype.aether.resolution.VersionRangeResolutionException: No > versions available for com.company:aaa-bbb:jar:[3.0.0,) within specified range > at > org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:376) > at > org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544) > at > org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240) > ... 34 more > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira