-
Notifications
You must be signed in to change notification settings - Fork 3
/
build-common.xml
95 lines (81 loc) · 2.52 KB
/
build-common.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
<?xml version="1.0"?>
<!DOCTYPE project>
<project name="build-commmon">
<property environment="env" />
<property file="${project.dir}/build.${user.name}.properties" />
<property file="${project.dir}/build.${env.COMPUTERNAME}.properties" />
<property file="${project.dir}/build.${env.HOST}.properties" />
<property file="${project.dir}/build.${env.HOSTNAME}.properties" />
<property file="${project.dir}/build.properties" />
<tstamp>
<format property="current.time" pattern="yyMMddhhmmss" />
</tstamp>
<path id="lib.classpath">
<fileset dir="${project.dir}/lib" includes="*.jar" excludes="ant.jar" />
</path>
<path id="test.classpath">
<fileset dir="${project.dir}/lib" includes="biz.aQute.bnd.jar,commons-logging.jar,log4j.jar,org.springframework.*.jar" />
<fileset dir="${project.dir}/lib/test" includes="ant-junit.jar,junit.jar" />
<path path="${project.dir}/classes/sr" />
<path path="${project.dir}/classes/core" />
<path path="${project.dir}/classes/osgi" />
</path>
<path id="bundle.classpath">
<path refid="lib.classpath" />
<path path="${project.dir}/classes/sr" />
<path path="${project.dir}/classes/core" />
<path path="${project.dir}/classes/osgi" />
<path path="${project.dir}/test-classes" />
</path>
<taskdef classpathref="lib.classpath" resource="aQute/bnd/ant/taskdef.properties" />
<taskdef classpathref="lib.classpath" resource="net/sf/antcontrib/antlib.xml" />
<taskdef classpathref="test.classpath" name="junit" classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask"/>
<if>
<not>
<isset property="class" />
</not>
<then>
<var name="class" value="*Test*" />
</then>
</if>
<if>
<not>
<equals arg1="${junit.debug}" arg2="true" />
</not>
<then>
<var name="junit.debug.jpda" value="" />
</then>
</if>
<target name="clean-bundle">
<delete dir="classes" />
<delete file="${ant.project.name}.jar" />
</target>
<target name="compile-bundle">
<mkdir dir="classes" />
<copy todir="classes">
<fileset dir="src" excludes="**/*.java" />
</copy>
<javac
classpathref="bundle.classpath"
compiler="${javac.compiler}"
debug="${javac.debug}"
deprecation="${javac.deprecation}"
destdir="classes"
encoding="${javac.encoding}"
includeAntRuntime="false"
nowarn="${javac.nowarn}"
srcdir="src"
/>
</target>
<target name="jar-bundle" depends="clean-bundle,compile-bundle">
<bnd
classpath="classes"
eclipse="false"
exceptions="true"
failok="false"
files="bnd.bnd"
output="."
sourcepath="src"
/>
</target>
</project>