Mmaven antrun プラグインを使用せずに、Maven を使用してディレクトリ全体を別のディレクトリにコピーする方法を知りたいです。
13764 次
2 に答える
18
Maven リソース プラグインを使用できます。
彼らのドキュメントから取られた例として:
<project>
...
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/target/extra-resources</outputDirectory>
<resources>
<resource>
<directory>src/non-packaged-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
...
</build>
...
</project>
私が間違っていなければ、これは の内容directory
をにコピーします。outputDirectory
于 2013-07-25T07:55:20.287 に答える