-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
executable file
·91 lines (80 loc) · 2.88 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file provides limited functionalities for system without Python.
If Python is available, the play command is recommended over this build file.
Usage:
Example 1:
export PLAY_PATH=/home/user/play
ant run
Sets play path to the environment variable PLAY_PATH and then runs play with target run.
Example 2:
ant run -Dplay.path=/home/user/play
Gives the play path to the ant as command line property.
Example 3:
build.xml:
...
<property name="play.path" value="/home/user/play"/>
...
ant run
Sets the play path to the build.xml directly.
-->
<project basedir=".">
<!-- -Dplay.path=...
<property name="play.path" value="${env.PLAY1_PATH}"/>
-->
<!--
<import file="${play.path}/resources/application-build.xml"/>
-->
<!-- APT based code generation -->
<property name="src" value="${basedir}/app"/>
<property name="generated" value="${basedir}/app"/>
<property name="dst" value="${basedir}/build" />
<property name="lib.dir" value="${basedir}/lib"/>
<property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<fail unless="play.path" message="must define -Dplay.path=${PLAY_PATH}" />
<path id="cp">
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${play.path}/framework/lib">
<include name="*.jar"/>
</fileset>
<fileset dir="${play.path}/framework">
<include name="play-*.jar"/>
</fileset>
</path>
<target name="build">
<delete verbose="true">
<fileset dir="${src}" includes="models/**/query/*.java"/>
<fileset dir="${src}" includes="play/db/jpa/query/*.java"/>
</delete>
<mkdir dir="${dst}"/>
<javac destdir="${dst}" classpathref="cp" includeantruntime="false"
target="1.8" source="1.8">
<compilerclasspath refid="cp" />
<src path="${play.path}/framework/src"/>
<filename name="play/db/jpa/*.java"/>
<compilerarg value="-proc:only"/>
<compilerarg value="-Aquerydsl.packageSuffix=.query"/>
<compilerarg value="-processor"/>
<compilerarg value="com.querydsl.apt.jpa.JPAAnnotationProcessor"/>
<compilerarg value="-s"/>
<compilerarg value="${generated}"/>
</javac>
<javac destdir="${dst}" classpathref="cp" includeantruntime="false"
target="1.8" source="1.8">
<compilerclasspath refid="cp" />
<src path="${src}" />
<filename name="models/**/*.java"/>
<compilerarg value="-proc:only"/>
<compilerarg value="-Aquerydsl.packageSuffix=.query"/>
<compilerarg value="-processor"/>
<compilerarg value="com.querydsl.apt.jpa.JPAAnnotationProcessor"/>
<compilerarg value="-s"/>
<compilerarg value="${generated}"/>
</javac>
<delete verbose="true">
<fileset dir="${src}" includes="**/*.class" />
</delete>
</target>
</project>