-
Notifications
You must be signed in to change notification settings - Fork 1
/
antbuild.xml
69 lines (59 loc) · 2.33 KB
/
antbuild.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
<?xml version="1.0" ?>
<project name="mappum-gui" default="MakeJar" basedir=".">
<tstamp>
<format property="TODAY_PL"
pattern="yyyyMMdd"
locale="pl,PL"/>
</tstamp>
<property name="Built-Date" value="${TODAY_PL}"/>
<property name="majorversion" value="0.2.0" />
<property name="fullpluginname" value="pl.ivmx.mappum.gui" />
<property name="finalJarName" value="pl.ivmx.mappum.gui_${Built-Date}.jar" />
<property name="finalZipName" value="pl.ivmx.mappum.gui_${Built-Date}.jar" />
<property name="maindir" value="./" />
<property name="src" value="./src" />
<property name="build" value="./bin" />
<!--
! Important - A working eclipse plugins install dir (where the other plugins live)
this is cheating a bit. When compiling an eclipse there are many jars
involved. You can either figure out which ones you need and add them one by
one, or shotgun it and include all the jars in a working eclipse
plugin dir. I went with option #2 (it's easier to maintain).
This could just be a copy of the plugins folder as well (if you want to run
this on a server)
-->
<property name="plugin_offset" value="/Applications/eclipse/plugins" />
<target name="Compile">
<mkdir dir="bin"/>
<javac srcdir="${src}" destdir="${build}" debug="on" source="1.5">
<classpath>
<fileset dir="${plugin_offset}">
<include name="**/*.jar" />
</fileset>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="MakeJar" depends="Compile">
<mkdir dir="plugins" />
<mkdir dir="plugins/${fullpluginname}" />
<copy file="${maindir}/plugin.xml" tofile="${build}/plugin.xml" />
<copy todir="${build}/icons">
<fileset dir="${maindir}/icons">
<exclude name="**/CVS" />
</fileset>
</copy>
<copy todir="${build}/lib">
<fileset dir="${maindir}/lib">
<exclude name="**/\.svn" />
</fileset>
</copy>
<copy file="${maindir}/plugin.properties" tofile="${build}/plugin.properties" />
<jar manifest="${maindir}/META-INF/MANIFEST.MF" destfile="plugins/${fullpluginname}/${finalJarName}" basedir="${build}"/>
</target>
<target name="ZipUpPlugin" depends="MakeJar">
<zip destfile="${finalZipName}" basedir="./" includes="plugins/**" />
</target>
</project>