forked from phoedos/pmd
Fixed bug 1943204 - Ant task: <ruleset> path should be relative to Ant basedir
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6442 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
parent
39e59dd02f
commit
69ff09410a
@ -1,6 +1,7 @@
|
||||
???? - 4.2.4:
|
||||
|
||||
Fixed bug 1481051 - false + UnusedNullCheckInEquals (and other false positives too)
|
||||
Fixed bug 1943204 - Ant task: <ruleset> path should be relative to Ant basedir
|
||||
|
||||
August 31, 2008 - 4.2.3:
|
||||
|
||||
|
@ -340,6 +340,18 @@ public class PMDTask extends Task {
|
||||
ruleSetFiles = getNestedRuleSetFiles();
|
||||
}
|
||||
|
||||
// convert relative paths and substitute env variables/properties
|
||||
final StringBuffer sb = new StringBuffer();
|
||||
for(String s: ruleSetFiles.split(",")) {
|
||||
Path p = new Path(getProject());
|
||||
p.setPath(getProject().replaceProperties(s));
|
||||
if (sb.length() > 0) {
|
||||
sb.append(',');
|
||||
}
|
||||
sb.append(p);
|
||||
}
|
||||
ruleSetFiles = sb.toString();
|
||||
|
||||
if (!targetJDK.equals("1.3") && !targetJDK.equals("1.4") && !targetJDK.equals("1.5") && !targetJDK.equals("1.6") && !targetJDK.equals("1.7") && !targetJDK.equals("jsp")) {
|
||||
throw new BuildException("The targetjdk attribute, if used, must be set to either '1.3', '1.4', '1.5', '1.6', '1.7' or 'jsp'");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user