は、私は、以下の構成を持っている:コピー依存関係の目標の間にmaven-dependency-pluginを使用して、テストとコンパイルの間でアーティファクトを分割する方法はありますか?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>analyze</id>
<goals>
<goal>analyze-only</goal>
</goals>
<configuration>
<failOnWarning>false</failOnWarning>
</configuration>
</execution>
<!--Copy the dependencies so ant build has the same versions-->
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.basedir}/lib</outputDirectory>
<overWriteIfNewer>true</overWriteIfNewer>
<stripVersion>true</stripVersion>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
<excludeTransitive>false</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>
上記の構成は同じフォルダ上のすべてをダンプします。私は、テスト構成を追加することにより、テスト範囲を除いてみましたが、エラーを与える:
Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.6:copy-dependencies (copy-dependencies) on project pcgen: Can't exclude Test scope, this will exclude everything.
は、私は別のフォルダにコピーすることができるように残りの部分から、テストの依存関係を分離する方法はありますか?
なぜしたいですか? Antの代わりにMavenを直接使用しないのはなぜですか? – khmarbaise
私のコントロールからただの要件。現在、プロジェクトはANTからMavenに移行しており、移行が完了している間は両方を実行しておく必要があります。私はMavenで彼らの設定を作り直そうとしています。 – javydreamercsw