-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.xml
110 lines (92 loc) · 3.53 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Main Build file for the jcgm project
$Id$
-->
<project name="jcgm" default="jar">
<!-- The core package -->
<property name="version-core" value="2.0.2"/>
<property name="package-name-core" value="jcgm-core-${version-core}"/>
<property name="jar-name-core" value="${package-name-core}.jar"/>
<property name="jar-name-core-sources" value="${package-name-core}-sources.jar"/>
<property name="package-name-core-bin" value="${package-name-core}-bin"/>
<!-- Source code only distributed in one package -->
<property name="package-name-src" value="jcgm-src"/>
<description>
Main Build file for the jcgm project
</description>
<!-- Building -->
<target name="jar" depends="jar-core"
description="Builds a JAR file the library"/>
<target name="jar-core" depends="compile">
<jar destfile="build/${jar-name-core}" basedir="build/classes"
includes="net/sf/jcgm/core/**"
/>
</target>
<target name="jar-sources" depends="compile">
<jar destfile="build/${jar-name-core-sources}">
<fileset dir="src" includes="**/*.java"/>
</jar>
</target>
<target name="compile" description="Compiles all java source files">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes" source="1.8" target="1.8" debug="true"
includeantruntime="false"/>
</target>
<target name="clean">
<delete dir="build"/>
</target>
<!-- Javadoc -->
<target name="javadoc">
<javadoc destdir="build/site/en/api"
encoding="utf8" docencoding="utf8"
charset="utf-8"
author="true" version="true"
classpath="../jcgm-image/lib/commons-logging-1.1.jar:../jcgm-image/lib/xmlgraphics-commons-1.3.1.jar"
>
<packageset dir="src">
<include name="net/sf/jcgm/**"/>
</packageset>
<packageset dir="../jcgm-image/src">
<include name="net/sf/jcgm/**"/>
</packageset>
<bottom><![CDATA[Part of the jcgm library <a href="http://jcgm.sourceforge.net" target="_top">http://jcgm.sourceforge.net/</a>]]></bottom>
<link href="http://java.sun.com/j2se/1.6.0/docs/api/"/>
<link href="http://developer.java.sun.com/developer/products/xml/docs/api/"/>
</javadoc>
</target>
<!-- Testing -->
<!-- Path where to put the test results -->
<property name="test-out" value="build/test-results"/>
<target name="test" depends="compile">
<foreach target="test-single" param="test-folder">
<!-- Path to the Web CGM Test suite -->
<path path="../../software/webcgm21-ts/static10"/>
</foreach>
</target>
<target name="test-single">
<echo message="${test-folder}"/>
<mkdir dir="${test-out}"/>
<java classname="net.sf.jcgm.examples.Analyzer" output="${test-out}/test.txt">
<arg value="${test-folder}"/>
<classpath>
<pathelement location="build/classes"/>
</classpath>
</java>
</target>
<!-- Distribution -->
<target name="dist" depends="dist-core-bin"/>
<target name="dist-core-bin" depends="jar-core"> <!-- depends: site -->
<zip destfile="${package-name-core-bin}.zip">
<!-- <zipfileset dir="build/site" prefix="${package-name-core-bin}/build/site"/> -->
<zipfileset file="build/${jar-name-core}" prefix="${package-name-core-bin}/build"/>
<zipfileset file="LICENSE.txt" prefix="${package-name-core-bin}"/>
<zipfileset file="README.txt" prefix="${package-name-core-bin}"/>
<zipfileset dir="samples" prefix="${package-name-core-bin}/samples"/>
</zip>
</target>
<target name="distclean" depends="clean">
<delete file="${package-name-src}.zip"/>
<delete file="${package-name-core-bin}.zip"/>
</target>
</project>