依存関係 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 年のことです。
これに対する修正はありますか、それとも行き詰まっていますか?