提交 fd649b81 编写于 作者: K kohsuke

Moved testng DTD from war to core, so that this resource can be accessed even...

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
上级 93158ea0
......@@ -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());
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册