title: maven-dependency-plugin:unpack fails in Eclipse
body: <p>I have a library of JavaScript in dependency globalmentor-core.jar, and I use maven-dependency in another project to transfer the JavaScript to a web directory:</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;id&gt;unpack&lt;/id&gt;
                      &lt;phase&gt;process-resources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;unpack&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                          &lt;artifactItems&gt;
                              &lt;artifactItem&gt;
                                  &lt;groupId&gt;com.globalmentor&lt;/groupId&gt;
                                  &lt;artifactId&gt;globalmentor-core&lt;/artifactId&gt;
                                  &lt;overWrite&gt;true&lt;/overWrite&gt;
                                  &lt;outputDirectory&gt;${project.build.outputDirectory}/com/guiseframework/assets/javascript&lt;/outputDirectory&gt;
                                  &lt;includes&gt;**/*.js&lt;/includes&gt;
                              &lt;/artifactItem&gt;
                          &lt;/artifactItems&gt;
                      &lt;/configuration&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>That works wonderfully on the command-line. In Eclipse using m2eclipse I get:</p>
  
  <pre><code>2/4/11 5:26:53 AM PST: Build errors for guiseframework; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.1:unpack (unpack) on project guiseframework: Error unpacking file: R:\java\trunk\globalmentor-core\target\classes to: R:\java\trunk\guiseframework\target\classes\com\guiseframework\assets\javascript
  org.codehaus.plexus.archiver.ArchiverException: The source must not be a directory.
  </code></pre>
  
  <p>The closest thing I can find is <a href="http://jira.codehaus.org/browse/MDEP-187" rel="noreferrer">http://jira.codehaus.org/browse/MDEP-187</a>, where someone claims they will "provide trivial patch shortly. That was in 2008.</p>
  
  <p>Is there a fix for this, or am I stuck?</p>