maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alix Lourme (JIRA)" <j...@codehaus.org>
Subject [jira] (MPMD-204) CPD report : Required class was missing : org/w3c/dom/ElementTraversal
Date Mon, 09 Feb 2015 15:35:19 GMT
Alix Lourme created MPMD-204:
--------------------------------

             Summary: CPD report : Required class was missing : org/w3c/dom/ElementTraversal
                 Key: MPMD-204
                 URL: https://jira.codehaus.org/browse/MPMD-204
             Project: Maven PMD Plugin
          Issue Type: Bug
          Components: CPD
    Affects Versions: 3.4, 3.3
         Environment: Maven 3.2.3
            Reporter: Alix Lourme


Hi, 

Since _maven-pmd-plugin_ v3.3, on a simple pom : 
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<project...>
    <modelVersion>4.0.0</modelVersion>
    <groupId>test</groupId>
    <artifactId>test</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.4</version>
            </plugin>
        </plugins>
    </reporting>
</project>
{code}

Command _mvn site_ gives : 
{quote}
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing
while executing org.apache.maven.plugins:maven-site-plugin:3.3:site: org/w3c/dom/ElementTraversal
{quote}

Stack : 
{code}
Caused by: java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
	at java.lang.ClassLoader.defineClass1(Native Method)
	[...]
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
	at org.apache.xerces.jaxp.DocumentBuilderImpl.newDocument(Unknown Source)
	at net.sourceforge.pmd.cpd.XMLRenderer.createDocument(XMLRenderer.java:50)
	at net.sourceforge.pmd.cpd.XMLRenderer.render(XMLRenderer.java:73)
	at org.apache.maven.plugin.pmd.CpdReport.writeNonHtml(CpdReport.java:301)
	at org.apache.maven.plugin.pmd.CpdReport.executeCpd(CpdReport.java:260)
	at org.apache.maven.plugin.pmd.CpdReport.executeCpdWithClassloader(CpdReport.java:195)
	at org.apache.maven.plugin.pmd.CpdReport.canGenerateReport(CpdReport.java:170)
	[...]
	at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:121)
	[...]
Caused by: java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
	at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
	[...]
	at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
	[...]
{code}

----

Adding this override fix the problem, but could introduce some impacts on other report plugins
:
{code:xml}
<build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.4</version>
                    <dependencies>
                        <dependency>
                            <groupId>xml-apis</groupId>
                            <artifactId>xml-apis</artifactId>
                            <version>1.4.01</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
{code}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Mime
View raw message