Jenkins:如何使用PMD插件分析Maven项目

时间:2013-06-25 22:46:20

标签: jenkins

我在这个问题上遇到了一个麻烦。 事实上我已经在Jenkins上安装了PMD插件;然后我修改了我的Maven Project5的pom.xml我写了这个,就像有人告诉我的那样:

<reporting>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>2.7.1</version>`enter code here`
            <configuration>
                <linkXRef>false</linkXRef>
                <targetJdk>1.6</targetJdk>
                <rulesets>
                    <ruleset>/rulesets/basic.xml</ruleset>
                </rulesets>
            </configuration>
        </plugin>
    </plugins>
</reporting>

然后我为我的Jenkins配置了PMD部件。然而,没有关于PMD的报道,也没有图片(甚至Jenkins的第一页上没有PMD的标识。)

在建立Maven项目期间,它告诉我:

[INFO] --- maven-pmd-plugin:3.0.1:pmd (default-cli) @ hello-world ---
[WARNING] Unable to locate Source XRef to link to - DISABLED
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[PMD] Finding all files that match the pattern pmd.xml
[PMD] Parsing 1 files in D:\jenkins\jobs\hello-world\workspace\target
[PMD] Successfully parsed file D:\jenkins\jobs\hello-world\workspace\target\pmd.xml of module Maven Hello World Project with 0 warnings.
[PMD] File encoding has not been set in pom.xml, using platform encoding windows-1252, i.e. build is platform dependent (see <a href="http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding">Maven FAQ</a>).
[PMD] Computing warning deltas based on reference build #15

有什么问题?

0 个答案:

没有答案