0
我有父母在那里我试图解压一些脚本,执行它们在“预集成测试”阶段,所以它默认运行所有的孩子模块。在整合前测试阶段清理文件夹的内容
我的问题在这里是我需要删除某些目录的内容,每次运行。我尝试使用从未在预集成阶段运行的ant-plugin。另外要注意的是,我在构建项目时调用了多个配置文件。
mvn clean install -Pprofile1,profile2,integration
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>pre-integration-test</phase>
<configuration>
<tasks>
<delete>
<fileset dir="checkout\myproject\specific_directory\**.*"/>
<delete/>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
总的来说,我有四个插件,包括预集成阶段蚂蚁干净所有正在运行。除了蚂蚁清理任务外,其他人都可以正常运行。
为什么不使用maven-clean-plugin? – khmarbaise
试过但同样的问题,未在预集成测试阶段运行。 –