我在依赖 globalmentor-core.jar 中有一个 JavaScript 库,我在另一个项目中使用 maven-dependency 将 JavaScript 传输到 web 目录:
<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>
这在命令行上非常有效。在使用 m2eclipse 的 Eclipse 中,我得到:
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.
我能找到的最接近的东西是http://jira.codehaus.org/browse/MDEP-187,有人声称他们将“很快提供微不足道的补丁。那是在 2008 年。
有没有解决这个问题,还是我被卡住了?