title: Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1:war - Could not copy resource
body: <p>I have a multi-module project that I'm trying to import in my Ubuntu 12.04 LTS's Eclipse Juno. (I already have done it successfully on Windows 7).</p>
  
  <p>My project has six modules, the first four modules are successfully imported from the SVN Repository and built with <code>Maven 3.0.5</code>, but when I try to build the fifth called <code>core</code>, i receive the following error:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1:war (default-war) on project core: Could not copy resource [/opt/workspace/core/target\preassembly]: File /opt/workspace/core/target\preassembly/scripts/Mask.js does not exist -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>As the error says, It looks like that Maven can't find the directory  <code>/opt/workspace/core/target\preassembly</code> to copy the file <code>/opt/workspace/core/target\preassembly/scripts/Mask.js</code>. </p>
  
  <p>But, this directory actually exists and the file <code>Mask.js</code> is in there. What looks strange to me is that backslash <code>\</code> after <code>target</code> directory instead a common bar <code>/</code>. But I have no idea if this is a problem and how to solve it, I spent 2 days researching the Internet but unfortunately I've found nothing.</p>
  
  <p>Here's my maven-war-plugin configuration section of parent project's <code>pom.xml</code>, where the backslashes appear</p>
  
  <pre><code>                &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.1&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;webResources&gt;
                              &lt;resource&gt;
                                  &lt;directory&gt;${project.build.directory}\preassembly&lt;/directory&gt;
                              &lt;/resource&gt;
                          &lt;/webResources&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
  </code></pre>
  
  <p>I've also checked the owner of the directories on Ubuntu, and everything refers to the same owner that worked on the first four modules.</p>
  
  <p>As I said above, the same version of eclipse, svn and maven works great on Windows.</p>
  
  <p>Anyone ever had this problem? Thank you very much.</p>