运行“mvn site”的问题

时间:2011-06-23 17:42:50

标签: java maven-2

当我尝试运行“mvn site”生命周期时,我收到以下错误

WARNING] The POM for org.apache.maven.plugins:maven-site-plugin:jar:2.0.1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.084s
[INFO] Finished at: Thu Jun 23 18:36:17 IST 2011
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:2.0.1:site (default-site) on project store-service-impl: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:2.0.1:site failed: Unable to load the mojo 'site' in the plugin 'org.apache.maven.plugins:maven-site-plugin:2.0.1'. A required class is missing: org/apache/maven/doxia/module/xhtml/decoration/render/RenderingContext
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-site-plugin:2.0.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/don/workspace/WTP_REPOSITORYQA_DM/WTP/Repository/org/apache/maven/plugins/maven-site-plugin/2.0.1/maven-site-plugin-2.0.1.jar
[ERROR] urls[1] = file:/Users/don/workspace/WTP_REPOSITORYQA_DM/WTP/Repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 4
[ERROR] import: Entry[import org.codehaus.plexus.util.xml.pull.XmlSerializer from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.util.xml.pull.XmlPullParserException from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.util.xml.pull.XmlPullParser from realm ClassRealm[plexus.core, parent: null]]
[ERROR] import: Entry[import org.codehaus.plexus.util.xml.Xpp3Dom from realm ClassRealm[plexus.core, parent: null]]

我尝试使用3.0-beta-3版本的网站插件,但我得到了类似的结果。我不知道从哪里开始,所以任何帮助都会非常感激

1 个答案:

答案 0 :(得分:2)

看起来你在doxia 1.0中遇到了一个错误,你使用的是一个非常旧版本的maven网站插件,它依赖于这个有缺陷的doxia版本。

尝试将maven-site-plugin的版本指定为2.3。