File: build.xml

package info (click to toggle)
libspring-java 3.0.6.RELEASE-6%2Bdeb7u3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 50,504 kB
  • sloc: java: 325,411; xml: 67,956; sql: 176; makefile: 40; ruby: 33; sh: 6
file content (60 lines) | stat: -rw-r--r-- 3,040 bytes parent folder | download | duplicates (2)
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="org.springframework.asm" xmlns:ivy="antlib:org.apache.ivy.ant"
		xmlns:bundlor="antlib:com.springsource.bundlor.ant">
	<property file="${basedir}/../build.properties"/>
	<import file="${basedir}/../build-spring-framework/package-bundle.xml"/>
	<import file="${basedir}/../spring-build/standard/default.xml"/>

	<target name="jar" depends="ivy.init, jar.init, jarjar.init"
			description="Creates a JAR file containing the output of a compilation of the source tree.">
		<delete quiet="true" file="${ivy.output.file}"/>
		<mkdir dir="${ivy.output.dir}"/>
		<delete quiet="true" file="${jar.output.file}"/>
		<mkdir dir="${jar.output.dir}"/>
		<delete quiet="true" file="${source-jar.output.file}"/>
		<mkdir dir="${source-jar.output.dir}"/>

		<delete quiet="true" dir="${target.dir}/jarjar-staging"/>
		<mkdir dir="${target.dir}/jarjar-staging"/>
		<ivy:retrieve resolveId="asm.path" pattern="${target.dir}/jarjar-staging/[artifact].[ext]" conf="jarjar" type="jar"
			log="download-only"/>

		<jarjar destfile="${jar.output.file}" index="true" filesetmanifest="merge">
			<manifest>
				<attribute name="Bundle-ManifestVersion" value="2"/>
				<attribute name="Bundle-Version" value="${bundle.version}"/>
				<attribute name="Implementation-Title" value="${implementation.title}"/>
				<attribute name="Implementation-Version" value="${implementation.version}"/>
			</manifest>
			<zipfileset src="${target.dir}/jarjar-staging/com.springsource.org.objectweb.asm.jar"/>
			<zipfileset src="${target.dir}/jarjar-staging/com.springsource.org.objectweb.asm.commons.jar"/>
			<rule pattern="org.objectweb.asm.**" result="org.springframework.asm.@1"/>
		</jarjar>
		<antcall target="bundlor"/>
		<jar destfile="${source-jar.output.file}" basedir="${main.java.dir}" index="true"/>
		<ivy:publish resolver="integration" pubdate="${timestamp}" status="${release.type}">
			<artifacts pattern="${jar.output.dir}/[artifact].[ext]"/>
			<artifacts pattern="${source-jar.output.dir}/[artifact].[ext]"/>
			<artifacts pattern="${ivy.output.dir}/[artifact].[ext]"/>
			<artifacts pattern="${license.dir}/[artifact].[ext]"/>
		</ivy:publish>
	</target>

	<target name="jarjar.init" depends="ivy.init">
		<ivy:cachepath resolveId="jarjar.classpath" pathid="jarjar.classpath" organisation="com.google.jarjar"
				module="com.springsource.com.tonicsystems.jarjar" revision="1.0.0" conf="compile" inline="true"
				type="jar" log="download-only"/>
		<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpathref="jarjar.classpath"/>
	</target>

	<target name="bundlor" depends="bundlor.init" unless="disable.bundlor">
		<bundlor:bundlor inputPath="${jar.output.file}" outputPath="${jar.output.file}"
				bundleVersion="${bundle.version}" manifestTemplatePath="${manifest.template.file}"
				failOnWarnings="${fail.on.warnings}">
			<propertyset refid="bundlor.properties"/>
			<propertyset>
				<propertyref builtin="all"/>
			</propertyset>
		</bundlor:bundlor>
	</target>
</project>