title: .xsd is not a part of this compilation. Is this a mistake for .xjb
body: <p>I am trying to change <code>schemaLocation</code> in my <code>xjb</code> file to use not a remote file using URL but to use a local copy that is also under version control.</p>
  
  <p>So for example my <code>xjb</code> file has something similar to</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jxb:bindings
          xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
          xmlns:xsd="http://www.w3.org/2001/XMLSchema"
          xsd:ID="JaxbBindingsForWMiddleware"
          version="2.0"&gt;
  
      &lt;jxb:bindings node="/xsd:schema"
                    schemaLocation="http://myserver:80/a/b/c/d/myxsd.xsd"&gt;
  </code></pre>
  
  <p>When I change this to local copy for example</p>
  
  <pre><code>schemaLocation="../../src/main/resources/myxsd.xsd"&gt;
  </code></pre>
  
  <p><code>mvn clean install</code> will fail with a message similar to</p>
  
  <blockquote>
    <p>[WARNING]       Caused by: com.sun.istack.SAXParseException2;
    systemId:
    file:/E:/somefolder/somefolder/myjavaproject/target/bindings/myxjb.xjb;
    lineNumber: 33; columnNumber: 33;
    "file:/E:/somefolder/somefolder/myjavaproject/target/bindings/mywsdl.wsdl"
    is not a part of this compilation. Is this a mistake for
    "file:/E:/somefolder/somefolder/myjavaproject/target/bindings/myxjb.xjb"?</p>
  </blockquote>
  
  <p>I noticed that it is looking for my wsdl file in the <code>target</code> directory. I can manipulate the <code>schemaLocation</code> in such way that it points to the <code>src</code> directory. The path then exists but the message remains.</p>
  
  <p>I can also put the wsdl in the target directory, where java tries to find it but in that case also, the message stays the same.</p>
  
  <p>So it looks like something specific needs to happen to make it part of this compilation. What should be done to compile this in the correct way?</p>