pmd jenkins插件错误类丢失:org / apache / maven / reporting / AbstractMavenReport

时间:2017-08-21 12:20:35

标签: jenkins-plugins maven-3 maven-plugin pmd

请帮助我,我尝试从jenkins执行pmd报告但是,我有一个构建错误

执行,我的目标:

当我运行mvn clean install pmd:pmd时,从项目文件夹中它的构建错误有没有人收到此错误?

我的项目Pom.xml

<dependencies>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.2</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>20.0</version>
    </dependency>
    <dependency>
        <groupId>com.puppycrawl.tools</groupId>
        <artifactId>checkstyle</artifactId>
        <version>8.1</version>
    </dependency>
</dependencies>   
<plugins>
    <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.0</version>
        <configuration>
            <encoding>UTF-8</encoding>
            <compilerVersion>1.7</compilerVersion>
            <source>1.7</source>
            <target>1.7</target>
            <verbose>false</verbose>
        </configuration>
    </plugin>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.7.2</version>
        <configuration>
            <skipTests>${skipTests}</skipTests>
        </configuration>
    </plugin>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <executions>
            <execution>
                <phase>test</phase>
                <goals>
                    <goal>resources</goal>
                    <goal>testResources</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
    </plugin>
</plugins>

我添加了这个,Jenkins插件,

Maven Integration插件 - 2.17 PMD插件 - 3.49 静态分析实用程序 - 1.92

ERROR:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-pmd-plugin:3.8:pmd (default-cli) on project SINGLE_HUB_POM: Execution default-cli of goal org.apache.maven.plugins:maven-pmd-plugin:3.8:pmd failed: Unable to load the mojo 'pmd' in the plugin 'org.apache.maven.plugins:maven-pmd-plugin:3.8'. A required class is missing: org/apache/maven/reporting/AbstractMavenReport
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.maven.plugins:maven-pmd-plugin:3.8
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/.m2/org/apache/maven/plugins/maven-pmd-plugin/3.8/maven-pmd-plugin-3.8.jar
[ERROR] urls[1] = file:/home/.m2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------: org.apache.maven.reporting.AbstractMavenReport
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

1 个答案:

答案 0 :(得分:0)

mvn clean编译包程序集:程序集安装试试这个