-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
180 lines (163 loc) · 7 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
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?xml version="1.0"?>
<project name="servoy-ptk" default="jar" basedir=".">
<property name="version" value="snapshot" />
<property name="src" value="src"/>
<property name="lib" value="lib"/>
<property name="examples" value="examples"/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<property name="distver" value="${dist}/servoy-ptk-${version}"/>
<property name="jar.file" value="${distver}/servoy-ptk.jar" />
<property name="example-jar.file" value="${distver}/servoy-ptk-examples.jar" />
<property name="srcjar.file" value="${distver}/servoy-ptk-src.jar" />
<property name="docjar.file" value="${distver}/servoy-ptk-doc.jar" />
<property name="dist.file" value="${dist}/servoy-ptk-${version}.zip"/>
<property environment="env"/>
<fileset id="servoy.libs" dir="${env.SERVOY_HOME}/application_server/lib">
<include name="j2db.jar"/>
<include name="j2dbdev.jar"/>
<include name="log4j.jar"/>
</fileset>
<path id="compile.path">
<fileset refid="servoy.libs"/>
</path>
<target name="setup">
<!-- get the current svn revision -->
<exec
logerror="true"
outputproperty="build.current.revision"
executable="svnversion">
<arg line="-n -c"/>
<redirector>
<outputfilterchain>
<tokenfilter>
<replaceregex pattern="^[0-9]*:?" replace="" flags="g"/>
</tokenfilter>
</outputfilterchain>
</redirector>
</exec>
<tstamp>
<format property="build.current.date" pattern="yyyy-MM-dd HH:mm:ss z" timezone="UTC"/>
</tstamp>
</target>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="compile" depends="setup">
<mkdir dir="${build}/classes" />
<javac
srcdir="${src}"
destdir="${build}/classes"
source="1.5"
target="1.5"
debug="on">
<classpath refid="compile.path"/>
</javac>
</target>
<target name="compile-examples" depends="setup, jar">
<mkdir dir="${build}/example-classes" />
<javac
srcdir="${examples}"
destdir="${build}/example-classes"
source="1.5"
target="1.5"
debug="on">
<classpath refid="compile.path"/>
<classpath location="${jar.file}"/>
</javac>
</target>
<target name="doc" >
<delete dir="${build}/javadoc"/>
<mkdir dir="${build}/javadoc"/>
<javadoc
packagenames="org.geekden.servoy.ptk"
destdir="${build}/javadoc"
use="true"
author="true"
protected="true"
windowtitle="Servoy Plugin Toolkit">
<sourcepath location="${src}"/>
<classpath refid="compile.path"/>
<link href="http://www.servoy.com/docs/public-api/41x"/>
<link href="http://java.sun.com/javase/6/docs/api"/>
</javadoc>
</target>
<target name="jar" depends="compile">
<mkdir dir="${distver}"/>
<jar destfile="${jar.file}">
<manifest>
<attribute name="Build-Creator" value="${user.name}"/>
<attribute name="Build-Date" value="${build.current.date}"/>
<attribute name="Specification-Title" value="Servoy Plugin Toolkit API Spec"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="Geekden.org"/>
<attribute name="Implementation-Title" value="Servoy Plugin Toolkit"/>
<attribute name="Implementation-Vendor" value="Geekden.org"/>
<attribute name="Implementation-Version" value="${version} build ${build.current.revision}"/>
</manifest>
<fileset dir="${build}/classes"/>
</jar>
</target>
<target name="jar-examples" depends="compile-examples">
<mkdir dir="${distver}"/>
<!-- Use jarjar to embed the Servoy PTK under an internal package so it
doesn't conflict with other plugins since they all share one
classpath in Servoy -->
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask"
classpath="${lib}/jarjar-1.4/jarjar.jar"/>
<jarjar destfile="${example-jar.file}">
<manifest>
<attribute name="Build-Creator" value="${user.name}"/>
<attribute name="Build-Date" value="${build.current.date}"/>
<attribute name="Specification-Title" value="Servoy Plugin Toolkit API Spec - Examples"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="Geekden.org"/>
<attribute name="Implementation-Title" value="Servoy Plugin Toolkit - Examples"/>
<attribute name="Implementation-Vendor" value="Geekden.org"/>
<attribute name="Implementation-Version" value="${version} build ${build.current.revision}"/>
</manifest>
<fileset dir="${build}/example-classes"/>
<zipfileset src="${jar.file}" includes="**/*.class"/>
<rule pattern="org.geekden.servoy.ptk.**" result="org.geekden.servoy.plugin.logger.internal.ptk.@1"/>
</jarjar>
</target>
<target name="srcjar">
<mkdir dir="${distver}"/>
<jar destfile="${srcjar.file}">
<manifest>
<attribute name="Build-Creator" value="${user.name}"/>
<attribute name="Build-Date" value="${build.current.date}"/>
<attribute name="Specification-Title" value="Servoy Plugin Toolkit API Spec - Source"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="Geekden.org"/>
<attribute name="Implementation-Title" value="Servoy Plugin Toolkit - Source"/>
<attribute name="Implementation-Vendor" value="Geekden.org"/>
<attribute name="Implementation-Version" value="${version} build ${build.current.revision}"/>
</manifest>
<fileset dir="${src}"/>
</jar>
</target>
<target name="docjar" depends="doc">
<mkdir dir="${distver}"/>
<jar destfile="${docjar.file}">
<manifest>
<attribute name="Build-Creator" value="${user.name}"/>
<attribute name="Build-Date" value="${build.current.date}"/>
<attribute name="Specification-Title" value="Servoy Plugin Toolkit API Spec - Javadoc"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="Geekden.org"/>
<attribute name="Implementation-Title" value="Servoy Plugin Toolkit - Javadoc"/>
<attribute name="Implementation-Vendor" value="Geekden.org"/>
<attribute name="Implementation-Version" value="${version} build ${build.current.revision}"/>
</manifest>
<fileset dir="${build}/javadoc"/>
</jar>
</target>
<target name="dist" depends="clean, jar, srcjar, docjar">
<copy toDir="${distver}">
<fileset dir="." includes="gpl.txt,lgpl.txt"/>
</copy>
<zip destfile="${dist.file}" basedir="${dist}"/>
</target>
</project>