I have XSD schema importing another schema, the import looks something like this:
<xsd:import schemaLocation="file:///C:/Work/Project/src/main/resources/xsd/schema2.xsd" namespace="http://www.namespace.com/schema2/v2" />
It only works like this, with an absolute path. However, both schemas are in the same folder and I need to make it work with simple relative path, like following:
<xsd:import schemaLocation="schema2.xsd" namespace="http://www.namespace.com/schema2/v2" />
This path however throws the following exception during compilation:
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'schema2.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
The most confusing thing about my problem is that the entire project is cloned from git and it works just fine with the simple relative path (exactly as shown) for anyone else except me. I haven't changed anything at all in the project, I have reinstalled Java and Maven (just to be sure or maybe out of pure desperation), I have the same maven settings as my colleagues.
I'll be glad for any ideas or suggestions, thanks.