Closed NoSugarCoffee closed 2 years ago
Looking at the error messages, the issues seem to be specific to the projects you build and there is perhaps not much to improve in mvnd. You may want to read this blog post and follow the suggestions mentioned there https://peter.palaga.org/2021/01/12/mvnd-solving-common-issues-of-parallel-builds.html
To check whether issues have to do with mvnd building in parallel by default, you may want to try serial build mvnd -1
and see whether the serial build will pass.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:report (report) on project jacoco-maven-plugin: Execution report of goal org.apache.maven.plugins:maven-plugin-plugin:3.6.0:report failed: A required class was missing wh
Also, you may want to verify if the problem comes from maven by using mvn clean verify -T 1C
to ensure the problem actually comes from mvnd
.
For jacoco, the problem is a missing dependency. The build also fails with mvn clean verify -T 1C
because the dependency between org.jacoco.agent
and org.jacoco.agent.rt
is not explicit in the pom. It works in non concurrent build because of the module ordering.
The sonar build works for me.
@gnodet @ppalaga Thanks,really help me a lot
@gnodet Did you try mvnd clean compile
or mvnd clean test
rather than verify
and install
for sonar. Although I know verify
also run compile
and test
phases, but it stable reproduce for me.
@NoSugarCoffee good catch !
The mvnd -1 clean compile -e
on the sonar project gives
[ERROR] java.nio.file.NoSuchFileException: /Users/gnodet/tmp/sonar-java/jdt/target/classes
java.lang.RuntimeException: java.nio.file.NoSuchFileException: /Users/gnodet/tmp/sonar-java/jdt/target/classes
at org.mvndaemon.mvnd.cache.impl.TimestampCacheFactory$FileState.<init>(TimestampCacheFactory.java:65)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:177)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at org.mvndaemon.mvnd.cache.impl.TimestampCacheFactory$Record.currentFileStates(TimestampCacheFactory.java:110)
at org.mvndaemon.mvnd.cache.impl.TimestampCacheFactory$Record.<init>(TimestampCacheFactory.java:101)
at org.mvndaemon.mvnd.cache.impl.TimestampCacheFactory$TimestampCache.put(TimestampCacheFactory.java:145)
at org.mvndaemon.mvnd.cache.invalidating.InvalidatingProjectArtifactsCache.put(InvalidatingProjectArtifactsCache.java:216)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:149)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:301)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:265)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:196)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:160)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.DaemonMavenCli.execute(DaemonMavenCli.java:825)
at org.apache.maven.cli.DaemonMavenCli.doMain(DaemonMavenCli.java:244)
at org.apache.maven.cli.DaemonMavenCli.main(DaemonMavenCli.java:222)
at org.mvndaemon.mvnd.daemon.Server.handle(Server.java:573)
at org.mvndaemon.mvnd.daemon.Server.client(Server.java:262)
at org.mvndaemon.mvnd.daemon.Server.accept(Server.java:230)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.nio.file.NoSuchFileException: /Users/gnodet/tmp/sonar-java/jdt/target/classes
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:149)
at java.base/java.nio.file.Files.readAttributes(Files.java:1764)
at org.mvndaemon.mvnd.cache.impl.TimestampCacheFactory$FileState.<init>(TimestampCacheFactory.java:61)
... 35 common frames omitted
I try to use mvnd recently. Have some problems.
First one
I build https://github.com/jacoco/jacoco/tree/v0.8.6 with
mvnd clean verify
but failled with errors following,mvn clean verify
succeedlogs
Second one
I build https://github.com/SonarSource/sonar-java/tree/6.7.0.23054 with
mvnd clean compile
but failed with errors following,mvnd clean verify
andmvn clean compile
succeed