Java maven-jaxb2-plugin不是在linux机器上编译xsd,而是在windows上工作?
下面是pom.xml中的代码片段Java maven-jaxb2-plugin不是在linux机器上编译xsd,而是在windows上工作?,java,linux,windows,xsd,maven-jaxb2-plugin,Java,Linux,Windows,Xsd,Maven Jaxb2 Plugin,下面是pom.xml中的代码片段 <plugin> <groupId>org.jvnet.jaxb2.maven2</groupId> <artifactId>maven-jaxb2-plugin</artifactId> <version>0.8.3</version>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.3</version>
</plugin>
第一个XSD相关部分
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.cohbe.org/CustomerRequest"
xmlns:customer="http://www.cohbe.org/customer"
targetNamespace="http://www.cohbe.org/CustomerRequest"
elementFormDefault="qualified">
<xsd:import schemaLocation="CustomerDetails.xsd"
namespace="http://www.cohbe.org/customer"/>
<xsd:element name="CustomerNewRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="customer:CustomerApplicationDetail" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
...
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema version="2.15"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.cohbe.org/customer"
targetNamespace="http://www.cohbe.org/customer"
xmlns:countries="http://www.cohbe.org/Counties"
elementFormDefault="qualified">
<!-- Version 2.15 -->
<xsd:import namespace="http://www.cohbe.org/states" schemaLocation="States.xsd"/>
<xsd:element name="CustomerApplicationDetail"
type="CustomerApplicationDetail"/>
<xsd:complexType name="CustomerApplicationDetail">
.....
</xsd:schema>
...
CustomerDetails.xsd(嵌套xsd)位置与第一个xsd的位置相同。以下是相关部分
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.cohbe.org/CustomerRequest"
xmlns:customer="http://www.cohbe.org/customer"
targetNamespace="http://www.cohbe.org/CustomerRequest"
elementFormDefault="qualified">
<xsd:import schemaLocation="CustomerDetails.xsd"
namespace="http://www.cohbe.org/customer"/>
<xsd:element name="CustomerNewRequest">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="customer:CustomerApplicationDetail" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
...
</xsd:schema>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema version="2.15"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.cohbe.org/customer"
targetNamespace="http://www.cohbe.org/customer"
xmlns:countries="http://www.cohbe.org/Counties"
elementFormDefault="qualified">
<!-- Version 2.15 -->
<xsd:import namespace="http://www.cohbe.org/states" schemaLocation="States.xsd"/>
<xsd:element name="CustomerApplicationDetail"
type="CustomerApplicationDetail"/>
<xsd:complexType name="CustomerApplicationDetail">
.....
</xsd:schema>
.....
您是说通过本地文件导入架构可以在Windows上工作,但不能在Linux上工作?这很奇怪,几乎每个测试项目中都会出现相关的本地导入
这使我相信您的构建环境存在问题。检查文件是否存在,以及生成过程是否具有访问这些文件的权限
概述:
- 使用更新的版本,当前版本为0.12.3,您使用的是0.8.3,已超过2年
- 提供mvn-X-e清洁安装日志
- 提供一个最低限度的复制测试项目作为PR-例如在
下(或任何你想要的e/emily
)。当心p/项目名称
- 使用更新的版本,当前版本为0.12.3,您使用的是0.8.3,已超过2年
- 提供mvn-X-e清洁安装日志
- 提供一个最低限度的复制测试项目作为PR-例如在
下(或任何你想要的e/emily
)。当心p/项目名称
- 使用更新的版本,当前版本为0.12.3,您使用的是0.8.3,已超过2年
- 提供mvn-X-e清洁安装日志
- 提供一个最低限度的复制测试项目作为PR-例如在
下(或任何你想要的e/emily
)。当心p/项目名称
- 使用更新的版本,当前版本为0.12.3,您使用的是0.8.3,已超过2年
- 提供mvn-X-e清洁安装日志
- 提供一个最低限度的复制测试项目作为PR-例如在
下(或任何你想要的e/emily
)。当心p/项目名称
<configuration>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<strict>false</strict>
<extension>true</extension>
</configuration>
src/main/resources/xsd
假的
真的
我遇到了同样的问题,完全有效的XSD无法在Linux上编译,但可以在Windows和Mac上运行。我必须关闭maven-jaxb-2插件配置中的严格验证,如下所示:
<configuration>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<strict>false</strict>
<extension>true</extension>
</configuration>
src/main/resources/xsd
假的
真的
我遇到了同样的问题,完全有效的XSD无法在Linux上编译,但可以在Windows和Mac上运行。我必须关闭maven-jaxb-2插件配置中的严格验证,如下所示:
<configuration>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<strict>false</strict>
<extension>true</extension>
</configuration>
src/main/resources/xsd
假的
真的
我遇到了同样的问题,完全有效的XSD无法在Linux上编译,但可以在Windows和Mac上运行。我必须关闭maven-jaxb-2插件配置中的严格验证,如下所示:
<configuration>
<schemaDirectory>src/main/resources/xsd</schemaDirectory>
<strict>false</strict>
<extension>true</extension>
</configuration>
src/main/resources/xsd
假的
真的
您在Linux和Windows上使用哪些JDK版本/供应商<代码>java-版本在linux上,我已经尝试使用JDK1.6.41和1.7。在windows上尝试使用jdk 1.6.35和1.7在Linux和windows上使用哪些jdk版本/供应商<代码>java-版本在linux上,我已经尝试使用JDK1.6.41和1.7。在windows上尝试使用jdk 1.6.35和1.7在Linux和windows上使用哪些jdk版本/供应商<代码>java-版本在linux上,我已经尝试使用JDK1.6.41和1.7。在windows上尝试使用jdk 1.6.35和1.7在Linux和windows上使用哪些jdk版本/供应商<代码>java-版本在linux上,我已经尝试使用JDK1.6.41和1.7。在使用JDK1.6.35和1.7的windows上,我也使用了0.12.3,但结果相同。我尝试了mvn-X-e clean安装,但没有额外的信息。文件也存在,但我不知道如何检查生成过程是否有访问该文件的权限。还是考虑提供日志。也许我们会看到一些你看不到的东西。如何检查权限-尝试只编译Customer.xsd
。最后,在这种情况下,如果不查看您的文件,很难提供帮助。如果您需要支持,请按照上述步骤操作。请参阅。如果我从第二个xsd文件中删除
,我也可以在windows机器上复制它。然后,我尝试使用type而不是在中建议的ref,但随后get本地元素声明中必须存在一个'ref'或'name'。
您可以看一下吗。我尝试使用maven-jaxb2-plugin-true-src/main/resources/META-INF/schema,但它不起作用。提前感谢我也使用了0.12.3但是sa