title: Maven jetty plugin using wrong resource file URL
body: <p>I am running a project within a vagrant box setup over my eclipse workspace. I am working on setting up a new maven project but I am having problems with the plugin using windows paths instead of the vagrant path. My windows workspace is setup in C:\Dev, so when I 'vagrant up', my entire workspace is available within my VM. In other words, /vagrant in the VM contains the contents of C:\Dev. </p>
  
  <p>When I execute mvn jetty:run, everything starts up fine and all paths use the vagrant versions (/vagrant/mvn_project/target...). However, once the plugin starts scanning the project for changes, it throws the following error:</p>
  
  <pre><code>2014-02-26 01:18:53.756:WARN:oejw.WebAppContext:Scanner-0: Failed startup of context o.e.j.m.p.JettyWebAppContext@591f46d8{/,[file:/vagrant/mvn_project/web, file:/vagrant/mvn_project/target/webapps/ROOT/],STARTING}{/ROOT/]}
  javax.servlet.UnavailableException: Malformed URL 'file://C:\\Dev\\mvn_project/target/webapps/ROOT/WEB-INF/dtd/web-app_2_3.dtd' : For input string: "\\Dev\\mvn_project"
      at org.apache.struts.action.ActionServlet.init(ActionServlet.java:402)
      at javax.servlet.GenericServlet.init(GenericServlet.java:244)
      at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:561)
      at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:351)
      at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:840)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:300)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1347)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:745)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
      at org.eclipse.jetty.maven.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:282)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      at org.eclipse.jetty.maven.plugin.JettyRunMojo.restartWebApp(JettyRunMojo.java:532)
      at org.eclipse.jetty.maven.plugin.JettyRunMojo$1.filesChanged(JettyRunMojo.java:485)
      at org.eclipse.jetty.util.Scanner.reportBulkChanges(Scanner.java:681)
      at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:539)
      at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
      at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)
      at java.util.TimerThread.mainLoop(Timer.java:555)
      at java.util.TimerThread.run(Timer.java:505)
  </code></pre>
  
  <p>Is this a bug with the plugin or is there a configuration setting I can use to set this value? </p>
  
  <p>Edit: A little more context... It seems that the problem has something to do with filtered resources. </p>
  
  <pre><code>     &lt;resources&gt;
          &lt;resource&gt;
              &lt;directory&gt;${project.basedir}/src/main/filtered-resources&lt;/directory&gt;
              &lt;filtering&gt;true&lt;/filtering&gt;
              &lt;targetPath&gt;${project.basedir}/target/webapps/ROOT&lt;/targetPath&gt;
          &lt;/resource&gt;
      &lt;/resources&gt;
  </code></pre>
  
  <p>Changing ${project.basedir} to /vagrant/mvn_project seems to fix the problem, but clearly this is just a workaround and not a solution (won't work in CI for example). </p>
  
  <p>UPDATE: It turns out, the blame is on Eclipse. Eclipse is occasionally building the project and when it does so, ${project.basedir} refers to C:\Dev\mvn_project instead of /vagrant/mvn_project. Is there a way to override ${project.basedir} without hard coding?</p>