mvn site : java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent

摘要: Generating a Maven report with mvn site, but hits the following errors

Generating a Maven report with mvn site, but hits the following errors

java.lang.NoClassDefFoundError: org/apache/maven/doxia/siterenderer/DocumentContent
Caused by: java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  28.280 s
[INFO] Finished at: 2018-11-19T13:20:14+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project maven-static-code-analysis: Execution default-site of goal org.apache.maven.plugins:maven-site-plugin:3.3:site failed: A required class was missing while executing org.apache.maven.plugins:maven-site-plugin:3.3:site: org/apache/maven/doxia/siterenderer/DocumentContent
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-site-plugin:3.3

Tested with Maven 3.6.0

Solution

Do not use the default maven-site-plugin:3.3 plugin, upgrade it to the latest version, for example, 3.7.1

pom.xml
	<build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
            </plugin>
        </plugins>
    </build>

上一篇: Maven SpotBugs example
下一篇: Java Find the length of BigInteger?
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号