简体   繁体   English

如何使用m2e-code-quality在maven-pmd插件中使用声纳PMD永久链接?

[英]How to use sonar pmd permalink in maven-pmd plugin using m2e-code-quality?

I want to use my sonar PMD configuration using the permalink, 我想通过永久链接使用声纳PMD配置,

This is the build part of my maven pom.xml 这是我的Maven pom.xml的构建部分

<build>
    <defaultGoal>install</defaultGoal>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-pmd-plugin</artifactId>
            <version>3.0.1</version>
            <configuration>
                <rulesets>
                    <ruleset>http://nemo.sonarqube.org/profiles/export?format=pmd&amp;language=java&amp;name=Nemo</ruleset>
                </rulesets>
            </configuration>
            <executions>
                <execution>
                    <id>pmd</id>
                    <goals><goal>check</goal></goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

But when i import this into my eclipse (using the m2e-code-quality plugin), I get the following error: 但是,当我将其导入我的日食(使用m2e-code-quality插件)时,出现以下错误:

java.lang.RuntimeException: Couldn't find the class White space is required between the public identifier and the system identifier. java.lang.RuntimeException:找不到类公共标识符和系统标识符之间需要空格。

How can i fix this? 我怎样才能解决这个问题?

Thanks for the help! 谢谢您的帮助!

Please try use older version of pmd plugin. 请尝试使用旧版本的Pmd插件。

Version 2.7.1 works ok for me with external link. 2.7.1版对我来说可以通过外部链接正常运行。

Here is issue for this error: http://jira.codehaus.org/browse/MPMD-174 这是此错误的问题: http : //jira.codehaus.org/browse/MPMD-174

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM