【发布时间】:2011-11-06 12:55:33
【问题描述】:
我正在使用 One-Jar 的 maven 插件将我的 java 打包到一个包含所有依赖项的 jar 中。
该项目有一个名为 schema.xsd 的资源。
当我使用 java -jar myJar.one-jar 运行 jar 文件时,出现以下错误:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document
'jar:file:/../lib/myJar.one-jar.jar!/lib/myJar.jar!/schema.xsd', because 1) could not find
the document; 2) the document could not be read; 3) the root element of the document is not
<xsd:schema>.
知道为什么会这样吗?
注意:应用程序有一个 log4j.properties 作为资源并且它可以识别它。
【问题讨论】:
标签: java maven xsd executable-jar