| <project default="webapp"> | |
| <!-- This is a simple Ant build file that can be used to call Maven. | |
| The use-case is an IDE that has an Ant plugin but not a Maven plugin. --> | |
| <property file="build.properties" /> | |
| <property name="maven.exec" value="maven.bat" /> | |
| <property name="exec.dir" location="." /> | |
| <target description="Remove target directory" name="clean" > | |
| <delete dir="target"/> | |
| </target> | |
| <target description="Call Maven goal under subdirectory" name="maven"> | |
| <exec executable="${maven.exec}" dir="${exec.dir}"> | |
| <arg line="${maven.goal}" /> | |
| </exec> | |
| </target> | |
| <target description="Build webapp, assemble WAR" name="webapp.war" depends="clean"> | |
| <antcall target="maven"> | |
| <param name="maven.goal" value="war" /> | |
| </antcall> | |
| </target> | |
| <target description="Build webapp" name="webapp"> | |
| <antcall target="maven"> | |
| <param name="maven.goal" value="war:webapp" /> | |
| </antcall> | |
| </target> | |
| <target description="Test classes" name="test"> | |
| <antcall target="maven"> | |
| <param name="maven.goal" value="test" /> | |
| </antcall> | |
| </target> | |
| <target description="Build webapp documentation" name="site"> | |
| <antcall target="maven"> | |
| <param name="maven.goal" value="site" /> | |
| </antcall> | |
| </target> | |
| </project> |