Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JaCoCo Build fails with Maven 3.8.2 #1218

Closed
marchof opened this issue Sep 6, 2021 · 4 comments · Fixed by #1229
Closed

JaCoCo Build fails with Maven 3.8.2 #1218

marchof opened this issue Sep 6, 2021 · 4 comments · Fixed by #1229
Assignees
Labels
component: build type: bug 🐛 Something isn't working
Milestone

Comments

@marchof
Copy link
Member

marchof commented Sep 6, 2021

Since Maven 3.8.2 the JaCoCo build fails with the following error:

org.apache.maven.lifecycle.LifecycleExecutionException: 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 while executing org.apache.maven.plugins:maven-plugin-plugin:3.6.0:report: org/jacoco/report/check/IViolationsOutput

Therefore the Azure CI breaks, see for example PR #1217.

@marchof marchof added type: bug 🐛 Something isn't working component: build labels Sep 6, 2021
@Godin Godin self-assigned this Sep 6, 2021
@marchof
Copy link
Member Author

marchof commented Sep 6, 2021

Relevant stack trace probably is:

Caused by: java.lang.ClassNotFoundException: org.jacoco.report.check.IViolationsOutput
    at java.net.URLClassLoader.findClass (URLClassLoader.java:471)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:589)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:522)
    at java.lang.ClassLoader.defineClass1 (Native Method)
    at java.lang.ClassLoader.defineClass (ClassLoader.java:1017)
    at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:174)
    at java.net.URLClassLoader.defineClass (URLClassLoader.java:550)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:458)
    at java.net.URLClassLoader$1.run (URLClassLoader.java:452)
    at java.security.AccessController.doPrivileged (Native Method)
    at java.net.URLClassLoader.findClass (URLClassLoader.java:451)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:589)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:522)
    at java.lang.Class.forName0 (Native Method)
    at java.lang.Class.forName (Class.java:398)
    at org.apache.maven.tools.plugin.generator.GeneratorUtils.isMavenReport (GeneratorUtils.java:699)
    at org.apache.maven.tools.plugin.generator.PluginXdocGenerator.writeReportNotice (PluginXdocGenerator.java:240)
    at org.apache.maven.tools.plugin.generator.PluginXdocGenerator.writeBody (PluginXdocGenerator.java:188)
    at org.apache.maven.tools.plugin.generator.PluginXdocGenerator.processMojoDescriptor (PluginXdocGenerator.java:138)
    at org.apache.maven.tools.plugin.generator.PluginXdocGenerator.execute (PluginXdocGenerator.java:113)
    at org.apache.maven.plugin.plugin.PluginReport.generateMojosDocumentation (PluginReport.java:423)
    at org.apache.maven.plugin.plugin.PluginReport.executeReport (PluginReport.java:272)
    at org.apache.maven.reporting.AbstractMavenReport.generate (AbstractMavenReport.java:255)
    at org.apache.maven.reporting.AbstractMavenReport.execute (AbstractMavenReport.java:143)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    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.MavenCli.execute (MavenCli.java:972)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

@Godin
Copy link
Member

Godin commented Sep 9, 2021

For me seems that this might be related to the following issue described in Maven 3.8.2 release notes

Known Issues

  • If any of your plugin mojos spawns new threads there might be a change in class loading as a result of the fix for MNG-6843. See discussion with a possible fix for your plugin mojo as well as a potential general fix in MNG-7212.

@rfscholte @olamy could you please help - am I right? and so we'll have to wait fix of MNG-7212 before will be able to use Maven versions newer than 3.8.1?

@marchof meanwhile I propose to use Maven 3.8.1 for CI builds - #1221

@rfscholte
Copy link

I would have the same guess

@Godin
Copy link
Member

Godin commented Oct 5, 2021

@rfscholte Thanks!

And while MNG-7212 wasn't yet resolved, seems that Maven 3.8.3 solves the issue that we encountered with 3.8.2 - #1229 👍 ❤️ which I guess is related to resolution of MNG-7251

@Godin Godin added this to Candidates in Current work items via automation Oct 5, 2021
@Godin Godin moved this from Candidates to Done in Current work items Oct 5, 2021
@Godin Godin added this to the 0.8.8 milestone Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build type: bug 🐛 Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

3 participants