ANT = [A]nother [N]eat [T]ool在maven中经常需要用到 Maven Antrun plugin( http://maven.apache.org/plugins/maven-antrun-plugin/) 插件.This plugin provides the ability to run Ant tasks from within Maven. You can even embed your Ant scripts in the POM需要经常编写ant脚本,为此需要学习下ant的脚本。ant helloworldwithAnt: http://ant.apache.org/manual/tutorial-HelloWorldWithAnt.html
在maven项目中最常见的用法:<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-antrun-plugin</artifactId><executions><execution><phase>process-test-resources</phase><goals><goal>run</goal></goals><configuration><target><delete dir="${basedir}/src/java.test/spring/conf" /><mkdir dir="${basedir}/src/java.test/spring/conf" /><copy todir="${basedir}/src/java.test/spring/conf"><fileset dir="${basedir}/target/conf/webroot/WEB-INF/bean/"><include name="**" /></fileset></copy><move file="${basedir}/target/conf/java/sqlmap-config.xml"tofile="${basedir}/src/java.test/spring/web.sqlmap-config.xml"overwrite="true" /></target></configuration></execution></executions></plugin>
ant学习(存档)
最新推荐文章于 2025-04-12 23:53:30 发布