ACCESS_EXTERNAL_SCHEMA in java 8 的行为不基于文档
ACCESS_EXTERNAL_SCHEMA in java 8 is not behaving based on the document
我正在尝试将我的项目从 java7 迁移到 java8,但在构建我的项目时由于 java 8 中引入的新 ACCESS_EXTERNAL_SCHEMA 限制而失败,所以解决方案是添加额外的参数
java.xml.accessExternalSchema=all
虽然在阅读文档后我发现这个参数默认设置为 all
https://docs.oracle.com/javase/tutorial/jaxp/properties/properties.html
这是我的插件配置
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.3</version>
<configuration>
<schemaDirectory>src\main\resources\xsd</schemaDirectory>
<schemaIncludes>
<include>fimi.xsd</include>
</schemaIncludes>
<generatePackage>com.test.message</generatePackage>
<writeCode>true</writeCode>
<readOnly>true</readOnly>
<removeOldOutput>true</removeOldOutput>
<forceRegenerate>true</forceRegenerate>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>generic-build-wsdl</id>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
</plugin>
所以我的问题是为什么我需要设置这个 属性 而它默认设置为全部或者我误解了文档?
您使用的是 0.8.3 版,the documentation 明确指出 "Since 0.9.0."。
我正在尝试将我的项目从 java7 迁移到 java8,但在构建我的项目时由于 java 8 中引入的新 ACCESS_EXTERNAL_SCHEMA 限制而失败,所以解决方案是添加额外的参数
java.xml.accessExternalSchema=all
虽然在阅读文档后我发现这个参数默认设置为 all
https://docs.oracle.com/javase/tutorial/jaxp/properties/properties.html
这是我的插件配置
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.3</version>
<configuration>
<schemaDirectory>src\main\resources\xsd</schemaDirectory>
<schemaIncludes>
<include>fimi.xsd</include>
</schemaIncludes>
<generatePackage>com.test.message</generatePackage>
<writeCode>true</writeCode>
<readOnly>true</readOnly>
<removeOldOutput>true</removeOldOutput>
<forceRegenerate>true</forceRegenerate>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<id>generic-build-wsdl</id>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
</plugin>
所以我的问题是为什么我需要设置这个 属性 而它默认设置为全部或者我误解了文档?
您使用的是 0.8.3 版,the documentation 明确指出 "Since 0.9.0."。