-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
80 lines (70 loc) · 2.85 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
<?xml version="1.0"?>
<project name="weld-guiceconfig" default="jar">
<property file="build.properties"/>
<path id="compile.classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
<fileset dir="${lib.dir}/build" includes="*.jar"/>
<fileset dir="${lib.dir}/test" includes="*.jar"/>
</path>
<target name="compile" description="Compile Java source.">
<mkdir dir="${build.dir}/classes"/>
<javac srcdir="${src.dir}"
debug="on"
destdir="${build.dir}/classes"
source="1.5" target="1.5">
<classpath refid="compile.classpath"/>
</javac>
<copy toDir="${build.dir}/classes">
<fileset dir="${src.dir}" excludes="**/*.iml"/>
</copy>
</target>
<target name="test.compile"
depends="compile"
description="Compile test source.">
<mkdir dir="${build.dir}/test"/>
<javac srcdir="${test.dir}"
debug="on"
destdir="${build.dir}/test"
source="1.5" target="1.5">
<classpath path="${build.dir}/classes"/>
<classpath path="${build.dir}/test"/>
<classpath refid="compile.classpath"/>
</javac>
<copy toDir="${build.dir}/test">
<fileset dir="${test.dir}" excludes="**/*.java"/>
</copy>
</target>
<target name="test"
depends="test.compile"
description="Execute JUnit tests.">
<java fork="true"
classname="junit.textui.TestRunner"
failonerror="true"
taskname="junit">
<classpath>
<pathelement location="${build.dir}/test"/>
<pathelement location="${build.dir}/classes"/>
<path refid="compile.classpath"/>
</classpath>
<arg value="weld.guiceconfig.AllTests"/>
</java>
</target>
<target name="clean"
description="Remove generated files.">
<delete dir="${build.dir}"/>
</target>
<target name="jar" depends="compile"
description="Build jar with dependencies embedded.">
<mkdir dir="${build.dir}/dist"/>
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpath="${lib.dir}/build/jarjar-1.0.jar"/>
<jarjar jarfile="${build.dir}/${ant.project.name}-with-deps.jar">
<fileset dir="${build.dir}/classes"/>
<zipfileset src="${lib.dir}/guava-r06.jar"/>
<zipfileset src="${lib.dir}/weld-extensions-bare.jar"/>
<rule pattern="com.google.common.**" result="weld.guiceconfig.dependencies.guava.@1"/>
<rule pattern="org.jboss.weld.extensions.**" result="weld.guiceconfig.dependencies.weld.extensions.@1"/>
<keep pattern="weld.guiceconfig.**"/>
</jarjar>
</target>
</project>