Nexus:maven存储库并行连接限制?

时间:2015-03-25 15:06:45

标签: maven nexus

我们的项目密集使用Maven3进行构建,私有Nexus(2.2版)存储库用于托管来自外部的快照构建和代理工件。它工作正常。

最近我试图用并行(-T参数)加速我们的maven构建,并且不时观察到一些随机构建失败。失败主要是由失败的依赖关系解决引起的,这在很少的并行模式下很少发生。

我的问题:它可能是由Nexus中的并行连接限制引起的吗?还是其他任何可能性?

感谢。

该版本包含20多个模块,通常需要10分钟才能完成。 这是我昨天晚上失败的原因:

00:11:11 [ERROR] Failed to execute goal on project app-common: Could not     resolve dependencies for project com.abc.sbo.occ:app-common:jar:1.3.0-SNAPSHOT: Failed to collect dependencies for [com.abc.sbo.occ:common-test:jar:1.3.0-SNAPSHOT (test), com.abc.sbo.occ:bo-frw-common:jar:1.3.0-SNAPSHOT (compile), org.apache.poi:poi:jar:3.9 (compile), org.apache.poi:poi-ooxml:jar:3.9 (compile), net.sf.jxls:jxls-core:jar:1.0.2 (compile), com.aspose.cells:aspose-cells:jar:8.2.1 (compile), junit:junit:jar:4.11 (test), org.mockito:mockito-all:jar:1.9.5 (test), nl.jqno.equalsverifier:equalsverifier:jar:1.1.3 (test), org.codehaus.sonar-plugins.java:sonar-jacoco-listeners:jar:1.2 (test)]: Failed to read artifact descriptor for commons-lang:commons-lang:jar:2.6: Could not find artifact org.apache:apache:pom:7 -> [Help 1]
00:11:11 [ERROR] 
00:11:11 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
00:11:11 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
00:11:11 [ERROR] 
00:11:11 [ERROR] For more information about the errors and possible solutions, please read the following articles:
00:11:11 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
00:11:11 [ERROR] 
00:11:11 [ERROR] After correcting the problems, you can resume the build with the command
00:11:11 [ERROR]   mvn <goals> -rf :app-common

更新:我在一天的运行后切换了-X选项并捕获了下面的堆栈跟踪。声明的缺失工件org.apache:apache:pom:7确实存在于Nexus很长一段时间。也许这表明我必须将Nexus升级到最新版本?

