jarファイルをコピーする場所を定義するには、outputDirectory
プロパティを使用する必要があります。ここで
はあなたのPOMに追加した構成の例である:
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
...
</plugins>
また、コマンドラインから直接この設定を渡すことができます。
mvn -DoutputDirectory=alternativeLocation dependency:copy-dependencies
出典
2015-10-08 10:21:35
DB5
私は出力ディレクトリの事を知っています、私はちょうどそれがコマンドによってのみ行うことができるかどうかを知りたい。 – Bopsi
私の答えを更新しました。 – DB5
はい、それは私が探していたコマンドです。 :) – Bopsi