1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
---|
2 | <project basedir="." default="dist" name="Crosspare">
|
---|
3 | <!-- General Properties -->
|
---|
4 | <property environment="env" />
|
---|
5 | <property name="build.location" value="bin" />
|
---|
6 | <property name="dist.location" value="dist" />
|
---|
7 | <property name="javadoc.location" value="javadoc" />
|
---|
8 | <property name="downloads.location" value="downloads" />
|
---|
9 | <property name="debuglevel" value="source,lines,vars" />
|
---|
10 | <property name="target" value="1.8" />
|
---|
11 | <property name="source" value="1.8" />
|
---|
12 |
|
---|
13 | <!-- Crosspare Properties -->
|
---|
14 | <property name="Crosspare.jarname" value="crosspare.jar" />
|
---|
15 | <path id="Crosspare.classpath">
|
---|
16 | <pathelement location="${build.location.eventbenchconsole}" />
|
---|
17 | <pathelement location="lib/commons-collections4-4.0-alpha1.jar" />
|
---|
18 | <pathelement location="lib/commons-io-2.4.jar" />
|
---|
19 | <pathelement location="lib/commons-math3-3.5.jar" />
|
---|
20 | <pathelement location="lib/java-utils-0.0.1.jar" />
|
---|
21 | <pathelement location="lib/weka.jar" />
|
---|
22 | <pathelement location="lib/guava-19.0" />
|
---|
23 | <pathelement location="lib/ojalgo-37.1.jar" />
|
---|
24 | </path>
|
---|
25 |
|
---|
26 | <!-- Initialization Targets -->
|
---|
27 | <target name="init.build">
|
---|
28 | <mkdir dir="${build.location}" />
|
---|
29 | </target>
|
---|
30 | <target name="init.dist">
|
---|
31 | <mkdir dir="${dist.location}" />
|
---|
32 | </target>
|
---|
33 | <target name="init.downloads">
|
---|
34 | <mkdir dir="${downloads.location}" />
|
---|
35 | </target>
|
---|
36 | <target name="init.javadoc">
|
---|
37 | <mkdir dir="${javadoc.location}" />
|
---|
38 | </target>
|
---|
39 |
|
---|
40 | <!-- Clean-up Targets -->
|
---|
41 | <target name="clean.build">
|
---|
42 | <delete dir="${build.location}" />
|
---|
43 | </target>
|
---|
44 | <target name="clean.dist">
|
---|
45 | <delete dir="${dist.location}" />
|
---|
46 | </target>
|
---|
47 | <target name="clean.javadoc">
|
---|
48 | <delete dir="${javadoc.location}" />
|
---|
49 | </target>
|
---|
50 | <target depends="clean.build,clean.dist,clean.javadoc" name="clean.all" />
|
---|
51 |
|
---|
52 | <!-- Build Targets -->
|
---|
53 | <target depends="init.build" name="build">
|
---|
54 | <javac debug="true" debuglevel="${debuglevel}"
|
---|
55 | destdir="${build.location}" source="${source}"
|
---|
56 | target="${target}" includeantruntime="false">
|
---|
57 | <src path="src" />
|
---|
58 | <classpath refid="Crosspare.classpath" />
|
---|
59 | </javac>
|
---|
60 | </target>
|
---|
61 |
|
---|
62 | <!-- Distribution Targets -->
|
---|
63 | <target depends="build,init.dist,javadoc" name="dist">
|
---|
64 | <!-- dist of main components, i.e., the console -->
|
---|
65 | <pathconvert property="dist.libs" pathsep=" ">
|
---|
66 | <mapper>
|
---|
67 | <chainedmapper>
|
---|
68 | <flattenmapper />
|
---|
69 | <globmapper from="*" to="lib/*" />
|
---|
70 | </chainedmapper>
|
---|
71 | </mapper>
|
---|
72 | <path>
|
---|
73 | <fileset dir="lib">
|
---|
74 | <include name="**/*.jar" />
|
---|
75 | </fileset>
|
---|
76 | </path>
|
---|
77 | </pathconvert>
|
---|
78 | <property name="dist.classpath" value="${dist.libs}"></property>
|
---|
79 | <jar destfile="${dist.location}/${Crosspare.jarname}" basedir="${build.location}">
|
---|
80 | <manifest>
|
---|
81 | <attribute name="Built-By" value="${user.name}" />
|
---|
82 | <attribute name="Main-Class" value="de.ugoe.cs.cpdp.Runner" />
|
---|
83 | <attribute name="Class-Path" value="${dist.classpath}" />
|
---|
84 | </manifest>
|
---|
85 | </jar>
|
---|
86 | <copy includeemptydirs="false" todir="${dist.location}/lib">
|
---|
87 | <fileset dir="lib" />
|
---|
88 | </copy>
|
---|
89 |
|
---|
90 | <!-- copy Javadoc to dist -->
|
---|
91 | <copy includeemptydirs="false" todir="${dist.location}/javadoc">
|
---|
92 | <fileset dir="${javadoc.location}" />
|
---|
93 | </copy>
|
---|
94 | </target>
|
---|
95 |
|
---|
96 |
|
---|
97 | <target depends="init.downloads,dist" name="createDownloads">
|
---|
98 | <zip destfile="${downloads.location}/crosspare.zip">
|
---|
99 | <fileset dir="${dist.location}" />
|
---|
100 | </zip>
|
---|
101 | </target>
|
---|
102 |
|
---|
103 | <!-- Javadoc Targets -->
|
---|
104 | <target depends="init.javadoc" name="javadoc"
|
---|
105 | description="o Create Javadocs (Requires Javadoc 1.4+)">
|
---|
106 | <javadoc destdir="${javadoc.location}"
|
---|
107 | additionalparam="-J-Dorg.apache.commons.attributes.javadoc.CATaglet.sources=${basedir}">
|
---|
108 | <classpath refid="Crosspare.classpath" />
|
---|
109 | <link href="http://download.oracle.com/javase/7/docs/api/" />
|
---|
110 | <fileset dir="src" includes="**/*.java" />
|
---|
111 | </javadoc>
|
---|
112 | </target>
|
---|
113 | </project>
|
---|