title: Spring Webflow 2.3 Testing (with Maven): How to reference parent flow with filename different from id
body: <p>I debugged my Spring Webflow test to the point of figuring out the first part of the issue: When you have a flow with a filename that is not the same as the id of the flow ('commons-flow.xml' with id='commons') then just using resourceFactory.createFileResource(pathToFlowFile) does not work because that assumes the id is the filename.</p>
  
  <p>There is a method available to override the id, <code>resourceFactory.createResource(pathToFlowFile, attributesMap, overrideId)</code></p>
  
  <p>However, this uses the Classloader to resolves files whereas it seems the createFileResource used a different means.</p>
  
  <p>I cannot figure out how I am supposed to get the Classloader to recognize the flow files. I inspected it's classpaths and it only has the JAR dependencies and then dynamically created target/classes and target/test-classes folders. No reference to my project.</p>
  
  <p>This is a Maven project, and the path I have from project root to flows is something like:</p>
  
  <pre><code>src/main/webapp/WEB-INF/flows/&lt;flow-folder&gt;/&lt;flow-filename&gt;.xml
  </code></pre>
  
  <p>I have seen <a href="https://stackoverflow.com/questions/6422748/webflow-testing-unable-to-find-flow-model">webflow testing, unable to find flow model</a> which reiterates what I discovered already, but for some reason I have the issue with the Classloader that other seems not to have.</p>
  
  <p>Where I see people successfully referencing the flow files, they seem to either be relative from the project root or relative from the WebContext at src/main/webapp.</p>
  
  <p>I am running the JUnit test with a Run Configuration in Eclipse and also with the maven test goal. </p>
  
  <p>It is possible for me to configure a custom classpath for the Run Configuration in Eclipse to include the parent folder of the relative path I have defined as pathToFlowFile.</p>
  
  <p>However, that does not help at all with Maven, which has the classloader/classpath issue still when executing the test goal.</p>