Closed newcron closed 1 year ago
If you use gradle --info
it passes -verbose down to the ant command. See SchemaToJavaTask.java.
something is wrong with your binding
run the command: java -DenableExternalEntityProcessing=true ....
it should show in the console relevant error e.g.
parsing a schema...
[ERROR] XPath evaluation {YOUR ERROR}
in my case, the issue was that I had two XSD schemas and one binding file for both e.g.
<jaxb:bindings xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
version="3.0">
<!-- REQUESTS -->
<jaxb:bindings schemaLocation="./request/GetRecord v1.0.xsd" node="//xsd:element[@name='ClientIntegrationRequest']">
<jaxb:class name="GetRecordRequest"/>
</jaxb:bindings>
<jaxb:bindings schemaLocation="./request/UpdateRecord v1.0.xsd" node="//xsd:element[@name='ClientIntegrationRequest']">
<jaxb:class name="UpdateRecordRequest"/>
</jaxb:bindings>
</jaxb:bindings>
as soon as I separated these - all worked
Hi There,
I am trying to migrate a maven project to gradle. I've got an existing (working) setup for xjc class generation (using the jaxb2 maven plugin).
When I pass the schemas and the xjc file to the jaxb-gradle-plugin however, I get an exception with the message
xjc failed
. XJC is quite good with helpful error messages, but unfortunately the output of xjc seems to be not coming.From the log output I can see that the plugin intends to make the output verbose - but it seems as if it is just not happening.
using version 5.2.1
the info output looks like the one below. I can see that the
-verbose
switch is set - it just does not do anything.. Any idea what I could do to get to the actual error message?