Attachment 'build.xml'
Download 1 <?xml version="1.0" encoding="ISO-8859-1"?>
2
3 <project name="TWikiDrawPlugin" default="build" basedir=".">
4
5 <property name="repository.home" value="repository"/>
6 <property name="build.home" value="build"/>
7
8 <!--
9 For offline build you can specify local repository path using "file:" protocol instead of "http:".
10 To avoid download of plugin components make sure what all distribution archives and patches
11 are situated in the ${repository.home} directory.
12 -->
13 <!-- The primary plugin's source repository URL -->
14 <property name="TWikiDrawPlugin.loc"
15 value="http://twiki.org/p/pub/Plugins/TWikiDrawPlugin/"/>
16
17 <!-- MoinMoin patches repository URL -->
18 <property name="TWikiDrawPlugin.patched.loc"
19 value="http://moinmoin.wikiwikiweb.de/OliverGraf/TWikiDrawPlugin?action=AttachFile&do=get&target="/>
20
21 <!-- MoinMoin patch filename -->
22 <property name="TWikiDrawPlugin.patch.name"
23 value="twikidraw-1.103-full.diff"/>
24
25 <target name="-init">
26 <mkdir dir="${repository.home}"/>
27 <mkdir dir="${build.home}/classes"/>
28 </target>
29
30 <target name="-checkfile">
31 <echo message="Checking ${file}"/>
32 <available file="${repository.home}/${file}" property="havefile"/>
33 </target>
34
35 <target name="getfile" unless="havefile" depends="-checkfile">
36 <get src="${url}${file}" dest="${repository.home}/${file}" />
37 </target>
38
39 <!--
40 If you already have source code prepared to be compiled in ${build.home}/current directory
41 specify "source.code.is.ready" property to avoid extraction and patching of distribution archives.
42 -->
43 <target name="prepare-source-code" depends="-init" unless="source.code.is.ready">
44
45 <antcall target="getfile">
46 <param name="url" value="${TWikiDrawPlugin.loc}"/>
47 <param name="file" value="TWikiDrawPlugin.zip"/>
48 </antcall>
49 <antcall target="getfile">
50 <param name="url" value="${TWikiDrawPlugin.patched.loc}"/>
51 <param name="file" value="${TWikiDrawPlugin.patch.name}"/>
52 </antcall>
53 <antcall target="getfile">
54 <param name="url" value="${TWikiDrawPlugin.patched.loc}"/>
55 <param name="file" value="twikidraw-png.zip"/>
56 </antcall>
57
58 <unzip src="${repository.home}/TWikiDrawPlugin.zip" dest="${build.home}">
59 <patternset>
60 <include name="lib/**/source.zip"/>
61 </patternset>
62 </unzip>
63 <unzip dest="${build.home}/current">
64 <fileset dir="${build.home}">
65 <include name="lib/**/source.zip"/>
66 </fileset>
67 </unzip>
68 <unzip dest="${build.home}/current"
69 src="${repository.home}/twikidraw-png.zip"/>
70
71 <patch patchfile="${repository.home}/${TWikiDrawPlugin.patch.name}"
72 strip="1" dir="${build.home}/current"/>
73 </target>
74
75 <target name="build" depends="-init, prepare-source-code"
76 description="Build TWikiDrawPlugin JAR">
77 <javac destdir="${build.home}/classes"
78 source="1.3" target="1.1">
79 <src path="${build.home}/current/src"/>
80 <src path="${build.home}/current/packages"/>
81 </javac>
82
83 <jar destfile="${build.home}/twikidraw.jar">
84 <fileset dir="${build.home}/classes"/>
85 </jar>
86 </target>
87
88 <target name="clean"
89 description="Remove generated files">
90 <delete dir="${build.home}"/>
91 </target>
92
93 <target name="clean-all" depends="clean"
94 description="Remove ALL intermediate files">
95 <delete dir="${repository.home}"/>
96 </target>
97
98 </project>
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.