source: branches/4.2/ant/global.xml @ 6584

Revision 6584, 4.8 KB checked in by curtis, 10 years ago (diff)

Backport recent bugfixes to 4.2 branch.

Line 
1<!--
2global.xml
3
4Ant build file for logic common to all build scripts.
5All other build files inherit from this build file.
6Download Apache Ant from http://ant.apache.org/.
7Type "ant -p" for a list of targets.
8-->
9
10<project>
11  <property file="${user.home}/.ant-global.properties"/>
12  <property file="${root.dir}/ant/global.properties"/>
13
14  <!-- Convenient platform properties -->
15
16  <condition property="isUnix">
17    <os family="unix"/>
18  </condition>
19  <condition property="isMac">
20    <and>
21      <os family="mac"/>
22      <os family="unix"/>
23    </and>
24  </condition>
25  <condition property="isWindows">
26    <os family="windows"/>
27  </condition>
28
29  <!--
30  Guess location of the Java runtime classes, saving to jre.runtime property.
31  Stolen and adapted from:
32    http://forums.gamegardens.com/discussion/mvnforum/viewthread?thread=324
33  -->
34  <!-- if Mac OS X -->
35  <property name="jre.macosx.classes"
36    value="/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar"/>
37  <property name="jre.macosx.ui"
38    value="/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar"/>
39  <condition property="jre.runtime"
40    value="${jre.macosx.classes}:${jre.macosx.ui}">
41    <isset property="isMac"/>
42  </condition>
43  <!-- Default for Unix -->
44  <property name="jre.runtime" value="${java.home}/lib/rt.jar"/>
45
46  <!-- Non-core ant tasks -->
47
48  <!-- Ant-Contrib Tasks: http://ant-contrib.sourceforge.net/ -->
49  <taskdef resource="net/sf/antcontrib/antcontrib.properties"
50    classpath="${lib.dir}/ant-contrib-1.0b3.jar"/>
51  <!-- HACK - some environments do not install the antcontrib tasks properly
52    from antcontrib.properties above; also load them from antlib.xml -->
53  <taskdef resource="net/sf/antcontrib/antlib.xml"
54    classpath="${lib.dir}/ant-contrib-1.0b3.jar"/>
55
56  <!-- Checkstyle: http://checkstyle.sourceforge.net/ -->
57  <!-- NB - We do not reference ${artifact.dir}/loci-checks.jar directly,
58    as doing so causes loci-checks.jar to be locked by some file systems
59    (Windows in particular), which causes the clean and clean-jars targets
60    to fail. -->
61  <taskdef resource="checkstyletask.properties"
62    classpath="${lib.dir}/checkstyle-all-5.0.jar:${lib.dir}/loci-checks.jar"/>
63
64  <!-- FindBugs: http://findbugs.sourceforge.net/ -->
65  <taskdef resource="edu/umd/cs/findbugs/anttask/tasks.properties"
66    classpath="${lib.dir}/findbugs-ant.jar"/>
67
68  <!-- ProGuard: http://proguard.sourceforge.net/ -->
69  <!--<taskdef resource="proguard/ant/task.properties"
70    classpath="${lib.dir}/proguard.jar"/>-->
71
72  <!--
73  OSGi Bundle Ant Task:
74  https://opensource.luminis.net/wiki/display/SITE/OSGi+Bundle+Ant+Task
75  https://opensource.luminis.net/wiki/display/SITE/Documentation
76  -->
77  <taskdef name="bundle" classname="net.luminis.build.plugin.bnd.BuildTask"
78    classpath="${lib.dir}/net.luminis.build.plugin-0.2.0.jar"/>
79
80  <!-- Internal build targets -->
81
82  <target name="info" depends="init">
83    <echo>
84============= GLOBAL PROPERTIES =============
85         jre.runtime = ${jre.runtime}
86            root.dir = ${root.dir}
87             lib.dir = ${lib.dir}
88        artifact.dir = ${artifact.dir}</echo>
89    <if>
90      <isset property="isUnix"/>
91      <then>
92        <echo>              isUnix = ${isUnix}</echo>
93      </then>
94    </if>
95    <if>
96      <isset property="isMac"/>
97      <then>
98        <echo>               isMac = ${isMac}</echo>
99      </then>
100    </if>
101    <if>
102      <isset property="isWindows"/>
103      <then>
104        <echo>           isWindows = ${isWindows}</echo>
105      </then>
106    </if>
107    <if>
108      <isset property="release.version"/>
109      <then>
110        <echo>
111=========== VERSIONING PROPERTIES ===========
112         release.version = ${release.version}</echo>
113        <if>
114          <isset property="svn.revision"/>
115          <then>
116            <echo>            svn.revision = ${svn.revision}
117                 svn.url = ${svn.url}
118                svn.root = ${svn.root}
119                svn.date = ${svn.date}
120             svn.changed = ${svn.changed}</echo>
121          </then>
122        </if>
123        <if>
124          <isset property="git.commit"/>
125          <then>
126            <echo>              git.commit = ${git.commit}</echo>
127          </then>
128        </if>
129      </then>
130    </if>
131    <if>
132      <isset property="DATE"/>
133      <then>
134        <echo>
135============= COMMON PROPERTIES =============
136                DATE = ${DATE}
137                YEAR = ${YEAR}
138             src.dir = ${src.dir}
139           build.dir = ${build.dir}
140            dest.dir = ${dest.dir}
141         classes.dir = ${classes.dir}
142            docs.dir = ${docs.dir}
143            dist.dir = ${dist.dir}
144
145============== JAVA PROPERTIES ==============
146      component.name = ${component.name}
147       component.jar = ${component.jar}
148   component.version = ${component.version}
149component.main-class = ${component.main-class}
150        </echo>
151      </then>
152      <else>
153        <echo/>
154      </else>
155    </if>
156  </target>
157
158</project>
Note: See TracBrowser for help on using the repository browser.