-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
137 lines (121 loc) · 5.03 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
<?xml version="1.0"?>
<project name="OWL-S API" default="dist" basedir=".">
<description>
An API to read, write and execute Web Services described in OWL-S
</description>
<!-- Read user properties -->
<property file="build.properties"/>
<property file="${user.home}/build.properties"/>
<!-- Enviroment -->
<property environment="env"/>
<!-- Global Properties -->
<property name="src" location="src" />
<property name="build" location="bin" />
<property name="dist" location="dist" />
<property name="project.name" value="owl-s" />
<property name="project.version" value="1.1.0-beta" />
<property name="catalina.home" value="${env.CATALINA_HOME}" />
<path id="project.class.path">
<fileset dir="lib">
<include name="**/*.jar"/>
<exclude name="**/${project.name}*.jar"/>
</fileset>
</path>
<target name="init">
<pathconvert targetos="unix" property="classpath" refid="project.class.path" />
<echo>CLASSPATH=${classpath}</echo>
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="Compile source files." >
<javac source="1.4" target="1.4" srcdir="${src}" destdir="${build}" debug="yes">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="build" depends="compile"
description="Compile sources and copy data files into build directory.">
<copy todir="${build}">
<fileset dir="${src}">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="distfiles">
<!-- Copy in lib files -->
<mkdir dir="${dist}/lib" />
<copy todir="${dist}/lib">
<fileset dir="lib">
<include name="**/*.jar" />
<exclude name="**/${project.name}*.jar"/>
</fileset>
</copy>
</target>
<target name="dist" depends="build,distfiles"
description="Generate a distribution" >
<!-- Generate relative classpath for jar file -->
<property name="lib" location="${basedir}/lib/"/>
<pathconvert dirsep="/" pathsep=" " property="Class-Path">
<map from="${lib}/" to=""/>
<map from="${lib}\" to=""/>
<path>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</path>
</pathconvert>
<!-- Make Jar file. -->
<jar jarfile="${dist}/lib/${project.name}.jar"
basedir="${build}">
<manifest>
<attribute name="Class-Path" value="${Class-Path}" />
</manifest>
</jar>
</target>
<target name="zipfile" depends="dist,javadoc"
description="Build a zipfile containing source and binaries.">
<condition property="project.dirname"
value="${project.name}-${DSTAMP}">
<not>
<isset property="project.dirname"/>
</not>
</condition>
<zip destfile="${dist}/${project.dirname}.zip">
<zipfileset dir="dist" prefix="${project.dirname}"
excludes="${project.name}*.zip"/>
<zipfileset dir="src" prefix="${project.dirname}/src"/>
<zipfileset dir="doc" prefix="${project.dirname}/doc"/>
<zipfileset dir="licensing" prefix="${project.dirname}/licensing"/>
<zipfileset dir="" prefix="${project.dirname}/"
includes="build.xml LICENSE.txt README.txt validate.* translate.* wsdl2owls.*" />
</zip>
</target>
<target name="javadoc" depends="build">
<javadoc destdir="doc\javadoc" access="public" use="true" notree="false" nonavbar="false"
noindex="false" splitindex="true" author="true" version="true" nodeprecatedlist="false" source="1.4"
nodeprecated="false"
packagenames="examples,org.*"
sourcepath="${src}"
doctitle="${project.name}-${project.version}"
bottom="Copyright © 2004 Evren Sirin. All Rights Reserved.">
<classpath refid="project.class.path"/>
</javadoc>
</target>
<target name="release">
<property name="project.dirname"
value="${project.name}-${project.version}" />
<antcall target="zipfile"/>
</target>
<target name="nightly-release">
<property name="project.dirname"
value="${project.name}-nightly" />
<antcall target="zipfile"/>
</target>
<target name="clean" description="Clean up build files">
<delete dir="${build}" />
<delete dir="${dist}" />
<delete dir="${javadoc.dir}" />
</target>
</project>