14:00:47 [ERROR] Failed to execute goal on project app-common: Could not resolve dependencies for project com.abc.sbo.occ:app-common:jar:1.3.0-SNAPSHOT: Failed to collect dependencies for [com.abc.sbo.occ:common-test:jar:1.3.0-SNAPSHOT (test), com.abc.sbo.occ:bo-frw-common:jar:1.3.0-SNAPSHOT (compile), org.apache.poi:poi:jar:3.9 (compile), org.apache.poi:poi-ooxml:jar:3.9 (compile), net.sf.jxls:jxls-core:jar:1.0.2 (compile), com.aspose.cells:aspose-cells:jar:8.2.1 (compile), junit:junit:jar:4.11 (test), org.mockito:mockito-all:jar:1.9.5 (test), nl.jqno.equalsverifier:equalsverifier:jar:1.1.3 (test), org.codehaus.sonar-plugins.java:sonar-jacoco-listeners:jar:1.2 (test)]: Failed to read artifact descriptor for commons-lang:commons-lang:jar:2.6: Could not find artifact org.apache:apache:pom:7 -> [Help 1]
14:00:47 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project app-common: Could not resolve dependencies for project com.abc.sbo.occ:app-common:jar:1.3.0-SNAPSHOT: Failed to collect dependencies for [com.abc.sbo.occ:common-test:jar:1.3.0-SNAPSHOT (test), com.abc.sbo.occ:bo-frw-common:jar:1.3.0-SNAPSHOT (compile), org.apache.poi:poi:jar:3.9 (compile), org.apache.poi:poi-ooxml:jar:3.9 (compile), net.sf.jxls:jxls-core:jar:1.0.2 (compile), com.aspose.cells:aspose-cells:jar:8.2.1 (compile), junit:junit:jar:4.11 (test), org.mockito:mockito-all:jar:1.9.5 (test), nl.jqno.equalsverifier:equalsverifier:jar:1.1.3 (test), org.codehaus.sonar-plugins.java:sonar-jacoco-listeners:jar:1.2 (test)]
14:00:47    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:210)
14:00:47    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:117)
14:00:47    at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:258)
14:00:47    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:201)
14:00:47    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
14:00:47    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
14:00:47    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
14:00:47    at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
14:00:47    at org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163)
14:00:47    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
14:00:47    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
14:00:47    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
14:00:47    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
14:00:47    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
14:00:47    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
14:00:47    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
14:00:47    at java.lang.Thread.run(Thread.java:722)
14:00:47 Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.abc.sbo.occ:app-common:jar:1.3.0-SNAPSHOT: Failed to collect dependencies for [com.abc.sbo.occ:common-test:jar:1.3.0-SNAPSHOT (test), com.abc.sbo.occ:bo-frw-common:jar:1.3.0-SNAPSHOT (compile), org.apache.poi:poi:jar:3.9 (compile), org.apache.poi:poi-ooxml:jar:3.9 (compile), net.sf.jxls:jxls-core:jar:1.0.2 (compile), com.aspose.cells:aspose-cells:jar:8.2.1 (compile), junit:junit:jar:4.11 (test), org.mockito:mockito-all:jar:1.9.5 (test), nl.jqno.equalsverifier:equalsverifier:jar:1.1.3 (test), org.codehaus.sonar-plugins.java:sonar-jacoco-listeners:jar:1.2 (test)]
14:00:47    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:158)
14:00:47    at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:185)
14:00:47    ... 16 more
14:00:47 Caused by: org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [com.abc.sbo.occ:common-test:jar:1.3.0-SNAPSHOT (test), com.abc.sbo.occ:bo-frw-common:jar:1.3.0-SNAPSHOT (compile), org.apache.poi:poi:jar:3.9 (compile), org.apache.poi:poi-ooxml:jar:3.9 (compile), net.sf.jxls:jxls-core:jar:1.0.2 (compile), com.aspose.cells:aspose-cells:jar:8.2.1 (compile), junit:junit:jar:4.11 (test), org.mockito:mockito-all:jar:1.9.5 (test), nl.jqno.equalsverifier:equalsverifier:jar:1.1.3 (test), org.codehaus.sonar-plugins.java:sonar-jacoco-listeners:jar:1.2 (test)]
14:00:47    at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:258)
14:00:47    at org.sonatype.aether.impl.internal.DefaultRepositorySystem.collectDependencies(DefaultRepositorySystem.java:308)
14:00:47    at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:150)
14:00:47    ... 17 more
14:00:47 Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to read artifact descriptor for commons-lang:commons-lang:jar:2.6
14:00:47    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:331)
14:00:47    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
14:00:47    at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:412)
14:00:47    at org.sonatype.aether.impl.internal.DefaultDependencyCollector.process(DefaultDependencyCollector.java:544)
14:00:47    at org.sonatype.aether.impl.internal.DefaultDependencyCollector.collectDependencies(DefaultDependencyCollector.java:240)
14:00:47    ... 19 more
14:00:47 Caused by: org.apache.maven.model.resolution.UnresolvableModelException: Could not find artifact org.apache:apache:pom:7
14:00:47    at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:126)
14:00:47    at org.apache.maven.model.building.DefaultModelBuilder.readParentExternally(DefaultModelBuilder.java:813)
14:00:47    at org.apache.maven.model.building.DefaultModelBuilder.readParent(DefaultModelBuilder.java:664)
14:00:47    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:310)
14:00:47    at org.apache.maven.model.building.DefaultModelBuilder.build(DefaultModelBuilder.java:232)
14:00:47    at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.loadPom(DefaultArtifactDescriptorReader.java:322)
14:00:47    ... 23 more
14:00:47 Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not find artifact org.apache:apache:pom:7
14:00:47    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:538)
14:00:47    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:216)
14:00:47    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:193)
14:00:47    at org.apache.maven.repository.internal.DefaultModelResolver.resolveModel(DefaultModelResolver.java:122)
14:00:47    ... 28 more
14:00:47 Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Could not find artifact org.apache:apache:pom:7
14:00:47    at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:528)
14:00:47    ... 31 more
14:00:47 [ERROR] 
14:00:47 [ERROR] 
14:00:47 [ERROR] For more information about the errors and possible solutions, please read the following articles:
14:00:47 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
14:00:47 [ERROR] 
14:00:47 [ERROR] After correcting the problems, you can resume the build with the command
14:00:47 [ERROR]   mvn <goals> -rf :app-common

0 个答案:

没有答案