Closed missedone closed 8 years ago
The SchemaGen tool performs a compilation of your source code before generating XSD files from your bytecode. If your local Exception classes are referenced within your code, they are required to compile the source.
Do you get the same result if you run SchemaGen from the commandline? (I.e. not from within the jaxb2-maven-plugin)?
the Exception classes are under the same source folder of other classes, they were compiled together. by using the command line "schemagen -d xxx -cp xxxx xxx.java" i got the same result, there is no output of any schema at all.
wait a min, i noticed that i got error like "error: Two classes have the same XML type name. Use @XmlType.name and @XmlType.namespace to assign different names to them." with schemagen
command line, after fix it, i can get the schema generated with schemagen
cli, but still no output if run with jaxb2-maven-plugin (except i exclude the Exception java file in the pom.xml).
hi @lennartj
the issue is still there, as I said the jaxb2-maven-plugin
can NOT generate any output, though the schemagen
cli does.
so I think there might be still something wrong in the plugin itself.
the plugin version is 1.6, JDK version 1.8u102
Edit: however, looks like it works with plugin version 1.5
At the moment we are working with plugin version 2.3.
However, getting SchemaGen to emit its standard error output stream to the error stream of the plugin is a somewhat tricky task. It is desire for proper operation, but not necessarily trivial because of hos SchemaGen is constructed.
hi, folks
i encountered an issue that if i include my domain exception classes, schemagen has no output but see
null
on the terminal after enable debug mode (mvn -X clean jaxb2:schemagen
):if i exclude the Exception classes, the schema generated successfully so i'm wondering is this expected behavior or it's a defect? thanks