-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.xml
75 lines (60 loc) · 3.55 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (C) 2011 Citrix Systems, Inc. All rights reserved. -->
<project name="build-root" default="help" basedir=".">
<description></description>
<target name="help">
<echo level="info" message="Ant Build File for Cloud.com" />
<echo level="info" message="Type 'ant -projecthelp' to get a list of targets and their descriptions." />
</target>
<dirname property="base.dir" file="${ant.file.build-root}" />
<property name="build.dir" location="${base.dir}" />
<property name="db.dir" location="${base.dir}/db/mysql" />
<property name="target.dir" location="${base.dir}/target" />
<property name="classes.dir" location="${target.dir}/classes" />
<property name="jar.dir" location="${target.dir}/jar" />
<property name="dep.cache.dir" location="${target.dir}/dep-cache" />
<macrodef name="compile-java">
<attribute name="top.dir" description="Top Directory of the source. We will add src to this to get the source code." />
<attribute name="jar.name" description="Name of the jar file" />
<attribute name="classpath" description="class path to use" />
<element name="include-files" optional="true" />
<element name="exclude-files" optional="true" />
<sequential>
<mkdir dir="${classes.dir}/@{jar.name}" />
<depend srcdir="@{top.dir}/src" destdir="${classes.dir}/@{jar.name}" cache="${dep.cache.dir}" />
<javac srcdir="@{top.dir}/src" debug="${debug}" debuglevel="${debuglevel}" deprecation="${deprecation}" destdir="${classes.dir}/@{jar.name}" source="${source.compat.version}" target="${target.compat.version}" includeantruntime="false">
<!-- compilerarg line="-processor com.vmops.annotation.LocalProcessor -processorpath ${base.dir}/tools/src -Xlint:all"/ -->
<!-- compilerarg line="-processor com.vmops.utils.LocalProcessor -processorpath ${base.dir}/utils/src -Xlint:all"/ -->
<compilerarg line="-Xlint:all"/>
<compilerarg line="-nowarn"/>
<classpath refid="@{classpath}" />
<exclude-files/>
</javac>
<jar jarfile="${jar.dir}/@{jar.name}" basedir="${classes.dir}/@{jar.name}">
<manifest>
<attribute name="Class-Path" value="" />
<attribute name="Built-By" value="${built.by}" />
<attribute name="Specification-Title" value="VMOps Cloud Stack" />
<attribute name="Specification-Version" value="${impl.version}" />
<attribute name="Specification-Vendor" value="${company.name}" />
<attribute name="Implementation-Title" value="@{jar.name}" />
<attribute name="Implementation-Version" value="${impl.version}" />
<attribute name="Implementation-Vendor" value="${company.name}" />
</manifest>
<include-files/>
</jar>
</sequential>
</macrodef>
<macrodef name="clean-java">
<attribute name="top.dir" description="Top Directory of the source. We will add src to this to get the source code."/>
<attribute name="jar.name" description="Name of the jar file"/>
<sequential>
<local name="compile.java.bin.dir"/>
<property name="compile.java.bin.dir" location="${classes.dir}/@{jar.name}" />
<rmdir dir="${compile.java.bin.dir}"/>
<rm file="${jar.dir}/@{jar.name}"/>
</sequential>
</macrodef>
<import file="build-cloud-bridge.xml" optional="true" />
<import file="package.xml" optional="true" />
</project>