0

I am try to migrate my project from java7 to java8 , when building my project its failing because of the new ACCESS_EXTERNAL_SCHEMA restrictions introduced in java 8 , so the solution was to add additional parameter

java.xml.accessExternalSchema=all

And this works like a charm, though after reading the document I found that this parameter is set to all by default

https://docs.oracle.com/javase/tutorial/jaxp/properties/properties.html

https://github.com/highsource/maven-jaxb2-plugin/wiki/Configuring-Extension-Validation-and-XML-Security

here is my plugin configurations

 <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>

So my question is why do i need to set this property while its by default set to all or I misunderstood the documents?

Amer Qarabsa
  • 6,412
  • 3
  • 20
  • 43
  • Author of `maven-jaxb2-plugin` here. Please post your `pom.xml` and `mvn clean install -X` log. This is a trivial feature, I'm puzzled how it may fail to work. – lexicore Oct 31 '17 at 08:54
  • @lexicore so it should be working without specifying the property to value all? , can you specify what information you need because I have several modules separated in man pom's, and the log will be really huge to share here so if you can tell me exactly what do you need. thank! – Amer Qarabsa Nov 02 '17 at 11:41
  • It should work without any special config, default values are `disableXmlSecurity=true`, `accessExternalSchema=all`, `accessExternalDTD=all`. I need your `pom.xml` or at least plugin configuration and `mvn clean install -X` log of the module which compiles the schema. Ideally a minimal reproducing project. – lexicore Nov 02 '17 at 12:00
  • @lexicore i shared the plugin configurations, will try to share the logs as soon as possible , Thanks! – Amer Qarabsa Nov 02 '17 at 12:20
  • You're using version 0.8.3, [the documentation](https://github.com/highsource/maven-jaxb2-plugin/wiki/Configuring-Extension-Validation-and-XML-Security) clearly states "Since 0.9.0." – lexicore Nov 02 '17 at 12:42
  • @lexicore thanks, don't know how i missed that , please put an answer so I accept it – Amer Qarabsa Nov 02 '17 at 12:54
  • No problem. This is why posting your code/configuration is so essential. – lexicore Nov 02 '17 at 12:59

1 Answers1

1

You're using version 0.8.3, the documentation clearly states "Since 0.9.0.".

lexicore
  • 42,748
  • 17
  • 132
  • 221