source: branches/4.0.0/common.xml @ 4872

Revision 4872, 2.7 KB checked in by melissa, 11 years ago (diff)

Synced 4.0.0 branch with trunk, excluding r4804.

Line 
1<!--
2common.xml
3
4Ant build file for logic common to every component.
5Download Apache Ant from http://ant.apache.org/.
6Type "ant -p" for a list of targets.
7-->
8
9<project>
10  <property file="${user.home}/.ant-global.properties"/>
11  <property file="${root.dir}/global.properties"/>
12  <property file="${root.dir}/common.properties"/>
13
14  <condition property="isUnix"><os family="unix"/></condition>
15
16  <!--
17  Guess location of the Java runtime classes, saving to jre.runtime property.
18  Stolen and adapted from:
19    http://forums.gamegardens.com/discussion/mvnforum/viewthread?thread=324
20  -->
21  <!-- if Mac OS X -->
22  <property name="jre.macosx.classes"
23    value="/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar"/>
24  <property name="jre.macosx.ui"
25    value="/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar"/>
26  <condition property="jre.runtime"
27    value="${jre.macosx.classes}:${jre.macosx.ui}">
28    <and>
29      <os family="mac"/>
30      <os family="unix"/>
31    </and>
32  </condition>
33  <!-- Default for Unix -->
34  <property name="jre.runtime" value="${java.home}/lib/rt.jar"/>
35
36  <!-- Non-core ant tasks -->
37
38  <taskdef resource="net/sf/antcontrib/antcontrib.properties"
39    classpath="${lib.dir}/ant-contrib-1.0b1.jar"/>
40  <!-- HACK - some environments do not install the antcontrib tasks properly
41    from antcontrib.properties above; also load them from antlib.xml -->
42  <taskdef resource="net/sf/antcontrib/antlib.xml"
43    classpath="${lib.dir}/ant-contrib-1.0b1.jar"/>
44
45  <!-- Main build targets -->
46
47  <target name="clean" description="remove all build files except artifacts">
48    <delete dir="${build.dir}"/>
49  </target>
50
51  <!-- Internal build targets -->
52
53  <target name="init-timestamp">
54    <tstamp>
55      <format property="DATE" pattern="d MMMMM yyyy"/>
56      <format property="YEAR" pattern="yyyy"/>
57    </tstamp>
58  </target>
59
60  <target name="init-revision">
61    <!-- determine SVN revision number -->
62    <if>
63      <isset property="svn.revision"/>
64      <else>
65        <!--
66        Thanks to Chris Collins for this code snippet:
67          http://ccollins.wordpress.com/2008/01/30/
68            getting-subversion-revision-in-ant/
69        -->
70        <exec executable="svn" outputproperty="svn.log"
71          failifexecutionfails="false">
72          <arg line="info ${base.dir}"/>
73        </exec>
74        <if>
75          <isset property="svn.log"/>
76          <then>
77            <propertyregex property="svn.revision"
78              input="${svn.log}" select="\1">
79              <regexp pattern="Revision: ([0-9]*)"/>
80            </propertyregex>
81            <!--<echo>SVN revision: ${svn.revision}</echo>-->
82          </then>
83        </if>
84      </else>
85    </if>
86  </target>
87
88</project>
Note: See TracBrowser for help on using the repository browser.