Java 8 中使用Ant的 Wsimport 任务
<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
<classpath refid="metro.classpath"/>
</taskdef>
在使用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
Apache Ant 的详细介绍:请点这里
Apache Ant 的下载地址:请点这里