在sourceforge上PMD彬5.0.0下载任何规则集或basic.xml [英] No ruleset or basic.xml in the sourceforge pmd-bin-5.0.0 download
问题描述
我一直在读遍 PMD网站它具有所有这些的引用以<规则REF =规则集/ basic.xml / UnnecessaryConversionTemporary/>
但我不能找到无论是在 PMD文件
或 basic.xml
-bin-5.0.0 PMD-斌-5.0-α
从目录的 sourceforge上。
I've been reading all over the PMD Website and it has all these references to <rule ref="rulesets/basic.xml/UnnecessaryConversionTemporary"/>
but I cant find the file basic.xml
in either the pmd-bin-5.0.0
or pmd-bin-5.0-alpha
directory downloaded from sourceforge.
正如你在我下面提供的屏幕转储看,我做这个 basic.xml
搜索,并想出了空手而归。
As you can see in the screen dump I've provided below, I've done a search for this basic.xml
and came up empty handed.
在下一屏幕截图 PMD斌-5.0.0
没有文件夹,名为规则集
In the next screen shot of pmd-bin-5.0.0
there is no folder called ruleset
链接到ruleset.xml的(在24小时内到期)的
Pastebin link to ruleset.xml (Expires in 24 hours)
<property name="pmd.dir" value="${basedir}/pmd" /><!-- directory that contains pmd.jar -->
<property name="pmd.test.results" location="${build.dir}/pmd"/>
<path id="pmd.lib" >
<fileset dir="${pmd.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="pmd" depends="compile" >
<taskdef name="pmd" classname="net.sourceforge.pmd.ant.PMDTask" classpathref="pmd.lib"/>
<pmd shortFilenames="true">
<ruleset>basic,imports</ruleset>
<formatter type="text" toFile="pmd-ant-results.txt"/>
<fileset dir="src">
<include name="**/*.java"/>
</fileset>
</pmd>
</target>
在执行我的Ant脚本它与此错误回来
When my ant script is executed it comes back with this error
[pmd] net.sourceforge.pmd.RuleSetNotFoundException: Can't find resource rulesets/basic.xml. Make sure the resource is a valid file or URL or is on the CLASSPATH.
BUILD FAILED
C:\Users\Michael\Desktop\log4jassignment.s06005586\build.xml:131: java.lang.RuntimeException: Couldn't find the class Can't find resource rulesets/basic.xml. Make sure the resource is a valid file or URL or is on the CLASSPATH.
Project Explorer中
Project Explorer
所以这告诉我, basic.xml
文件不来自于 PMD-5.0.0.jar
文件,但实际上是来自其他地方,因此,我的问题是什么是PMD的 basic.xml
,以及其他所需的XML文件(我怎么目的是让内容我的手在他们)?或者说这些文件不存在,我是打算重新创建它们自己(如果我是,我将如何去这样做?)?
So that tells me that the basic.xml
file doesn't come from the pmd-5.0.0.jar
file but in fact comes from somewhere else, Thus my question is what is the contents of pmd's basic.xml
, and other required xml files (how am I meant to get my hands on them)? or do these files not exist and am I meant to recreate them myself (and if I am, how would I go about doing this?)?
推荐答案
我下载 pmd-bin-5.0-alpha.zip
来自的 PMD网站。
一旦你解压缩 pmd-bin-5.0-alpha.zip
文件;
去 LIB
目录内,
尝试提取 PMD-5.0 alpha.jar的含量
。
Once you unzip pmd-bin-5.0-alpha.zip
file;
go inside the lib
directory and
try to extract the content of pmd-5.0-alpha.jar
.
我能找到以下:
这篇关于在sourceforge上PMD彬5.0.0下载任何规则集或basic.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!