cd /tmp && ant -f .../build.xml -Dtestcase='org.apache.tools.ant.types.XMLCatalogTest' test fails: junit.framework.AssertionFailedError: Empty catalog should return input with a system ID like file:/.../i/dont/exist.dtd but was tmp/i/dont/exist.dtd at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at org.apache.tools.ant.types.XMLCatalogTest.testEmptyCatalog(XMLCatalogTest.java:94) junit.framework.AssertionFailedError: Nonexistent Catalog entry return input with a system ID like file:/tmp/file:/.../i/dont/exist.dtd but was tmp/i/dont/exist.dtd at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at org.apache.tools.ant.types.XMLCatalogTest.testNonExistentEntry(XMLCatalogTest.java:139) In XMLCatalog.resolve, getCatalogResolver() is an ExternalCatalog and resolving a relative path with a null base is done against the JVM's CWD rather than the project's basedir. If you force the resolver to be an InternalResolver, the test passes. Seems that the external resolver when encountering an href with no matching entry fails to use the basedir as a URL base.
Committed revision 1292945.