2011-01-30 17:55:02 +00:00
|
|
|
<project default="main" basedir=".">
|
|
|
|
|
|
|
|
<target name="main" depends="clean,compile,war">
|
|
|
|
</target>
|
|
|
|
|
2011-02-23 16:36:40 +00:00
|
|
|
<taskdef name="junit"
|
|
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="test/lib/junit-3.8.1.jar" />
|
|
|
|
</classpath>
|
|
|
|
</taskdef>
|
|
|
|
|
|
|
|
|
2011-02-16 08:18:23 +00:00
|
|
|
<target name="init">
|
|
|
|
<!-- overwrite with your own values in a user.property file -->
|
|
|
|
<property file="user.property" />
|
2011-02-23 16:36:40 +00:00
|
|
|
<property name="target" value="dist" description="Target directory of the build"/>
|
2011-02-17 11:48:01 +00:00
|
|
|
<property name="tomcat-home" value="/tomcat" description="Home directory of Tomcat"/>
|
2011-02-16 08:18:23 +00:00
|
|
|
<property name="debug" value="false" />
|
2011-02-23 16:36:40 +00:00
|
|
|
<mkdir dir="${target}" />
|
2011-02-16 08:18:23 +00:00
|
|
|
<path id="project-classpath">
|
2011-02-17 11:48:01 +00:00
|
|
|
<fileset dir="content/WEB-INF/lib" includes="*.jar" />
|
2011-02-16 08:18:23 +00:00
|
|
|
<fileset dir="${tomcat-home}/lib" includes="*.jar" />
|
|
|
|
</path>
|
2011-02-23 16:36:40 +00:00
|
|
|
<path id="test-classpath">
|
|
|
|
<fileset dir="test/lib" includes="*.jar" />
|
|
|
|
<pathelement location="${target}"/>
|
|
|
|
</path>
|
2011-02-16 08:18:23 +00:00
|
|
|
</target>
|
|
|
|
|
2011-02-17 11:48:01 +00:00
|
|
|
<target name="clean" depends="init">
|
|
|
|
<delete file="${target}/plantuml.war" />
|
2011-02-23 16:36:40 +00:00
|
|
|
<delete>
|
|
|
|
<fileset dir="${target}" includes="**/*.class"/>
|
|
|
|
</delete>
|
2011-02-17 11:48:01 +00:00
|
|
|
<delete dir="content/WEB-INF/classes" />
|
|
|
|
<mkdir dir="content/WEB-INF/classes" />
|
2011-01-30 17:55:02 +00:00
|
|
|
</target>
|
|
|
|
|
2011-02-16 08:18:23 +00:00
|
|
|
<target name="compile" depends="init">
|
2011-02-17 11:48:01 +00:00
|
|
|
<javac srcdir="src" destdir="content/WEB-INF/classes" debug="${debug}" classpathref="project-classpath" />
|
2011-01-30 17:55:02 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="war">
|
2011-02-17 11:48:01 +00:00
|
|
|
<war destfile="${target}/plantuml.war" webxml="content/WEB-INF/web.xml">
|
|
|
|
<classes dir="content/WEB-INF/classes" />
|
|
|
|
<fileset dir="content" excludes="WEB-INF/**"/>
|
|
|
|
<lib dir="content/WEB-INF/lib" />
|
2011-01-30 17:55:02 +00:00
|
|
|
</war>
|
|
|
|
</target>
|
|
|
|
|
2011-02-16 08:18:23 +00:00
|
|
|
<target name="deploy" depends="main">
|
2011-02-17 11:48:01 +00:00
|
|
|
<copy file="${target}/plantuml.war" todir="${tomcat-home}/webapps" overwrite="true" />
|
2011-02-16 08:18:23 +00:00
|
|
|
</target>
|
|
|
|
|
2011-02-23 16:36:40 +00:00
|
|
|
<target name="test" depends="init">
|
|
|
|
<echo>
|
|
|
|
WARN - Test execution requires an running PlantUMLServer.
|
|
|
|
</echo>
|
|
|
|
<javac srcdir="test/src" destdir="${target}" debug="${debug}" classpathref="test-classpath" />
|
|
|
|
<junit showoutput="true" >
|
|
|
|
<classpath>
|
|
|
|
<path refid="test-classpath"/>
|
|
|
|
</classpath>
|
|
|
|
<formatter type="plain" usefile="false" />
|
|
|
|
<test name="net.sourceforge.plantuml.servlet.AllTests"/>
|
|
|
|
</junit>
|
|
|
|
</target>
|
|
|
|
|
2011-01-30 17:55:02 +00:00
|
|
|
</project>
|