Generating code with maven-jaxb2-plugin doesn't work with the same configuration after v0.12.0
The same pom.xml works with maven-jaxb2-plugin v0.11, but not with v0.12.
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<extension>true</extension>
<schemaDirectory>${basedir}/src/wsdl</schemaDirectory>
<schemaIncludes>
<schemaInclude>*.wsdl</schemaInclude>
</schemaIncludes>
<bindingDirectory>${basedir}/src/jaxws/</bindingDirectory>
<generateDirectory>${basedir}/target/jaxws/java</generateDirectory>
<strict>false</strict>
<verbose>true</verbose>
<forceRegenerate>true</forceRegenerate>
<args>
<arg>-Xfluent-api</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-fluent-api</artifactId>
<version>3.0</version>
</plugin>
</plugins>
</configuration>
</plugin>
The reason is that after fix # 23 null is returned and not "systemId" in MavenCatalogResolver.java (line: 64)
Caused by: java.lang.NullPointerException
at java.net.URI$Parser.parse(URI.java:3003)
at java.net.URI.<init>(URI.java:578)
at org.jvnet.jaxb2.maven2.resolver.tools.MavenCatalogResolver.getResolvedEntity(MavenCatalogResolver.java:64) at com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver.resolveEntity(CatalogResolver.java:192)
What would be the correct configuration for my pom.xml to get it working?
source to share
Disclaimer: I am the author maven-jaxb2-plugin
.
Please write a question here ans send me an example project to reproduce (the best would be a pull request tests .
I will fix this as soon as possible.
I wonder how passed systemId
can be null
, but either way it's a bug. Will be fixed as soon as possible, I just need a test project to reproduce.
Refresh.
The 0.12.2 release fixes the NPE you are reporting about. However, I'm not sure if it fixes your build. It is possible that you have a different problem. I wonder how systemId
can be zero.
Please send me a draft for further testing.
Generally it would be better for bug and issue files on GitHub rather than posting on SO.
source to share