Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 89543 invoked from network); 30 Nov 2002 14:32:21 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 30 Nov 2002 14:32:21 -0000 Received: (qmail 28015 invoked by uid 97); 30 Nov 2002 14:33:23 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 27999 invoked by uid 97); 30 Nov 2002 14:33:22 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 27987 invoked by uid 98); 30 Nov 2002 14:33:21 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: Sun, 1 Dec 2002 01:39:02 +1100 From: Jeff Turner To: ant-dev@jakarta.apache.org Subject: [PATCH] XMLCatalog testcase fix Message-ID: <20021130143902.GB846@expresso.localdomain> Mail-Followup-To: ant-dev@jakarta.apache.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="qDbXVdCdHGoSgWSk" Content-Disposition: inline User-Agent: Mutt/1.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Poking around the XMLCatalog stuff, I've found: - The external catalog support isn't tested when 'build.sh test' is run, because resolver.jar isn't in the test classpath. - Even though there is no external catalog support, the 'xmlvalidate.xml' test script still works, because it is designed to pass whether or not support is present. - If support is added, the script breaks because the referenced file, src/etc/testcases/taskdefs/optional/xml/catalog does not exist. Attached is a small patch which creates the missing catalog file, and makes manual runs more interesting: [jakarta-ant ~/src/etc/testcases/taskdefs/optional]$ ~/dist/bin/ant -f xmlvalidate.xml Buildfile: xmlvalidate.xml testValidate: Apache resolver library found, xml-commons resolver will be used [xmlvalidate] 1 file(s) have been successfully validated. testDeepValidate: testValidate: Apache resolver library found, xml-commons resolver will be used [xmlvalidate] 1 file(s) have been successfully validated. xmlcatalog: Apache resolver library found, xml-commons resolver will be used [xmlvalidate] 1 file(s) have been successfully validated. xmlcatalognested: Apache resolver library found, xml-commons resolver will be used [xmlvalidate] 1 file(s) have been successfully validated. xmlcatalogfiles: Apache resolver library found, xml-commons resolver will be used [xmlvalidate] 1 file(s) have been successfully validated. testSchemaGood: [xmlvalidate] 1 file(s) have been successfully validated. testIso2022Jp: [xmlvalidate] 1 file(s) have been successfully validated. testGoodUns: BUILD SUCCESSFUL Total time: 4 seconds And while I was at it, those messages about which resolver is used get rather annoying, and are only useful when debugging, so the second patch turns their logging level down to MSG_DEBUG. --Jeff --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="catalogtestfixes.patch" Index: src/etc/testcases/taskdefs/optional/xmlvalidate.xml =================================================================== RCS file: /home/cvspublic/jakarta-ant/src/etc/testcases/taskdefs/optional/xmlvalidate.xml,v retrieving revision 1.8 diff -u -r1.8 xmlvalidate.xml --- src/etc/testcases/taskdefs/optional/xmlvalidate.xml 27 Nov 2002 16:38:56 -0000 1.8 +++ src/etc/testcases/taskdefs/optional/xmlvalidate.xml 30 Nov 2002 13:45:21 -0000 @@ -1,5 +1,10 @@ - + + + + @@ -49,7 +54,7 @@ - + Index: src/etc/testcases/taskdefs/optional/xml/catalog =================================================================== RCS file: src/etc/testcases/taskdefs/optional/xml/catalog diff -N src/etc/testcases/taskdefs/optional/xml/catalog --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ src/etc/testcases/taskdefs/optional/xml/catalog 30 Nov 2002 13:45:21 -0000 @@ -0,0 +1 @@ +PUBLIC "-//stevo//DTD doc 1.0//EN" "doc.dtd" --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="lesslogging.patch" Index: src/main/org/apache/tools/ant/types/XMLCatalog.java =================================================================== RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/types/XMLCatalog.java,v retrieving revision 1.17 diff -u -r1.17 XMLCatalog.java --- src/main/org/apache/tools/ant/types/XMLCatalog.java 8 Nov 2002 09:53:21 -0000 1.17 +++ src/main/org/apache/tools/ant/types/XMLCatalog.java 30 Nov 2002 13:43:40 -0000 @@ -769,7 +769,7 @@ public InternalResolver() { log("Apache resolver library not found, internal resolver will be used", - Project.MSG_INFO); + Project.MSG_DEBUG); } public InputSource resolveEntity(String publicId, @@ -911,7 +911,7 @@ } log("Apache resolver library found, xml-commons resolver will be used", - Project.MSG_INFO); + Project.MSG_DEBUG); } public InputSource resolveEntity(String publicId, --qDbXVdCdHGoSgWSk Content-Type: text/plain; charset=us-ascii -- To unsubscribe, e-mail: For additional commands, e-mail: --qDbXVdCdHGoSgWSk--