maven-site plugins 3.3 java.lang.ClassNotFoundException: org.apache.maven.doxia.siterenderer.DocumentContent

后端 未结 8 1976
感动是毒
感动是毒 2020-11-29 01:07

Since this night, maven site 3.3 plugins stop to work.

Try to delete local repository, but no change. Maven 3.3.9 java 1.8

No config or dependencies defined

相关标签:
8条回答
  • 2020-11-29 01:44

    I tried to follow Changhua's advice, and define maven-project-info-reports-plugin to version 3.0.0, and maven-site-plugin to 3.7.1 in my pom file, but found that the maven site still pulled in version 3.3 of the maven-site-plugin, regardless of how I set it.

    I finally realized that my problem had to do with our project structure. We have a parent pom, in which we were defining the maven-site-plugin dependency, which was then inherited by the children poms. However, the build pom file was separate, and didn't define maven-site-plugin at all, which allowed maven to pull in the 3.3 version on its own. I added the maven-site-plugin dependency (version 3.7.1) to the build pom file, so that it now exists in both the build pom file and the parent pom file, and now the build is correctly using version 3.7.1, and is passing again.

    0 讨论(0)
  • 2020-11-29 01:46

    Version of the maven site plugin needs to be explicitly set in the build section too. Here is the example:

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.0.0</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>licenses</report>
                            <report>dependency-info</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
    
    <build>
        <plugins>
            <!-- Part of Maven - specified version explicitly for compatibility
                 with the maven-project-info-reports-plugin 3.0.0-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.7.1</version>
            </plugin>
        </plugins>
    </build>
    
    0 讨论(0)
提交回复
热议问题