maven-antrun-plugin为maven提供了ant功能。它只有一个goal,即:
antrun:run 执行ant任务。
使用:
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.x</version>
该插件有两种方法执行ant任务:
1、可以直接在插件配置中编写
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<configuration>
<target>
<echo message="haha,i can do ant job within maven!"/>
</target>
</configuration>
</plugin>
2、也可以调用ant脚本即build.xml文件执行
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<configuration>
<target>
<ant antfile="${basedir}/build.xml"/>
</target>
</configuration>
</plugin>
ss