-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.xml
More file actions
39 lines (33 loc) · 1.4 KB
/
build.xml
File metadata and controls
39 lines (33 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<project name="watchTest" basedir="." default="run">
<property name="watched.dir" value="${basedir}/src/test/resources"/>
<property name="src.dir" value="${basedir}/src/main/java"/>
<property name="src.test.dir" value="${basedir}/src/test/java"/>
<property name="target.dir" value="${basedir}/target/classes"/>
<property name="target.test.dir" value="${basedir}/target/test-classes"/>
<target name="run">
<watch>
<when>
<target name="printMessage"/>
<fileset dir="${watched.dir}" includes="**/*"/>
</when>
<when>
<target name="compile"/>
<fileset dir="${src.dir}" includes="**/*"/>
</when>
</watch>
</target>
<target name="clean">
<delete dir="${target.dir}" includes="**/*"/>
<delete dir="${target.test.dir}" includes="**/*"/>
</target>
<target name="compile" depends="clean">
<mkdir dir="${target.dir}"/>
<javac srcdir="${src.dir}" debug="true" destdir="${target.dir}" includeantruntime="true"/>
<mkdir dir="${target.test.dir}"/>
<javac srcdir="${src.test.dir}" debug="true" destdir="${target.test.dir}" includeantruntime="false"/>
</target>
<target name="printMessage">
<echo>Something has happened.</echo>
<echo>A file has changed! ${watched.file}</echo>
</target>
</project>