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:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>unpack</id> <phase>process-resources</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>com.globalmentor</groupId> <artifactId>globalmentor-core</artifactId> <overWrite>true</overWrite> <outputDirectory>${project.build.outputDirectory}/com/guiseframework/assets/javascript</outputDirectory> <includes>**/*.js</includes> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> That works wonderfully on the command-line. In Eclipse using m2eclipse I get:
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. The closest thing I can find is http://jira.codehaus.org/browse/MDEP-187, where someone claims they will "provide trivial patch shortly. That was in 2008.
Is there a fix for this, or am I stuck?