-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.xml
149 lines (116 loc) · 5.23 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
<?xml version="1.0"?>
<!-- ant build file for Sharesite -->
<project name="Sharesite" default="dist" basedir=".">
<property name="freenet-cvs-snapshot.location" location="../fred/build/libs/freenet.jar"/>
<property name="freenet-ext.location" location="../fred/lib/freenet/freenet-ext.jar"/>
<property name="wikitext-src.location" location="wikitext-standalone.zip"/>
<property name="source-version" value="1.7"/>
<property name="target-version" value="1.7"/>
<property name="build" location="build/"/>
<property name="dist" location="dist/"/>
<property name="src" location="src/"/>
<property name="unpacked" location="unpacked/"/>
<target name="mkdir">
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<echo message="Using ${freenet-cvs-snapshot.location} as freenet-cvs-snapshot.jar"/>
<echo message="Using ${freenet-ext.location} as freenet-ext.jar"/>
</target>
<!-- ================================================== -->
<target name="compile" depends="mkdir" >
<!-- Create the time stamp -->
<tstamp/>
<javac srcdir="src/" destdir="${build}" debug="on" optimize="on" source="${source-version}" target="${target-version}">
<classpath>
<pathelement location="${freenet-ext.location}"/>
<pathelement location="${freenet-cvs-snapshot.location}"/>
</classpath>
<include name="**/*.java"/>
<exclude name="**/*Test.java"/>
<exclude name="**/TextileJPlugin.java" />
<exclude name="**/MarkupValidator.java" />
</javac>
</target>
<!-- copy the wikitext sources -->
<target name="import" depends="" >
<mkdir dir="${unpacked}"/>
<unzip src="${wikitext-src.location}" dest="${unpacked}" >
<patternset>
<include name="**/*.java"/>
<include name="**/*.properties"/>
<!-- we don't need the Eclipse plugin -->
<exclude name="**/WikiTextPlugin.java" />
<exclude name="**/TextileJPlugin.java" />
<exclude name="**/MarkupValidator.java" />
<exclude name="**/mylyn/wikitext/core/WikiText.java" />
<exclude name="**/EclipseServiceLocator.java" />
<exclude name="**/mylyn/wikitext/core/validation/MarkupValidator.java" />
<exclude name="**/package-info.java" />
<!-- we don't need the HTML to markup compiler -->
<exclude name="**/parser/html/*.java" />
<exclude name="**/HtmlParser.java" />
<exclude name="**/HtmlToMarkupTask.java" />
</patternset>
</unzip>
<!-- remove the version number from the directory name -->
<path id="wikitext-path">
<dirset dir="${unpacked}">
<include name="wikitext-standalone-*" />
</dirset>
</path>
<property name="wikitext-path-x" refid="wikitext-path" />
<echo message="rename ${wikitext-path-x} to ${unpacked}/wikitext-standalone" />
<move file="${wikitext-path-x}" tofile="${unpacked}/wikitext-standalone" />
<copy todir="${src}/plugins/Sharesite/">
<fileset dir="${unpacked}/wikitext-standalone/src/org.eclipse.mylyn.wikitext.textile.core/src/org/eclipse">
<include name="mylyn/**/*.java"/>
<include name="mylyn/**/*.properties"/>
</fileset>
<filterchain>
<replacestring from="org.eclipse.mylyn" to="plugins.Sharesite.mylyn" />
<replacestring from="import plugins.Sharesite.mylyn.wikitext.core.parser.HtmlParser;"
to="//import plugins.Sharesite.mylyn.wikitext.core.parser.HtmlParser;" />
</filterchain>
</copy>
<copy todir="${src}/plugins/Sharesite/">
<fileset dir="${unpacked}/wikitext-standalone/src/org.eclipse.mylyn.wikitext.core/src/org/eclipse/">
<include name="mylyn/**/*.java"/>
<include name="mylyn/**/*.properties"/>
</fileset>
<filterchain>
<replacestring from="org.eclipse.mylyn" to="plugins.Sharesite.mylyn" />
</filterchain>
</copy>
</target>
<!-- ================================================== -->
<target name="dist" depends="compile" description="generate the distribution" >
<buildnumber file="build.txt" />
<echo message="Sharesite build ${build.number}" />
<jar jarfile="${dist}/Sharesite-b${build.number}.jar" duplicate="fail" filesetmanifest="skip">
<manifest>
<attribute name="Plugin-Main-Class" value="plugins.Sharesite.Plugin"/>
</manifest>
<fileset dir="src/" casesensitive="yes">
<include name="**/*.l10n"/>
<include name="**/*.properties"/>
</fileset>
<fileset dir="${build}/"/>
<fileset dir="rez/" />
</jar>
<copy file="${dist}/Sharesite-b${build.number}.jar" tofile="${dist}/Sharesite.jar" />
<zip destfile="${dist}/Sharesite-b${build.number}-src.zip" filesonly="true" compress="true">
<zipfileset dir="."
prefix = "Sharesite"
excludes=".* unpacked/**/*"
includes="src/**/* rez/**/* **/*.properties build.xml build.txt README NEWS" />
</zip>
</target>
<!-- ================================================== -->
<target name="clean" description="Delete class files and docs dir. Also deletes the copied org.* sources.">
<delete dir="${build}"/>
<delete dir="${build-test}"/>
<delete dir="${dist}"/>
<delete dir="${unpacked}"/>
<delete dir="${src}/plugins/Sharesite/mylyn/" />
</target>
</project>