-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
68 lines (56 loc) · 2.09 KB
/
build.xml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<project name="JPA Tests" default="compile">
<property name="sourcedir" value="${basedir}/src/entidades"/>
<property name="targetdir" value="${basedir}/build"/>
<property name="testdir" value="${basedir}/src/test"/>
<property name="librarydir" value="${basedir}/lib"/>
<property name="persistence" value="${basedir}/src/META-INF"/>
<path id="libraries">
<fileset dir="${librarydir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="${targetdir}"/>
<mkdir dir="${targetdir}"/>
</target>
<!-- Note about includeantruntime in javac: if you need the ant runtime in the classpath set it to yes/true otherwise to no/false -->
<target name="compile" depends="clean, copy-resources">
<javac srcdir="${sourcedir}"
destdir="${targetdir}"
includeantruntime="false"
classpathref="libraries"
debug="on"/>
</target>
<target name="copy-resources">
<copy todir="${targetdir}">
<fileset dir="${sourcedir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="compileTest" depends="copy-resources2, compile">
<javac srcdir="${testdir}"
destdir="${targetdir}"
includeantruntime="false"
classpathref="libraries"
debug="on"/>
</target>
<target name="copy-resources2">
<copy todir="${targetdir}">
<fileset dir="${testdir}">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="copy-resources3">
<copy todir="${targetdir}/META-INF">
<fileset dir="${persistence}"></fileset>
</copy>
</target>
<target name="run" depends="compile,compileTest,copy-resources3">
<java classname="test.TestBanquito" fork="true" classpathref="libraries">
<classpath path="${targetdir}"/>
<!-- <sysproperty key="java.net.preferIPv4Stack" value="false"/> -->
</java>
</target>
</project>