mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-11-18 18:25:11 +00:00
89 lines
3.1 KiB
XML
89 lines
3.1 KiB
XML
<project default="main" basedir=".">
|
|
|
|
<target name="main" depends="clean,war">
|
|
</target>
|
|
|
|
<taskdef name="junit"
|
|
classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
|
|
<classpath>
|
|
<pathelement location="test/lib/junit-3.8.1.jar" />
|
|
</classpath>
|
|
</taskdef>
|
|
|
|
|
|
<target name="init">
|
|
<!-- overwrite with your own values in a user.property file -->
|
|
<property file="user.property" />
|
|
<property name="target" value="dist" description="Target directory of the build"/>
|
|
<property name="tomcat-home" value="/tomcat" description="Home directory of Tomcat"/>
|
|
<property name="debug" value="false" />
|
|
<mkdir dir="${target}" />
|
|
<path id="project-classpath">
|
|
<fileset dir="content/WEB-INF/lib" includes="*.jar" />
|
|
<fileset dir="${tomcat-home}/lib" includes="*.jar" />
|
|
</path>
|
|
<path id="test-classpath">
|
|
<fileset dir="test/lib" includes="*.jar" />
|
|
<pathelement location="${target}"/>
|
|
</path>
|
|
</target>
|
|
|
|
<target name="clean" depends="init">
|
|
<delete file="${target}/plantuml.war" />
|
|
<delete>
|
|
<fileset dir="${target}" includes="**/*.class"/>
|
|
</delete>
|
|
<delete dir="${target}/root" />
|
|
<delete dir="content/WEB-INF/classes" />
|
|
<mkdir dir="content/WEB-INF/classes" />
|
|
</target>
|
|
|
|
<target name="compile" depends="init">
|
|
<javac srcdir="src" destdir="content/WEB-INF/classes" debug="${debug}" classpathref="project-classpath" />
|
|
</target>
|
|
|
|
<target name="prepare" depends="init">
|
|
<!-- So that we can use the ${TSTAMP}, ${DSTAMP} -->
|
|
<tstamp />
|
|
<filter token="timestamp" value="${DSTAMP}"/>
|
|
<copy todir="${target}/root" filtering="true" >
|
|
<fileset dir="content">
|
|
<include name="*.jsp*"/>
|
|
</fileset>
|
|
</copy>
|
|
<copy todir="${target}/root" filtering="false" >
|
|
<fileset dir="content">
|
|
<exclude name="*.jsp*"/>
|
|
<exclude name="*-INF/**"/>
|
|
</fileset>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="war" depends="prepare, compile">
|
|
<war destfile="${target}/plantuml.war" webxml="content/WEB-INF/web.xml">
|
|
<classes dir="content/WEB-INF/classes" />
|
|
<fileset dir="${target}/root" />
|
|
<lib dir="content/WEB-INF/lib" />
|
|
</war>
|
|
</target>
|
|
|
|
<target name="deploy" depends="main">
|
|
<copy file="${target}/plantuml.war" todir="${tomcat-home}/webapps" overwrite="true" />
|
|
</target>
|
|
|
|
<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>
|
|
|
|
</project>
|