File: build.xml

package info (click to toggle)
libxmpcore-java 5.1.2-3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,216 kB
  • ctags: 2,297
  • sloc: java: 10,218; xml: 122; makefile: 18
file content (152 lines) | stat: -rw-r--r-- 5,815 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
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
<!--
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
// Copyright 2006-2009 Adobe Systems Incorporated
// All Rights Reserved
//
// NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the terms
// of the Adobe license agreement accompanying it.
// =================================================================================================
-->

<project name="XMPCore Build File" default="build">
	
	<!-- Project Properties -->
	<property name='implementation.title' value='Adobe XMP Core'/>
	<property name='implementation.copyright' value='Copyright 2006-2009 Adobe Systems Incorporated. All rights reserved'/>
	<property name='implementation.version.major' value='5'/>
	<property name='implementation.version.minor' value='1'/>
	<property name='implementation.version.micro' value='0'/>
	<property name='implementation.version.tag' value='SDK'/>
	<property name='implementation.version.engbuild' value='003'/>
	<property name='app.name' value='xmpcore'/>
	<property name='src.dir' value='${basedir}/src'/>
	<property name='intermediate.dir' value='${basedir}/intermediate'/>
	<property name='target.dir' value='${basedir}/target'/>
	<property name="AdobeIPNumber" value="0000856"/>		

	<!-- Sets the build timestamp -->
	<tstamp>
		<format property="BuildDate" pattern="yyyy MMM dd HH:mm:ss-z" locale="en" />
	</tstamp>


	<!--  =================================================================== -->
	<!--  Build                                                               -->
	<!--  =================================================================== -->

	<target name="build" depends="clean, compile, createjars" />

	
	<!-- =================================================================== -->
	<!-- Compile                                                             -->
	<!-- =================================================================== -->

	<target name="compile">
		<echo message="Compiling ..." level="info" />

		<!-- debug -->
		<antcall target="javac">
			<param name="debug" value="true" />
			<param name="path" value="debug" />
		</antcall>

		<!-- release -->
				<antcall target="javac">
			<param name="debug" value="false" />
			<param name="path" value="release" />
		</antcall>
	</target>
	

	<!-- =================================================================== -->
	<!-- Compile Java files                                                  -->
	<!-- =================================================================== -->

	<target name="javac">
		<mkdir dir="${intermediate.dir}/${path}" />
		<javac debug="${debug}" destdir="${intermediate.dir}/${path}" source="1.6" target="1.6" encoding="iso-8859-1">
			<src path="${src.dir}" />
		</javac>
	</target>
	

	<!-- =================================================================== -->
	<!-- Create Jar Libraries                                                 -->
	<!-- =================================================================== -->

	<target name="createjars" depends="compile">
		<echo message="Create Libs ..." level="info" />
		<antcall target="createjar">
			<param name="path" value="debug" />
		</antcall>
		<antcall target="createjar">
			<param name="path" value="release" />
		</antcall>
		<zip destfile="${target.dir}/debug/${app.name}-src.zip">
			<fileset dir="${src.dir}" excludes="**/package.html"/>
		</zip>
	</target>

	<target name="createjar">
		<mkdir dir="${target.dir}/${path}" />
		<condition property="debugStr" value="true">
			<equals arg1="${path}" arg2="debug" />
		</condition>
		<condition property="debugStr" value="false">
			<equals arg1="${path}" arg2="release" />
		</condition>

		<jar destfile="${target.dir}/${path}/${app.name}.jar" update="false">
			<fileset dir="${intermediate.dir}/${path}">
				<patternset refid="jar.classes" />
			</fileset>
		</jar>
		
		<jar update="true" keepcompression="true" compress="false"
			 destfile="${target.dir}/${path}/${app.name}.jar">
			<manifest>
				<attribute name="Implementation-Title"
                           value="${implementation.title}" />
				<attribute name="Implementation-Vendor"
                           value="${implementation.copyright}" />
				<attribute name="Implementation-Major"
                           value="${implementation.version.major}" />
				<attribute name="Implementation-Minor"
                           value="${implementation.version.minor}" />
				<attribute name="Implementation-Micro"
                           value="${implementation.version.micro}" />
				<attribute name="Implementation-Debug"
                           value="${debugStr}" />
				<attribute name="Implementation-EngBuild"
                           value="${implementation.version.engbuild}" />
				<attribute name="BuildDate"
						   value="${BuildDate}" />
				<attribute name="AdobeIP"
                           value="&lt;AdobeIP#${AdobeIPNumber}&gt;" />
			</manifest>
		</jar>
	</target>
	
	
	<!-- =================================================================== -->
	<!-- Clean                                                               -->
	<!-- =================================================================== -->

	<target name="clean">
		<echo message="Clean..." level="info" />
		<delete dir="${intermediate.dir}" />
		<delete dir="${target.dir}" />
	</target>


	<!-- =================================================================== -->
	<!-- Filesets                                                            -->
	<!-- =================================================================== -->

	<!-- contents of the library jar -->
	<patternset id="jar.classes">
		<include name="**/*.class" />
		<include name="**/version.properties" />
	</patternset>
</project>