Java 8 中使用Ant的 Wsimport 任务

2014-11-23 23:16:52 · 作者: · 浏览: 11

Java 8 中使用Ant的 Wsimport 任务





在使用ant构建时,抛出异常:


java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: ... schema_reference:
Failed to read schema document 'xjc.xsd', because 'file' access is not allowed due to restriction set by the accessExternalSchema property.


解决办法: 在 path/to/jdk8/jre/lib下面添加一个jaxp.properties的文件,内容为:


javax.xml.accessExternalSchema = all