-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
85 lines (72 loc) · 3.29 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================================
h2zero
The ORM generator for java with
- Java POJO Models
- SQL Scripts
- Tag libraries
- Form Beans (in progress)
- Administration pages (in progress)
====================================================================== -->
<project name="h2zero" default="test-h2zero">
<property name="lib.dir" value="lib/runtime" />
<property name="util.lib.dir" value="lib/compile" />
<property name="test.lib.dir" value="lib/test" />
<property file="version.properties" />
<property file="../credentials.properties" />
<target name="dist" description="Build the h2zero distributable">
<antcall target="java-build.clean" />
<antcall target="java-build.compile" />
<copy todir="${build.classes.dir}">
<fileset dir="${src.java.dir}">
<include name="*.properties"/>
</fileset>
</copy>
<jar destfile="${dist.dir}/h2zero.jar" manifest="src/main/resources/META-INF/MANIFEST.MF">
<fileset dir="${build.classes.dir}">
<include name="**/*.*" />
</fileset>
<fileset dir="${src.dir}/resources">
<include name="**/*.templar" />
</fileset>
<fileset dir="${src.dir}/resources/img">
<include name="**/*.*" />
</fileset>
<zipgroupfileset dir="lib/runtime" includes="templar.jar" />
<zipgroupfileset dir="lib/runtime" includes="JSON-java.jar" />
</jar>
<zip destfile="${dist.dir}/${ant.project.name}.zip">
<zipfileset dir="${dist.dir}" includes="**/*.*" />
<zipfileset dir="." includes="build-h2zero.xml" />
<zipfileset dir="${lib.dir}">
<include name="**/**.jar" />
<exclude name="templar.jar" />
<exclude name="JSON-java.jar" />
</zipfileset>
</zip>
</target>
<path id="classpath-h2zero-dist">
<fileset dir="build/libs">
<include name="*.jar"/>
</fileset>
<fileset dir="libs">
<include name="*.jar"/>
</fileset>
</path>
<target name="test-h2zero" description="test the h2zero generation">
<delete dir="generate/src/main/java/*" />
<taskdef resource="h2zero.properties" classpathref="classpath-h2zero-dist" />
<h2zero inFile="src/test/resources/sample.h2zero" outDir="." verbose="false" />
<!-- now try and javac the generated code
<javac srcdir="${basedir}/src/test/java" destdir="${basedir}/build/classes" debug="on" classpathref="compile.classpath" includeantruntime="false" compiler="javac1.6" source="1.6" target="1.6" />
-->
</target>
<target name="test-h2zero-quick" description="test the h2zero quick generation">
<taskdef resource="h2zero.properties" classpath="${dist.dir}/h2zero.jar;${lib.dir}/templar.jar;${lib.dir}/log4j-1.2.17.jar;${lib.dir}/mail.jar" />
<h2zero.quick tables="environment, server, baseapp, server_baseapp, version" foreign="server.environment,baseapp.server,server_baseapp.server,server_baseapp.baseapp,version.baseapp" />
</target>
<target name="test-h2zero-revenge" description="test the h2zero reverse engineering">
<taskdef resource="h2zero.properties" classpath="${dist.dir}/h2zero.jar;${lib.dir}/templar.jar;${lib.dir}/mysql-connector-java-5.1.10-bin.jar;${lib.dir}/log4j-1.2.17.jar;${lib.dir}/mail.jar" />
<h2zero.revenge outFile="sample.h2zero" host="localhost" database="sample" user="root" password="password" />
</target>
</project>