Maven项目,转移到另一台PC后出现错误。为什么?
[INFO] [jaxb2:generate {execution: default-cli}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.xml.sax.SAXParseException; systemId: jar:file:/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.2.5-2/jaxb-xjc-2.2.5-2.jar!/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 86; columnNumber: 48; src-resolve: Cannot resolve the name 'xjc:globalJavaType' to a(n) 'group' component.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: jar:file:/.m2/repository/com/sun/xml/bind/jaxb-xjc/2.2.5-2/jaxb-xjc-2.2.5-2.jar!/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 86; columnNumber: 48; src-resolve: Cannot resolve the name 'xjc:globalJavaType' to a(n) 'group' component.
at com.sun.tools.xjc.SchemaCache.newValidator(SchemaCache.java:78)
at com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl$1$1.startElement(AnnotationParserFactoryImpl.java:118)
at com.sun.xml.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:253)
... 发布于 2013-02-14 22:26:28
我也遇到过类似的问题。在我的例子中,指向本地maven存储库的路径包含西里尔文符号。
我更改了我的settings.xml并将元素放在那里,以指定仅包含拉丁符号的新存储库路径。这对我很管用。
发布于 2014-04-29 01:24:21
我也有类似的问题。事实证明,windows用户主路径包含带重音的字符,导致错误。它是: c:\Users\Géza.m2我们切换到其他用户,一切都很好。
发布于 2014-06-09 19:27:00
好吧,我找到解决方案了。(基于http://docs.oracle.com/javase/7/docs/api/javax/xml/XMLConstants.html#ACCESS_EXTERNAL_SCHEMA)
在/path/to/jdk1.8.0/jre/lib下创建一个名为jaxp.properties的文件(如果它不存在),然后在其中写入以下行:
javax.xml.accessExternalSchema =仅此而已。享受JDK 8。
https://stackoverflow.com/questions/14373733
复制相似问题