updating to pmd-3.9

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4920 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Radim Kubacki
2007-01-05 16:59:08 +00:00
parent aba82176ff
commit 4f2cc27c9d
11 changed files with 56 additions and 26 deletions

View File

@ -1,3 +1,5 @@
- Updated pmd to version 3.9
Version 1.8.1
- Now it is only tested with NB5.5 and development builds
- Reflecting changes in NB trunk (http://www.netbeans.org/issues/show_bug.cgi?id=87929)

View File

@ -2,9 +2,9 @@
<import file="nbproject/build-impl.xml"/>
<property name="pmd.jar" value="pmd-3.8.jar"/>
<property name="pmd.jar" value="pmd-3.9.jar"/>
<property name="nb.version" value="netbeans55"/>
<property name="VERSION" value="1.8.1"/>
<property name="VERSION" value="1.9"/>
<property file="build.ant.properties"/>
@ -31,8 +31,10 @@
<copy todir="${cluster}/modules/ext">
<fileset dir="lib">
<include name="${pmd.jar}"/>
<include name="jakarta-oro-2.0.8.jar"/>
<include name="asm-3.0.jar"/>
<include name="backport-util-concurrent.jar"/>
<include name="jaxen-1.1-beta-10.jar"/>
<include name="lib/jakarta-oro-2.0.8.jar"/>
</fileset>
</copy>
</target>
@ -49,7 +51,9 @@
<include name="libsrc/**/*"/>
<include name="lib/${pmd.jar}"/>
<include name="lib/jaxen-1.1-beta-10.jar"/>
<include name="lib/jakarta-oro-2.0.8.jar"/>
<include name="lib/asm-3.0.jar"/>
<include name="lib/jakarta-oro-2.0.8.jar"/>
<include name="backport-util-concurrent.jar"/>
</zipfileset>
<zipfileset dir="." fullpath="pmd-${nb.version}-${VERSION}/pmd.nbm" includes="build/pmd.nbm"/>
</zip>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,5 +1,5 @@
Manifest-Version: 1.0
OpenIDE-Module-Specification-Version: 1.8.1
OpenIDE-Module-Specification-Version: 1.9
Created-By: Ole-Martin Mørk and Gunnlaugur Þór Briem, Radim Kubacki, Tomasz Slota
OpenIDE-Module: pmd
OpenIDE-Module-Layer: pmd/mf-layer.xml

View File

@ -1,5 +1,5 @@
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=b02625f3
nbproject/build-impl.xml.data.CRC32=6a5bcde4
nbproject/build-impl.xml.script.CRC32=209b78c0
nbproject/build-impl.xml.stylesheet.CRC32=3f8b4615

View File

@ -1,6 +1,8 @@
extra.module.files=\
modules/ext/jaxen-1.1-beta-10.jar \
modules/ext/pmd-3.8.jar \
modules/ext/pmd-3.9.jar \
modules/ext/backport-util-concurrent.jar \
modules/ext/asm-3.0.jar \
modules/ext/jakarta-oro-2.0.8.jar \
modules/ext/nbpmdrules.jar
javac.compilerargs=-Xlint:unchecked

View File

@ -8,17 +8,25 @@
<standalone/>
<class-path-extension>
<!-- Deployed path, relative to dir containing module: -->
<runtime-relative-path>ext/jakarta-oro-2.0.8.jar</runtime-relative-path>
<runtime-relative-path>ext/asm-3.0.jar</runtime-relative-path>
<!-- Path of library in your own sources, relative to project basedir: -->
<binary-origin>lib/jakarta-oro-2.0.8.jar</binary-origin>
<binary-origin>lib/asm-3.0.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/backport-util-concurrent.jar</runtime-relative-path>
<binary-origin>lib/backport-util-concurrent.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/jaxen-1.1-beta-10.jar</runtime-relative-path>
<binary-origin>lib/jaxen-1.1-beta-10.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/pmd-3.8.jar</runtime-relative-path>
<binary-origin>lib/pmd-3.8.jar</binary-origin>
<runtime-relative-path>ext/jakarta-oro-2.0.8.jar</runtime-relative-path>
<binary-origin>lib/jakarta-oro-2.0.8.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/pmd-3.9.jar</runtime-relative-path>
<binary-origin>lib/pmd-3.9.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<!-- Deployed path, relative to dir containing module: -->
@ -188,7 +196,7 @@
<public-packages/>
<extra-compilation-unit>
<package-root>libsrc</package-root>
<classpath>lib/pmd-3.8.jar</classpath>
<classpath>lib/pmd-3.9.jar</classpath>
<built-to>build/libclasses</built-to>
<built-to>${cluster}/modules/ext/nbpmdrules.jar</built-to>
</extra-compilation-unit>

View File

@ -28,6 +28,9 @@ package pmd.config;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
@ -176,20 +179,31 @@ public abstract class ConfigUtils {
ErrorManager.getDefault().notify(e);
}
}
Iterator<String> rulesets = settings.getRuleSets().iterator();
while( rulesets.hasNext() ) {
String ruleSetXml = rulesets.next();
try {
RuleSet ruleset = ruleSetFactory.createRuleSet(
new FileInputStream( ruleSetXml ),
// PENDING: perhaps can get ClassLoader from Lookup
new RuleClassLoader( ConfigUtils.class.getClassLoader() ) );
list.addAll( ruleset.getRules() );
}
catch( RuntimeException e ) {
ErrorManager.getDefault().notify(e);
}
}
Iterator<String> rulesets = settings.getRuleSets().iterator();
while( rulesets.hasNext() ) {
String ruleSetXml = rulesets.next();
try {
Method m = RuleSetFactory.class.getDeclaredMethod("createRuleSet", InputStream.class, ClassLoader.class);
m.setAccessible(true);
Object o = m.invoke(ruleSetFactory, new FileInputStream( ruleSetXml ),
new RuleClassLoader(ConfigUtils.class.getClassLoader()));
RuleSet ruleset = (RuleSet)o;
/*
RuleSet ruleset = ruleSetFactory.createRuleSet(
new FileInputStream( ruleSetXml ),
new RuleClassLoader( ConfigUtils.class.getClassLoader() ) );
*/
list.addAll( ruleset.getRules() );
} catch( RuntimeException e ) {
ErrorManager.getDefault().notify(e);
} catch (NoSuchMethodException e) {
ErrorManager.getDefault().notify(e);
} catch (IllegalAccessException e) {
ErrorManager.getDefault().notify(e);
} catch (InvocationTargetException e) {
ErrorManager.getDefault().notify(e);
}
}
}
catch( FileNotFoundException e ) {
throw new RuntimeException( e.getMessage() );