forked from my2iu/Jinq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
92 lines (84 loc) · 3.56 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
<?xml version="1.0"?>
<project name="Jinq" default="Zip">
<property name="asmpartspostfix" value="-9.0.jar"/>
<property name="asm" location="sample/lib/asm-analysis-merged${asmpartspostfix}"/>
<property name="asmpartsprefix" location="sample/lib/asm"/>
<property name="rebasedasm" location="sample/lib/rebased-asm-analysis-merged${asmpartspostfix}"/>
<property name="jarjar" location="sample/lib/jarjar-1.4.jar"/>
<!--
<property name="derby" location="lib/derby.jar"/>
<property name="derbytools" location="lib/derbytools.jar"/>
<property name="derbydata" location="bin/derby/data"/>
-->
<property name="javax.persistence" location="sample/lib/javax.persistence-2.2.1-unsigned.jar"/>
<property name="jooq" location="lib/jooq-3.3.2.jar"/>
<target name="Rebase ASM library">
<jar destfile="${asm}">
<zipfileset src="${asmpartsprefix}${asmpartspostfix}"/>
<zipfileset src="${asmpartsprefix}-tree${asmpartspostfix}"/>
<zipfileset src="${asmpartsprefix}-analysis${asmpartspostfix}"/>
</jar>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpath="${jarjar}"/>
<jarjar jarfile="${rebasedasm}">
<zipfileset src="${asm}"/>
<rule pattern="org.objectweb.asm.**" result="org.jinq.rebased.org.objectweb.asm.@1"/>
<keep pattern="org.**"/>
</jarjar>
</target>
<target name="Build Jinq API" depends="Rebase ASM library">
<mkdir dir="bin"/>
<javac destdir="bin" debug="true" fork="true" includeantruntime="false">
<src path="api/src"/>
</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="${rebasedasm}"/>
</classpath>
<src path="analysis/src"/>
</javac>
</target>
<target name="Clean">
<delete includeemptydirs="true" quiet="true">
<fileset dir="bin"/>
<fileset dir="jarbin"/>
<fileset dir="sample/bin"/>
<fileset dir="sample/target"/>
</delete>
</target>
<target name="Jinq Jar">
<mkdir dir="jarbin"/>
<javac destdir="jarbin" fork="true" includeantruntime="false">
<classpath>
<pathelement location="${rebasedasm}"/>
<pathelement location="${jooq}"/>
<pathelement location="${javax.persistence}"/>
</classpath>
<src path="analysis/src"/>
<src path="api/src"/>
<src path="jinq-jpa/main"/>
<src path="jinq-jooq/main"/>
</javac>
<jar destfile="sample/lib/jinq-all.jar">
<fileset dir="jarbin"/>
</jar>
</target>
<target name="Zip" depends="Jinq Jar">
<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/**,lib/**,.settings/**,target/**,jarbin/**,jinq-jpa-test/**,jinq-jpa/**,jinq-jpa-scala/**,jinq-jooq/**,jinq-hibernate-legacy/**,*/target/**,sample/bin/**,**/derby.log,.classpath,sample/lib/asm*,sample/lib/rebased-asm*"/>
<zipfileset dir="jinq-jpa-test" prefix="Jinq/jinq-jpa-test" includes="src/**,pom.xml"/>
<zipfileset dir="jinq-jpa" prefix="Jinq/jinq-jpa" includes="main/**,test/**,pom.xml"/>
<zipfileset dir="jinq-jpa-scala" prefix="Jinq/jinq-jpa-scala" includes="src/**,pom.xml"/>
<zipfileset dir="jinq-hibernate-legacy" prefix="Jinq/jinq-hibernate-legacy" includes="main/**,test/**,pom.xml"/>
<zipfileset dir="jinq-jooq" prefix="Jinq/jinq-jooq" includes="main/**,test/**,pom.xml"/>
<zipfileset file="${rebasedasm}" fullpath="Jinq/sample/lib/rebased-asm-analysis-merged${asmpartspostfix}"/>
</zip>
</target>
</project>