File: build.xml

package info (click to toggle)
libsis-base-java 18.09~pre1+git20180827.fe4953e+dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,156 kB
  • sloc: java: 9,106; ansic: 813; xml: 160; sh: 139; makefile: 35
file content (163 lines) | stat: -rw-r--r-- 6,152 bytes parent folder | download
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<project name="base" default="dist" basedir="..">
	<target name="clean">
		<delete dir="${dist}" />
	</target>

	<import file="../../build_resources/ant/build-common.xml" />

	<project-classpath name="ecp" classes="${classes}" />
	<property name="distfolder" value="sis-base" />
	<property name="mainfolder" value="base" />
	<property name="jar.file" value="${dist}/sis-base.jar" />
	<property name="dist.file" value="${dist}/sis-base" />
	<property name="jar.test.file" value="${dist}/sis-base-test.jar" />
	<property name="src.zip.file" value="${dist}/sis-base-src.zip" />
	<property name="javadoc.zip.file" value="${dist}/sis-base-javadoc.zip" />
	<property name="original.dist" value="../${ant.project.name}/dist" />
	<property name="nativesrc" value="libs/native" />
	<property name="nativeroot" value="${targets}/ant" />
	<property name="native" value="${nativeroot}/native" />

	<property name="dist.common" value="${dist}/${mainfolder}" />
	<property name="dist.common.lib" value="${dist.common}/lib" />


	<target name="ci" depends="build-common.ci, check-dependencies, dist" />

	<target name="jar" depends="compile">
		<mkdir dir="${dist.common.lib}" />
		<build-info revision="revision.number" version="version.number" clean="clean.flag" />
		<echo file="${build.info.file}">${version.number}:${revision.number}:${clean.flag}</echo>
		<copy todir="${native}">
			<fileset dir="${nativesrc}">
				<include name="**/libunix.so" />
				<include name="**/libunix.jnilib" />
			</fileset>
		</copy>
		<copy todir="${native}">
			<fileset dir="${nativesrc}">
				<include name="**/libnativedata.so" />
				<include name="**/libnativedata.jnilib" />
				<include name="**/nativedata.dll" />
			</fileset>
		</copy>
		<recursive-jar destfile="${jar.file}">
			<fileset dir="${classes}">
				<include name="**/*.class" />
				<include name="${build.info.filename}" />
			</fileset>
			<fileset dir="${nativeroot}">
				<include name="native/**/*.so" />
				<include name="native/**/*.jnilib" />
				<include name="native/**/*.dll" />
			</fileset>
			<manifest>
				<attribute name="Main-Class"
				           value="ch.systemsx.cisd.base.BuildAndEnvironmentInfo" />
				<attribute name="Version" value="${version.number}" />
				<attribute name="Build-Number"
				           value="${version.number} (r${revision.number},${clean.flag})" />
			</manifest>
		</recursive-jar>
	</target>

	<target name="jar-test" depends="compile-tests">
		<mkdir dir="${dist.common.lib}" />
		<build-info revision="revision.number" version="version.number" clean="clean.flag" />
		<echo file="${build.info.file}">${version.number}:${revision.number}:${clean.flag}</echo>
		<copy todir="${native}">
			<fileset dir="${nativesrc}">
				<include name="**/libunix.so" />
				<include name="**/libunix.jnilib" />
			</fileset>
		</copy>
		<copy todir="${native}">
			<fileset dir="${nativesrc}">
				<include name="**/libnativedata.so" />
				<include name="**/libnativedata.jnilib" />
				<include name="**/nativedata.dll" />
			</fileset>
		</copy>
		<recursive-jar destfile="${jar.test.file}">
			<fileset dir="${classes}">
				<include name="**/*.class" />
				<include name="${build.info.filename}" />
			</fileset>
			<fileset dir="${nativeroot}">
				<include name="native/**/*.so" />
				<include name="native/**/*.jnilib" />
				<include name="native/**/*.dll" />
			</fileset>
			<zipfileset src="${lib}/testng/testng-jdk15.jar" />
			<zipfileset src="${lib}/commons-lang/commons-lang.jar" />
			<zipfileset src="${lib}/commons-io/commons-io.jar" />
			<manifest>
				<attribute name="Main-Class" value="ch.systemsx.cisd.base.AllTests" />
				<attribute name="Version" value="${version.number}" />
				<attribute name="Build-Number"
				           value="${version.number} (r${revision.number},${clean.flag})" />
			</manifest>
		</recursive-jar>
	</target>

	<target name="src-zip">
		<build-info revision="revision.number" version="version.number" clean="clean.flag" />
		<mkdir dir="${classes}" />
		<echo file="${build.info.file}">${version.number}:${revision.number}:${clean.flag}</echo>
		<jar destfile="${src.zip.file}">
			<fileset dir="${classes}">
				<include name="${build.info.filename}" />
			</fileset>
			<fileset dir="${sources}">
				<include name="**/*.java" />
			</fileset>
			<fileset dir="${sources.test}">
				<include name="ch/systemsx/cisd/base/tests/**/*.java" />
			</fileset>
			<manifest>
				<attribute name="Version" value="${version.number}" />
				<attribute name="Build-Number"
				           value="${version.number} (r${revision.number},${clean.flag})" />
			</manifest>
		</jar>
	</target>

	<target name="doc">
		<delete dir="targets/doc" />
		<javadoc sourcepath="source/java"
		         packagenames="ch.systemsx.cisd.base.*"
		         classpath="../libraries/commons-lang/commons-lang.jar:../libraries/commons-io/commons-io.jar:../libraries/testng/testng-jdk15.jar:../libraries/restrictionchecker/restrictions.jar"
		         destdir="targets/doc"
		         access="public" />
	</target>

	<target name="dist" depends="clean, jar, jar-test, src-zip, doc">
		<zip destfile="${javadoc.zip.file}" basedir="${targets}" includes="doc/**" />
		<delete dir="${dist}/${mainfolder}" />
		<delete dir="${dist}/${distfolder}" />
		<move file="${jar.file}" todir="${dist}/${distfolder}/lib" />
		<move file="${jar.test.file}" todir="${dist}/${distfolder}/lib" />
		<move file="${src.zip.file}" todir="${dist}/${distfolder}/src" />
		<move file="${javadoc.zip.file}" todir="${dist}/${distfolder}/doc" />
		<copy todir="${dist}/${distfolder}/doc">
			<fileset dir="doc" includes="**" />
		</copy>
	  <copy todir="${dist}/${distfolder}">
	    <fileset dir="${original.dist}"/>
	  </copy>
		<zip destfile="${dist.file}-${version.number}-r${revision.number}.zip"
		     basedir="${dist}"
		     includes="${distfolder}/**" />
		<delete dir="${dist}/${distfolder}" />
	</target>

	<!--
	  // Runs the test suite 'tests.xml'.
	  -->
	<target name="run-tests" description="Runs the test suite 'tests.xml'.">
		<antcall target="build-common.run-tests">
			<param name="test.suite" value="tests.xml" />
		</antcall>
	</target>

</project>