title: Change the execution directory of a cxf-codegen-plugin
body: <p>I'm building some tooling to (automatically) convert a large ANT project to a Maven structure. The project contains webservices. Therefore, I'm not able to change the input wsdl / xsd files. This is my input wsdl file. It contains a reference to a types definition from the poject base dir.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://schemas.test.com/test" name="Test"&gt;
      &lt;wsdl:import namespace="http://schemas.test.com/test" location="./src/wsdl/Test.xsd"/&gt;
      &lt;wsdl:types&gt;
      &lt;/wsdl:types&gt;
  &lt;/wsdl:definitions&gt;
  </code></pre>
  
  <p>This is my maven plugin configuration:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;plugin&gt;
      &lt;groupId&gt;org.apache.cxf&lt;/groupId&gt;
      &lt;artifactId&gt;cxf-codegen-plugin&lt;/artifactId&gt;
      &lt;executions&gt;                    
          &lt;execution&gt;                        
              &lt;id&gt;generate-sources&lt;/id&gt;
              &lt;phase&gt;generate-sources&lt;/phase&gt;
              &lt;goals&gt;
                  &lt;goal&gt;wsdl2java&lt;/goal&gt;
              &lt;/goals&gt;                        
              &lt;configuration&gt;                           
                  &lt;sourceRoot&gt;${project.build.directory}/generated-sources/cxf&lt;/sourceRoot&gt;
                  &lt;wsdlRoot&gt;${project.build.directory}/../src/wsdl/&lt;/wsdlRoot&gt;
                  &lt;includes&gt;
                      &lt;include&gt;**/*.wsdl&lt;/include&gt;
                  &lt;/includes&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Building the submodule works fine, since the cfx-codegen-plugin seems to take the ${project.basedir} as execution root directory.</p>
  
  <p>However, when I try to build the complete multimodule project, the cfx-codegen-plugin seems to revert to the project.parent.basedir. I get the following build error:</p>
  
  <p>Caused by : WSDLException (at /wsdl:definitions/wsdl:import): faultCode=PARSER_ERROR: Problem parsing './src/wsdl/Test.xsd'.: java.io.FileNotFoundException: C:\Users\test\Desktop\multimod\src\wsdl\Test.xsd (The system cannot find the path specified)</p>
  
  <p>Does anyone know how to:</p>
  
  <ol>
  <li>Change the execution root dir of a plugin in a specific maven phase?</li>
  <li>Or force the cfx-codegen-plugin to use an alternative execution root?</li>
  </ol>
  
  <p>Thanks,
  sjaak</p>