Maven Site Plugin失败:无法访问java.util.EnumSet.elementType

时间:2012-10-11 22:08:33

标签: java java-ee maven-2 xstream maven-site-plugin

我使用maven网站插件版本2.2和XStream版本1.3.1。当我这样做时,

mvn site:stage -DstagingDirectory=C:\

总是失败

[INFO] Trace
com.thoughtworks.xstream.XStream$InitializationException: Could not instatiate converter : com.thoughtworks.xstream.converters.enums.EnumSetConverter : null
        at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:651)
        at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:620)
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:371)
        at com.thoughtworks.xstream.XStream.<init>(XStream.java:316)
        at org.codehaus.mojo.dashboard.report.plugin.DashBoardUtils.saveXMLDashBoardReport(DashBoardUtils.java:995)
        at org.codehaus.mojo.dashboard.report.plugin.DashBoardReportMojo.executeReport(DashBoardReportMojo.java:282)
        at org.apache.maven.reporting.AbstractMavenReport.generate(AbstractMavenReport.java:98)
        at org.apache.maven.plugins.site.ReportDocumentRenderer.renderDocument(ReportDocumentRenderer.java:161)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.renderModule(DefaultSiteRenderer.java:330)
        at org.apache.maven.doxia.siterenderer.DefaultSiteRenderer.render(DefaultSiteRenderer.java:134)
        at org.apache.maven.plugins.site.SiteMojo.renderLocale(SiteMojo.java:154)
        at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:118)
        at org.apache.maven.plugins.site.SiteStageMojo.execute(SiteStageMojo.java:112)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:599)
        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.reflect.InvocationTargetException
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:41)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:515)
        at com.thoughtworks.xstream.XStream.dynamicallyRegisterConverter(XStream.java:644)
        ... 31 more
Caused by: java.lang.RuntimeException: Could not access java.util.EnumSet.elementType field
        at com.thoughtworks.xstream.core.util.Fields.find(Fields.java:18)
        at com.thoughtworks.xstream.converters.enums.EnumSetConverter.<init>(EnumSetConverter.java:31)
        ... 36 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25 seconds
[INFO] Finished at: Thu Oct 11 17:01:09 CDT 2012
[INFO] Final Memory: 118M/249M
[INFO] ------------------------------------------------------------------------

我在这里做错了什么。我试图使用XStream版本1.2.2而没有任何运气

1 个答案:

答案 0 :(得分:1)

来自Dashboard Maven Plugin的异常失败。尝试使用不同版本。