Moved testng DTD from war to core, so that this resource can be accessed even when the code runs inside Maven process (#1426)

I thought about leaving the look up from servlet in there, perhaps as a fallback, but realized that the behavior change between the master and the slaves are probably not desirable.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@7810 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
kohsuke committed 2008-03-17 02:07:21 +00:00
1 parent 93158ea050
commit fd649b81d4
2 files changed
+1 -1

No files matched your search

@@ -36,7 +36,7 @@ class XMLEntityResolver implements EntityResolver {
LOGGER.fine("It's a TestNG document, will try to lookup DTD in classpath");
String dtdFileName = systemId.substring(TESTNG_NAMESPACE.length());
URL url = Hudson.getInstance().servletContext.getResource('/' + dtdFileName);
URL url = getClass().getClassLoader().getResource(dtdFileName);
if (url != null)
return new InputSource(url.toString());
}