-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
120 lines (104 loc) · 3.71 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
<project name="mint" default="dist" basedir=".">
<description>
Mint build file
</description>
<!-- set global properties for this build -->
<property name="src" location="WEB-INF/src/java"/>
<property name="custom-src" location="WEB-INF/custom/${custom}/java"/>
<property name="build" location="WEB-INF/classes"/>
<property name="lib" location="WEB-INF/lib"/>
<property name="dist" location="work/dist"/>
<property environment="env"/>
<property name="tomcat.home" location="${env.TOMCAT_HOME}" />
<path id="srcpath" >
<dirset dir="${src}" />
<dirset dir="WEB-INF/custom">
<include name="${custom}/java" if="custom" />
</dirset>
</path>
<property name="allSrc" refid="srcpath"/>
<target name="init">
<fail unless="appname" message="Please call ant with -Dappname=something. This is used as subdir in dist and for tomcat deploy." />
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<echo message="Compiling source code..." />
<!-- Compile the java code from ${src} into ${build} -->
<javac destdir="${build}"
encoding = "utf-8"
source="1.6" debug="true" debuglevel="lines,source"
includeAntRuntime="no" srcdir="${allSrc}" >
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="WEB-INF/lib">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${tomcat.home}/lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
<echo message="Source code compile completed!" />
<copy todir="${build}">
<fileset dir="${src}"
excludes="**/*.java" />
</copy>
<copy todir="${build}" flatten="true" >
<fileset dir="WEB-INF/custom" >
<include name="${custom}/java/*" if="custom"/>
<exclude name="**/*.java" />
</fileset>
</copy>
<echo message="Resources copied to class folder." />
</target>
<target name="instrument" depends="compile">
<echo message="Instrumenting domain..." />
<taskdef name="instrument" classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
<classpath >
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<classpath path="${build}"/>
</taskdef>
<instrument verbose="true">
<fileset dir="${build}/gr/ntua/ivml/mint/persistent">
<include name="Mapping.class"/>
</fileset>
</instrument>
</target>
<target name="properties" depends="init" description="Build a build.properties file" >
<tstamp>
<format property="NOW" pattern="d-MMM-yyyy HH:mm:ss" locale="en,UK"/>
</tstamp>
<echo file="build.properties" message="svn-revision=" />
<exec executable="svnversion" output="build.properties" append="true"/>
<echo file="build.properties" append="true" >appname=${appname}
deploy_target=${deploy_target}
build-time=${NOW}</echo>
</target>
<target name="clean"
description="clean up" >
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
<target name="doc">
<javadoc destdir="docs/mint2"
sourcepath="WEB-INF/src/java"
packagenames="gr.ntua.ivml.mint.*"
windowtitle="Mint2 Javadoc"
>
<classpath>
<pathelement path="${classpath}"/>
<fileset dir="WEB-INF/lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javadoc>
</target>
</project>