Maven site build error

When I run "mvn install site-deploy" recently in the build, I get the following error continuously. I can’t understand what happened as I replaced m2 repo and tried some clean builds. Can someone give me a hint where I can find a solution. I tried to search, but could not face something meaningful. Thanks.

FATAL ERROR] org.apache.maven.plugins.site.SiteMojo#execute() caused a linkage error (java.lang.NoClassDefFoundError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven-site-plugin:2.0-beta-7] ...... [FATAL ERROR] Container realm = plexus.core ....... [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] org/apache/maven/plugin/logging/Log org.apache.maven.plugin.logging.Log [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.NoClassDefFoundError: org/apache/maven/plugin/logging/Log at org.codehaus.mojo.emma.EmmaReportMojo.canGenerateReport(EmmaReportMojo.java:319) at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.filterReports(AbstractSiteRenderingMojo.java:177) at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:81) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) 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.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: java.lang.ClassNotFoundException: org.apache.maven.plugin.logging.Log at java.net.URLClassLoader$1.run(URLClassLoader.java:200) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195) at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255) at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214) at java.lang.ClassLoader.loadClass(ClassLoader.java:252) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) ... 21 more 

Version Information: jdk1.6.0_14, Apache-Maven-2.1.0

+6
maven-2
source share
4 answers

We just ran into this problem though with org.apache.felix: maven-bundle-plugin.

Our problem is that we did not specify the version of the plugin inside pom.xml:

 <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> </plugin> 

Everything was good and good, and everything worked with (then) the latest version of the plugin, i.e. 2.3.4.

However, when the new version of the plugin became available in the external Maven repository (version 2.3.5), we received the following error:

 ... [FATAL ERROR] org.apache.felix.bundleplugin.BundlePlugin#execute() caused a linkage error (java.lang.NoSuchMethodError) and may be out-of-date. Check the realms: [FATAL ERROR] Plugin realm = app0.child-container[org.apache.felix:maven-bundle-plugin:2.3.5] ... 

We solved this problem by explicitly specifying the plugin version inside our pom.xml:

 <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>2.3.4</version> </plugin> 

Hope this helps.

+2
source share

I see that you are using the Emma report. Perhaps this is a dependency problem in this plugin. The missing class should be in the maven-plugin-api artifact.

Try commenting on the Emma report first, if that helps to try using the antoher version of this plugin or fix it by adding the appropriate dependency to your pom - in your case maven-plugin-api.

+1
source share

First, if possible, use the latest version of Maven ( 2.2.1 ), its super-pom will contain new versions that can solve your problem. Then try to force update the plugin using cpu ie:

mvn -cpu site

If you use snapshots, also add -U . Finally, if you freeze plugin versions in your project, try updating them. If all else fails, take a look at the effective pom ( mvn help: effective-pom ) to see which versions of the bing are used, and then google for errors

+1
source share

This one should work with Maven 2.1.0 (even if updating would be a good idea). Try using a newer version of the plugin in your POM by explicitly setting the version (you should still use the fixed version):

 <project> ... <build> <!-- To define the plugin version in your parent POM --> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <!-- Lock down plugin version for build reproducibility --> <version>2.0.1</version> </plugin> ... </plugins> </pluginManagement> <!-- To use the plugin goals in your POM or parent POM --> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> </plugin> ... </plugins> </build> ... </project> 
+1
source share

All Articles