forked from my2iu/Jinq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
125 lines (112 loc) · 3.84 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?xml version="1.0"?>
<project name="Jinq" default="RunDemo">
<property name="asm" location="lib/asm-all-5.0.1.jar"/>
<property name="derby" location="lib/derby.jar"/>
<property name="derbytools" location="lib/derbytools.jar"/>
<property name="derbydata" location="bin/derby/data"/>
<target name="Build Jinq API">
<mkdir dir="bin"/>
<javac destdir="bin" debug="true" fork="true" includeantruntime="false">
<src path="api"/>
</javac>
</target>
<target name="Build Jinq Analysis Framework" depends="Build Jinq API">
<mkdir dir="bin"/>
<javac destdir="bin" debug="true" fork="true" includeantruntime="false">
<classpath>
<pathelement location="${asm}"/>
</classpath>
<src path="analysis"/>
</javac>
</target>
<target name="Build Jinq Mini-ORM">
<mkdir dir="bin"/>
<javac destdir="bin" debug="true" fork="true" includeantruntime="false">
<src path="orm"/>
</javac>
<jar destfile="lib/miniorm.jar">
<fileset dir="bin"/>
<fileset dir="orm" includes="**/*.xslt"/>
</jar>
</target>
<target name="Build Jinq" depends="Build Jinq API,Build Jinq Analysis Framework">
<mkdir dir="bin"/>
<javac destdir="bin" debug="true" fork="true" includeantruntime="false">
<classpath>
<pathelement location="${asm}"/>
</classpath>
<src path="queryll2"/>
</javac>
</target>
<target name="Generate Demo ORM Entities" depends="Build Jinq Mini-ORM">
<mkdir dir="demogen/com/example/orm/test/entities"/>
<java classname="ch.epfl.labos.iu.orm.tools.EntityGenerator" fork="true">
<classpath>
<pathelement location="lib/miniorm.jar"/>
</classpath>
<arg file="demosrc/entities.xml"/>
<arg path="demogen"/>
</java>
</target>
<target name="Build Demo" depends="Generate Demo ORM Entities,Build Jinq">
<javac destdir="bin" debug="true" fork="true" includeantruntime="false">
<classpath>
<pathelement location="${asm}"/>
<pathelement location="bin"/>
</classpath>
<src path="demogen"/>
<src path="demosrc"/>
</javac>
</target>
<target name="Create Demo Derby DB Data (Optional)">
<mkdir dir="${derbydata}"/>
<java fork="true" classname="org.apache.derby.tools.ij" dir="${derbydata}">
<classpath>
<pathelement location="${derby}"/>
<pathelement location="${derbytools}"/>
</classpath>
<jvmarg value="-Dij.driver=org.apache.derby.jdbc.EmbeddedDriver"/>
<arg file="demosrc/entities.sql"/>
<jvmarg value="-Dij.user=APP"/>
<jvmarg value="-Dij.password=APP"/>
</java>
</target>
<target name="RunDemo" depends="Build Demo">
<java classname="Main" dir="bin" fork="true">
<classpath>
<pathelement location="${asm}"/>
<pathelement location="bin"/>
</classpath>
<arg value="-nodb"/>
</java>
</target>
<!-- Runs the demo above, but actually sends the queries to a Derby database to run -->
<target name="RunDemoWithDb" depends="Build Demo,Create Demo Derby DB Data (Optional)">
<java classname="Main" dir="bin" fork="true">
<classpath>
<pathelement location="${asm}"/>
<pathelement location="${derby}"/>
<pathelement location="bin"/>
</classpath>
<arg value="-db"/>
<sysproperty key="derby.system.home" path="${derbydata}"/>
</java>
</target>
<target name="Clean">
<delete includeemptydirs="true" quiet="true">
<fileset dir="bin"/>
<fileset dir="demogen" includes="**" excludes="pom.xml"/>
</delete>
</target>
<target name="Zip">
<tstamp>
<format property="tstamp" pattern="yyyy-MM-dd-HH-mm" />
</tstamp>
<mkdir dir="lib/lib"/>
<zip destfile="jinq-${tstamp}.zip">
<zipfileset dir="." prefix="Jinq" excludes="**/CVS,bin/**,demogen/**,lib/**,.settings/**"/>
<zipfileset file="demogen/pom.xml" prefix="Jinq/demogen"/>
<zipfileset dir="lib/lib" fullpath="Jinq/lib"/>
</zip>
</target>
</project>