我正在使用 maven-3.2.3 ,maven-depedency-plugin-3.0.2
所有maven-assembly-plugin-3.0.0
这些都是线程安全的,但是在使用 4 个线程运行 maven build 时
( mvn clean install -T 4
),
我断断续续地打
org.apache.maven.artifact.versioning.OverConstrainedVersionException
如果我尝试用单线程构建它,这永远不会发生,(mvn clean install
)
这是错误的堆栈跟踪
23:31:55 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:3.0.0:single (my-service-dependency-assembly) on project my-service: Failed to create assembly: Unable to resolve dependencies for assembly 'service-third-party-dependencies'
23:31:55 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
23:31:55 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
23:31:55 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
23:31:55 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
23:31:55 at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:188)
23:31:55 at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call(MultiThreadedBuilder.java:184)
23:31:55 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
23:31:55 at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
23:31:55 at java.util.concurrent.FutureTask.run(FutureTask.java:266)
23:31:55 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
23:31:55 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
23:31:55 at java.lang.Thread.run(Thread.java:745)
23:31:55 Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to create assembly: Unable to resolve dependencies for assembly 'service-third-party-dependencies'
23:31:55 at org.apache.maven.plugins.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:530)
23:31:55 at org.apache.maven.plugins.assembly.mojos.SingleAssemblyMojo.execute(SingleAssemblyMojo.java:58)
23:31:55 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
23:31:55 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
23:31:55 ... 11 more
23:31:55 Caused by: org.apache.maven.plugins.assembly.archive.ArchiveCreationException: Unable to resolve dependencies for assembly 'service-third-party-dependencies'
23:31:55 at org.apache.maven.plugins.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:204)
23:31:55 at org.apache.maven.plugins.assembly.mojos.AbstractAssemblyMojo.execute(AbstractAssemblyMojo.java:476)
23:31:55 ... 14 more
23:31:55 Caused by: org.apache.maven.plugins.assembly.artifact.DependencyResolutionException: Failed to resolve dependencies for assembly:
23:31:55 at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.resolveTransitively(DefaultDependencyResolver.java:235)
23:31:55 at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.resolve(DefaultDependencyResolver.java:118)
23:31:55 at org.apache.maven.plugins.assembly.artifact.DefaultDependencyResolver.resolveDependencySets(DefaultDependencyResolver.java:154)
23:31:55 at org.apache.maven.plugins.assembly.archive.phase.DependencySetAssemblyPhase.execute(DependencySetAssemblyPhase.java:95)
23:31:55 at org.apache.maven.plugins.assembly.archive.DefaultAssemblyArchiver.createArchive(DefaultAssemblyArchiver.java:181)
23:31:55 ... 15 more
23:31:55 Caused by: org.apache.maven.artifact.versioning.OverConstrainedVersionException: No versions are present in the repository for the artifact with a range [13.0.0,14.0.999)
com.mygroup.group:my-artifact:jar:null