mirror of
https://github.com/octoleo/plantuml-server.git
synced 2024-12-22 08:48:54 +00:00
Unit testing included in the ant build file.
The dist directory is the default target of the build artefacts.
This commit is contained in:
parent
5a97a919ff
commit
c98015f417
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
|||||||
/user.property
|
/user.property
|
||||||
/content/WEB-INF/classes
|
/content/WEB-INF/classes
|
||||||
/plantuml.war
|
/plantuml.war
|
||||||
|
/dist
|
||||||
|
|
||||||
|
33
build.xml
33
build.xml
@ -3,21 +3,36 @@
|
|||||||
<target name="main" depends="clean,compile,war">
|
<target name="main" depends="clean,compile,war">
|
||||||
</target>
|
</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">
|
<target name="init">
|
||||||
<!-- overwrite with your own values in a user.property file -->
|
<!-- overwrite with your own values in a user.property file -->
|
||||||
<property file="user.property" />
|
<property file="user.property" />
|
||||||
<property name="target" value="." description="Target directory of the build"/>
|
<property name="target" value="dist" description="Target directory of the build"/>
|
||||||
<property name="tomcat-home" value="/tomcat" description="Home directory of Tomcat"/>
|
<property name="tomcat-home" value="/tomcat" description="Home directory of Tomcat"/>
|
||||||
<property name="debug" value="false" />
|
<property name="debug" value="false" />
|
||||||
|
<mkdir dir="${target}" />
|
||||||
<path id="project-classpath">
|
<path id="project-classpath">
|
||||||
<fileset dir="content/WEB-INF/lib" includes="*.jar" />
|
<fileset dir="content/WEB-INF/lib" includes="*.jar" />
|
||||||
<fileset dir="${tomcat-home}/lib" includes="*.jar" />
|
<fileset dir="${tomcat-home}/lib" includes="*.jar" />
|
||||||
</path>
|
</path>
|
||||||
|
<path id="test-classpath">
|
||||||
|
<fileset dir="test/lib" includes="*.jar" />
|
||||||
|
<pathelement location="${target}"/>
|
||||||
|
</path>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean" depends="init">
|
<target name="clean" depends="init">
|
||||||
<delete file="${target}/plantuml.war" />
|
<delete file="${target}/plantuml.war" />
|
||||||
<mkdir dir="${target}" />
|
<delete>
|
||||||
|
<fileset dir="${target}" includes="**/*.class"/>
|
||||||
|
</delete>
|
||||||
<delete dir="content/WEB-INF/classes" />
|
<delete dir="content/WEB-INF/classes" />
|
||||||
<mkdir dir="content/WEB-INF/classes" />
|
<mkdir dir="content/WEB-INF/classes" />
|
||||||
</target>
|
</target>
|
||||||
@ -38,4 +53,18 @@
|
|||||||
<copy file="${target}/plantuml.war" todir="${tomcat-home}/webapps" overwrite="true" />
|
<copy file="${target}/plantuml.war" todir="${tomcat-home}/webapps" overwrite="true" />
|
||||||
</target>
|
</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>
|
</project>
|
||||||
|
Loading…
Reference in New Issue
Block a user