-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
163 lines (146 loc) · 5.91 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
<project name="PetriNetReplayAnalysis" default="Compile Sources" basedir=".">
<!-- set global properties for this build -->
<property environment="env" />
<property name="src" location="src" />
<property name="build" location="bindist" />
<property name="doc" location="doc" />
<property name="lib" location="lib" />
<property name="dist" location="dist" />
<property name="release" location="latestrelease" />
<property name="version" value="6.1.${env.BUILD_NUMBER}" />
<property name="project" value="PetriNetReplayAnalysis" />
<!-- Set the os to win32, win64, lin32, lin64, mac, or all -->
<property name="os" value="all" />
<!-- Compilation macro
This Macro compiles the sources is one ${src}-... folder.
The sources are compiled into the ${build} folder.
-->
<path id="classpath">
<pathelement path="${build}" />
<pathelement path="${java.class.path}" />
<fileset dir=".">
<include name="lib/**/*.jar" />
<include name="stdlib/**/*.jar" />
<include name="packagelib/**/*.jar" />
</fileset>
</path>
<macrodef name="compile">
<sequential>
<!-- Compile the java code from ${src}-@{module} into ${build} -->
<javac srcdir="${src}" classpathref="classpath" destdir="${build}" nowarn="false" verbose="no" debug="true" debuglevel="lines,vars,source" deprecation="yes" source="1.6" target="1.6">
<!-- Check for unsafe operations -->
<compilerarg value="-Xlint:unchecked" />
</javac>
</sequential>
</macrodef>
<!-- Jar macro
This Macro builds a jar file from compiled sources in the ${dist} folder.
-->
<macrodef name="makejar">
<sequential>
<!-- Create the distribution directory -->
<!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file -->
<jar jarfile="${dist}/${project}-${DSTAMP}.jar">
<fileset dir="${build}">
<include name="**" />
<exclude name="test**" />
</fileset>
<fileset dir="${src}">
<include name="**" />
<exclude name="test**" />
</fileset>
<fileset dir="${doc}">
<include name="**" />
<exclude name="test**" />
</fileset>
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Specification-Title" value="${project}-@{module}" />
<attribute name="Specification-Version" value="${version}" />
<attribute name="Specification-Vendor" value="www.processmining.org" />
<attribute name="Implementation-Title" value="${project}" />
<attribute name="Implementation-Version" value="${version} ${TODAY}" />
<attribute name="Implementation-Vendor" value="www.processmining.org" />
<attribute name="Sealed" value="false" />
</manifest>
</jar>
<copy file="${dist}/${project}-${DSTAMP}.jar" tofile="${dist}/${project}.jar" overwrite="true" />
</sequential>
</macrodef>
<!-- clean all binaries and distributions -->
<target name="Clean build and dist folders" description="clean up" id="1">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
<!-- create the project's javadoc from all existing sources. Note that only org.processmining.** is included -->
<target name="Create Javadoc" description="Generated javadoc">
<javadoc packagenames="**" classpathref="classpath" useexternalfile="true" defaultexcludes="yes" destdir="${doc}" author="true" version="true" verbose="false" use="true" windowtitle="${project}">
<fileset dir=".">
<include name="src/**" />
<exclude name="src/test/**" />
<exclude name="**/*.jj" />
<exclude name="**/*.jjt" />
</fileset>
</javadoc>
</target>
<!-- export distribution archive -->
<target name="Create downloadable archive" depends="Compile Sources">
<echo message="Building zip file packaging this project" />
<sequential>
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${release}" includes="${project}-*-${os}.zip"/>
</delete>
<zip destfile="${release}/${project}-${version}-${os}.zip">
<zipfileset dir="${lib}" prefix="lib">
<include name="**" />
</zipfileset>
<zipfileset dir="${dist}" prefix="">
<include name="${project}.jar" />
</zipfileset>
</zip>
<copy file="${dist}/${project}.jar" tofile="${release}/${project}.jar" overwrite="true" />
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${release}/lib" includes="**/*"/>
</delete>
<mkdir dir="${release}/lib"/>
<copy todir="${release}/lib" overwrite="true">
<fileset dir="${lib}"/>
</copy>
<echoxml file="${release}/packages.xml">
<packages>
<package
name="${project}"
version="${version}"
os="all"
url="http://www.promtools.org/prom6/packages/${project}/${project}-${version}-${os}.zip"
desc="PetriNet Replay Conformance and Performance Analysis"
org="Department of Computer Science University of Pisa"
license="LGPL"
author="Giorgio Spagnolo (spagnolo@di.unipi.it), Roberto Guanciale (guancio@gmail.com), et all."
auto="false"
hasPlugins="true"
logo="http://compass2.di.unipi.it/Didattica/img/cheru.png"
>
<dependency name="PetriNets"/>
<dependency name="InteractiveVisualization"/>
<dependency name="LogDialog"/>
<dependency name="Log"/>
<dependency name="LogMerge"/>
</package>
</packages>
</echoxml>
</sequential>
</target>
<target name="Compile Sources">
<!-- Create the build directory structure used by compile -->
<!-- Create the time stamp -->
<tstamp />
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
<echo message="Compiling the sources" />
<compile />
<echo message="Making jar" />
<makejar />
</target>
</project>