I use XJC and now I want to use XMLCataloges which refers to other cataloges. The problem is that it should be able to use relative paths instead of absolute paths when referencing to other cataloges.
This catalog is placed in project1 and should refer to the catalog.xml file located in the project2.
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<public publicId="http://company.com/test"
uri="src/main/resources/test.xsd" />
<nextCatalog catalog="../project2/catalog.xml" /></catalog>
The XJC call looks like this:
<java fork="true" jar="${xjc-jar-file}">
<!-- folder where the generated files should be saved -->
<arg value="-d" />
<arg value="${target-folder}"/>
<arg value="-extension" />
<!-- catalog file -->
<arg value="-catalog" />
<arg value="${catalog-file}" />
<!-- current xsd file -->
<arg value="@{xsd-file}" />
</java>
Have I made a mistake in the catalog file, or is there any workaround for using such catalog with XJC?