如何正确复制maven2的行为?
<build>
<sourceDirectory>src/java</sourceDirectory>
<resources>
<resource>
<directory>src/etc/</directory>
<include>atlassian-plugin.xml</include>
<include>**/*.vm</include>
</resource>
</resources>
<unitTestSourceDirectory>test/java</unitTestSourceDirectory>
<unitTest>
<includes>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
<resources>
<resource>
<directory>test/etc</directory>
</resource>
</resources>
</unitTest>
</build>
答案 0 :(得分:2)
这将是这样的:
<build>
<sourceDirectory>src/java</sourceDirectory>
<resources>
<resource>
<directory>src/etc/</directory>
<includes>
<include>atlassian-plugin.xml</include>
<include>**/*.vm</include>
</includes>
</resource>
</resources>
<testSourceDirectory>test/java</testSourceDirectory>
<testResources>
<testResource>
<directory>test/etc</directory>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>