メインのJavaプロジェクトとそのすべての依存関係でjarファイルを作成します。私はポンポンファイル内の次のプラグイン定義を作成:maven-dependency-pluginはoutputDirectoryの設定を無視します
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.5.1</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- exclude junit, we need runtime dependency only -->
<includeScope>runtime</includeScope>
<outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
ので、私はmvn dependency:copy-dependencies
を実行し、それがtarget/dependency
代わりのdependency-jars
にコピーし、すべての依存関係のことを正常に動作します。何か案は?正常です