jaxb2-maven-plugin icon indicating copy to clipboard operation
jaxb2-maven-plugin copied to clipboard

How to use catalog from external jar?

Open tpd-opitz opened this issue 5 years ago • 1 comments

I have a XSD with some XML types to be used in differend other XSDs. I put this common.xsd in a Jar of its own along with a catalog.xml as defined here: https://github.com/highsource/maven-jaxb2-plugin/wiki/Using-Catalogs

The I placed an xsd:import element in my other XSD refering the namespace of the common.xsd.

But when trying to generate importing XSD via jaxb2-maven-plugin the common.xsd from the catalog is not processed. I get an error:

[ERROR] file:/absolute/path/to/my/xsd/importing-the-common-definitions.xsd [23,67]
org.xml.sax.SAXParseException: src-resolve: Name 'myns:nameType' could not be resolves as  'type definition'-component.

How do I use catalogs with the jaxb2-maven-plugin? Does jaxb2-maven-plugin support catalogs at all?

tpd-opitz avatar Oct 31 '19 14:10 tpd-opitz

Have you been able to find a workaround?

Serdarrr avatar Nov 12 '20 22:11 Serdarrr