diff --git a/pmd/bin/bgastviewer.bat b/pmd/bin/bgastviewer.bat index ea9f406e61..7cf9ad7d57 100644 --- a/pmd/bin/bgastviewer.bat +++ b/pmd/bin/bgastviewer.bat @@ -1 +1 @@ -java -cp ../build;../lib/asm-3.0.jar;../lib/pmd-3.8.jar;../lib/xercesImpl-2.6.2.jar;../lib/xmlParserAPIs-2.6.2.jar;../lib/jaxen-1.1-beta-10.jar net.sourceforge.pmd.util.viewer.Viewer +java -cp ../build;../lib/asm-3.0.jar;../lib/pmd-3.8.jar;../lib/jaxen-1.1-beta-10.jar net.sourceforge.pmd.util.viewer.Viewer diff --git a/pmd/bin/bgastviewer.sh b/pmd/bin/bgastviewer.sh index 7f06b9b38b..56313e304c 100755 --- a/pmd/bin/bgastviewer.sh +++ b/pmd/bin/bgastviewer.sh @@ -1 +1 @@ -java -cp ../build:../lib/asm-3.0.jar:../lib/pmd-3.8.jar:../lib/xercesImpl-2.6.2.jar:../lib/xmlParserAPIs-2.6.2.jar:../lib/jaxen-1.1-beta-10.jar net.sourceforge.pmd.util.viewer.Viewer +java -cp ../build:../lib/asm-3.0.jar:../lib/pmd-3.8.jar:../lib/jaxen-1.1-beta-10.jar net.sourceforge.pmd.util.viewer.Viewer diff --git a/pmd/bin/build.xml b/pmd/bin/build.xml index fd120f794d..313e456a86 100644 --- a/pmd/bin/build.xml +++ b/pmd/bin/build.xml @@ -14,8 +14,6 @@ - - diff --git a/pmd/bin/designer.bat b/pmd/bin/designer.bat index 137b5b0322..c7569d58cb 100644 --- a/pmd/bin/designer.bat +++ b/pmd/bin/designer.bat @@ -1 +1 @@ -java -cp ../build;../lib/asm-3.0.jar;../lib/pmd-3.8.jar;../lib/xercesImpl-2.6.2.jar;../lib/xmlParserAPIs-2.6.2.jar;../lib/jaxen-1.1-beta-10.jar net.sourceforge.pmd.util.designer.Designer +java -cp ../build;../lib/asm-3.0.jar;../lib/pmd-3.8.jar;../lib/jaxen-1.1-beta-10.jar net.sourceforge.pmd.util.designer.Designer diff --git a/pmd/bin/scp.bat b/pmd/bin/scp.bat index a3fae58eab..52ad117147 100755 --- a/pmd/bin/scp.bat +++ b/pmd/bin/scp.bat @@ -8,8 +8,6 @@ set CLASSPATH=../build/ set CLASSPATH=%CLASSPATH%;../ set CLASSPATH=%CLASSPATH%;../lib/asm-3.0.jar set CLASSPATH=%CLASSPATH%;../lib/jaxen-1.1-beta-10.jar -set CLASSPATH=%CLASSPATH%;../lib/xercesImpl-2.6.2.jar -set CLASSPATH=%CLASSPATH%;../lib/xmlParserAPIs-2.6.2.jar set CLASSPATH=%CLASSPATH%;c:\javacc2.1\bin\lib\JavaCC.zip set CLASSPATH=%CLASSPATH%;c:\ant\lib\ant.jar set CLASSPATH=%CLASSPATH%;c:\ant\lib\junit.jar diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index b0931f8fe2..110ec26fba 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -21,7 +21,8 @@ Applied patch 1583167 - Better test code management. Internal JUnits can now be Implemented RFE 1566313 - Command Line now takes minimumpriority attribute to filter out rulesets PMD now requires JDK 1.4 to run - PMD will still analyze code from earlier JDKs -- PMD now uses the built-in JDK 1.4 regex utils vs Jakarta ORO +- PMD now uses the built-in JDK 1.4 regex utils vs Jakarta ORO +- PMD now uses the JDK javax.xml APIs rather than being hardcoded to use Xalan SummaryHTML Report changes from Brent Fisher - now contains linePrefix to support source output from javadoc using "linksource" Fixed CSVRenderer - had flipped line and priority columns Fixed bug in Ant task - CSV reports were being output as text. diff --git a/pmd/etc/doing_the_next_pmd_release.txt b/pmd/etc/doing_the_next_pmd_release.txt index 41a018cae5..c788428d7c 100644 --- a/pmd/etc/doing_the_next_pmd_release.txt +++ b/pmd/etc/doing_the_next_pmd_release.txt @@ -33,7 +33,7 @@ cp ../LICENSE.txt changelog.txt ~/tmp/pmd-3.8/etc cd ../bin/ cp pmd.* cygwin-run.sh build.xml cpd.sh cpdgui.bat designer.* ~/tmp/pmd-3.8/bin cd ../etc/ -cp ../lib/pmd-3.8.jar ../lib/asm-3.0.jar ../lib/xmlParserAPIs-2.6.2.jar ../lib/xercesImpl-2.6.2.jar ../lib/jaxen-1.1-beta-10.jar ~/tmp/pmd-3.8/lib/ +cp ../lib/pmd-3.8.jar ../lib/asm-3.0.jar ../lib/jaxen-1.1-beta-10.jar ~/tmp/pmd-3.8/lib/ mkdir ~/tmp/pmd-3.8/etc/xslt cp xslt/*.xslt xslt/*.js xslt/*.gif xslt/*.css ~/tmp/pmd-3.8/etc/xslt/ cp -R ../target/docs ~/tmp/pmd-3.8 diff --git a/pmd/lib/xercesImpl-2.6.2.jar b/pmd/lib/xercesImpl-2.6.2.jar deleted file mode 100644 index f0fb0e89bf..0000000000 Binary files a/pmd/lib/xercesImpl-2.6.2.jar and /dev/null differ diff --git a/pmd/lib/xmlParserAPIs-2.6.2.jar b/pmd/lib/xmlParserAPIs-2.6.2.jar deleted file mode 100644 index 2dd8377144..0000000000 Binary files a/pmd/lib/xmlParserAPIs-2.6.2.jar and /dev/null differ diff --git a/pmd/project.xml b/pmd/project.xml index 39ddde943b..61d8cf8219 100644 --- a/pmd/project.xml +++ b/pmd/project.xml @@ -213,18 +213,8 @@ asm - 3.0_rc1 + 3.0 - - xerces - xercesImpl - 2.6.2 - - - xerces - xmlParserAPIs - 2.6.2 - diff --git a/pmd/src/net/sourceforge/pmd/ast/SimpleNode.java b/pmd/src/net/sourceforge/pmd/ast/SimpleNode.java index 34445d12b3..387a28b12e 100644 --- a/pmd/src/net/sourceforge/pmd/ast/SimpleNode.java +++ b/pmd/src/net/sourceforge/pmd/ast/SimpleNode.java @@ -5,12 +5,15 @@ import net.sourceforge.pmd.dfa.IDataFlowNode; import net.sourceforge.pmd.jaxen.Attribute; import net.sourceforge.pmd.jaxen.DocumentNavigator; import net.sourceforge.pmd.symboltable.Scope; -import org.apache.xerces.dom.DocumentImpl; +//import org.apache.xerces.dom.DocumentImpl; import org.jaxen.BaseXPath; import org.jaxen.JaxenException; import org.w3c.dom.Document; import org.w3c.dom.Element; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.ParserConfigurationException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -231,9 +234,15 @@ public abstract class SimpleNode implements Node { } public Document asXml() { - Document document = new DocumentImpl(); - appendElement(document); - return document; + try { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db = dbf.newDocumentBuilder(); + Document document = db.newDocument(); + appendElement(document); + return document; + } catch (ParserConfigurationException pce) { + throw new RuntimeException(pce); + } } protected void appendElement(org.w3c.dom.Node parentNode) { diff --git a/pmd/src/net/sourceforge/pmd/util/designer/Designer.java b/pmd/src/net/sourceforge/pmd/util/designer/Designer.java index 1bf6b1f96b..160863eede 100644 --- a/pmd/src/net/sourceforge/pmd/util/designer/Designer.java +++ b/pmd/src/net/sourceforge/pmd/util/designer/Designer.java @@ -20,8 +20,6 @@ import net.sourceforge.pmd.jsp.ast.JspCharStream; import net.sourceforge.pmd.jsp.ast.JspParser; import net.sourceforge.pmd.util.NumericConstants; import net.sourceforge.pmd.util.StringUtil; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; import org.jaxen.BaseXPath; import org.jaxen.JaxenException; import org.jaxen.XPath; @@ -630,11 +628,14 @@ public class Designer implements ClipboardOwner { * @throws java.io.IOException */ private String getXmlString(SimpleNode node) throws IOException { +/* StringWriter writer = new StringWriter(); XMLSerializer xmlSerializer = new XMLSerializer(writer, new OutputFormat("XML", "UTF-8", true)); xmlSerializer.asDOMSerializer(); xmlSerializer.serialize(node.asXml()); return writer.toString(); +*/ + return "FIXME"; // FIXME } public void lostOwnership(Clipboard clipboard, Transferable contents) { diff --git a/pmd/xdocs/integrations.xml b/pmd/xdocs/integrations.xml index 47d9e55cfe..0e7eb8dd3c 100644 --- a/pmd/xdocs/integrations.xml +++ b/pmd/xdocs/integrations.xml @@ -348,8 +348,8 @@ selecting the "Ask for Directory" checkbox.

  • Expand the Tools branch (if not already) by clicking on the '+' directly to its left.
  • In the expanded list, select PMD directory. This changes the right side of this dialog to the "tool" form.
  • In the "tool" form, enter these parameters:
      -
    • Parameters: -classpath D:\java\pmd-3.8\lib\pmd-3.8.jar;D:\java\pmd-3.8\lib\asm-3.0.jar;D:\java\pmd-3.8\lib\jaxen-1.1-beta-10.jar;D:\java\pmd-3.8\lib\xmlParserAPIs-2.6.2.jar; D:\java\pmd-3.8\lib\xercesImpl-2.6.2.jar net.sourceforge.pmd.PMD $FileDir net.sourceforge.pmd.renderers.TextPadRenderer E:\directory\my_pmd_ruleset.xml -debug -
      (Eliminate the spaces following both 'jaxen-1.1-beta-10.jar;' and 'xmlParserAPIs-2.6.2.jar;' and 'asm-3.0.jar;'. They are there to prevent the text from exceeding the right side of your screen)
    • +
    • Parameters: -classpath D:\java\pmd-3.8\lib\pmd-3.8.jar;D:\java\pmd-3.8\lib\asm-3.0.jar;D:\java\pmd-3.8\lib\jaxen-1.1-beta-10.jar net.sourceforge.pmd.PMD $FileDir net.sourceforge.pmd.renderers.TextPadRenderer E:\directory\my_pmd_ruleset.xml -debug +
      (Eliminate the spaces following both 'jaxen-1.1-beta-10.jar;' and 'asm-3.0.jar;'. They are there to prevent the text from exceeding the right side of your screen)
    • Initial Folder: $FileDir
    • Save all documents first: Checked
    • Capture output: Checked
    • diff --git a/pmd/xdocs/running.xml b/pmd/xdocs/running.xml index 639ab9bd55..67951d685e 100644 --- a/pmd/xdocs/running.xml +++ b/pmd/xdocs/running.xml @@ -31,8 +31,7 @@ C:\tmp\pmd-3.8\pmd\bin>
    • If you are want to run PMD without the batch file, you can do a:
    • -C:\data\pmd\pmd>java -cp lib\pmd-3.8.jar;lib\xercesImpl-2.6.2.jar; - lib\xmlParserAPIs-2.6.2.jar;lib\jaxen-1.1-beta-10.jar;lib\asm-3.0.jar +C:\data\pmd\pmd>java -cp lib\pmd-3.8.jar;lib\jaxen-1.1-beta-10.jar;lib\asm-3.0.jar net.sourceforge.pmd.PMD c:\j2sdk1.4.1_01\src\java\lang xml rulesets/imports.xml