-
Notifications
You must be signed in to change notification settings - Fork 11
/
build_template.xml
56 lines (48 loc) · 1.85 KB
/
build_template.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Platform Extension - Template" default="com.signavio.extension.copy2Platform">
<!-- PROPERTIES -->
<property name="target" value="target" />
<property name="src" value="src" />
<property name="build" value="build" />
<property name="platform-lib" value="../../platform/WebContent/WEB-INF/lib" />
<!-- SPECIFY A UNIQUE NAME FOR YOUR EXTENSION -->
<property name="jar-file" value="platform-extension-XXX" />
<!-- Clean up project (remove temporary folders) -->
<target name="com.signavio.extension.clean">
<delete dir="${target}" />
<delete dir="${build}" />
</target>
<!-- Compile the Java classes -->
<target name="com.signavio.extension.compile" depends="com.signavio.extension.clean">
<mkdir dir="${build}" />
<javac srcdir="${src}" destdir="${build}" debug="on" target="1.5">
<classpath id="libs">
<fileset dir="${platform-lib}">
<include name="**/*.jar" />
</fileset>
<fileset dir=".">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
</target>
<!-- Generate the JAR file -->
<target name="com.signavio.extension.jar" depends="com.signavio.extension.compile">
<mkdir dir="${target}" />
<jar destfile="${target}/${jar-file}.jar" update="false">
<fileset dir="${build}">
</fileset>
</jar>
</target>
<!-- Copy Java libraries, if the lib property is defined. -->
<target name="com.signavio.extension.copy2Platform.lib" if="lib">
<copy todir="${platform-lib}">
<fileset dir="${lib}">
</fileset>
</copy>
</target>
<!-- Copy the JAR file into the Platform's lib folder -->
<target name="com.signavio.extension.copy2Platform" depends="com.signavio.extension.jar, com.signavio.extension.jar">
<copy file="${target}/${jar-file}.jar" todir="${platform-lib}" />
</target>
</project>