Changeset 4822 for trunk/java.xml


Ignore:
Timestamp:
02/19/09 12:50:03 (11 years ago)
Author:
curtis
Message:

Better build system for Bio-Formats C++ bindings on Linux.

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/java.xml

    r4612 r4822  
    11<!-- 
    2 common.xml 
     2java.xml 
    33 
    4 Ant build file for logic common to every component. 
     4Ant build file for logic common to Java components. 
    55Download Apache Ant from http://ant.apache.org/. 
    66Type "ant -p" for a list of targets. 
     
    88 
    99<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> 
     10  <import file="common.xml"/> 
    1511 
    1612  <!-- Non-core ant tasks --> 
     
    2218  <taskdef resource="checkstyletask.properties" 
    2319    classpath="${lib.dir}/checkstyle-all-4.2.jar:${lib.dir}/loci-checks.jar"/> 
    24  
    25   <taskdef resource="net/sf/antcontrib/antcontrib.properties" 
    26     classpath="${lib.dir}/ant-contrib-1.0b1.jar"/> 
    27   <!-- HACK - some environments do not install the antcontrib tasks properly 
    28   from antcontrib.properties above; also load them from antlib.xml --> 
    29   <taskdef resource="net/sf/antcontrib/antlib.xml" 
    30     classpath="${lib.dir}/ant-contrib-1.0b1.jar"/> 
    3120 
    3221  <taskdef resource="edu/umd/cs/findbugs/anttask/tasks.properties" 
     
    4029  <!-- Main build targets --> 
    4130 
    42   <target name="compile" depends="copy-source" 
    43     description="compile classes"> 
     31  <target name="compile" depends="copy-source" description="compile classes"> 
    4432    <javac debug="true" deprecation="true" 
    4533      source="${component.java-version}" 
     
    7159      </then> 
    7260      <else> 
    73         <echo>Please set the findbugs.home property to point to your</echo> 
    74         <echo>FindBugs installation's lib directory. E.g.:</echo> 
    75         <echo>  ant -Dfindbugs.home=${user.home}/findbugs/lib findbugs</echo> 
     61<echo> 
     62Please set the findbugs.home property to point to 
     63your FindBugs installation's lib directory. E.g.: 
     64  ant -Dfindbugs.home=${user.home}/findbugs/lib findbugs 
     65</echo> 
     66        <fail message="FindBugs not found."/> 
    7667      </else> 
    7768    </if> 
     
    115106  </target> 
    116107 
    117   <target name="clean" description="remove all build files except artifacts"> 
    118     <delete dir="${build.dir}"/> 
    119   </target> 
    120  
    121108  <target name="clean-classes" description="remove classes from build folder"> 
    122109    <delete dir="${classes.dir}"/> 
     
    144131  <!-- Internal build targets --> 
    145132 
    146   <target name="init"> 
    147     <tstamp> 
    148       <format property="DATE" pattern="d MMMMM yyyy"/> 
    149       <format property="YEAR" pattern="yyyy"/> 
    150     </tstamp> 
    151     <!-- determine SVN revision number --> 
    152     <if> 
    153       <isset property="svn.revision"/> 
    154       <else> 
    155         <!-- 
    156         Thanks to Chris Collins for this code snippet: 
    157           http://ccollins.wordpress.com/2008/01/30/ 
    158             getting-subversion-revision-in-ant/ 
    159         --> 
    160         <exec executable="svn" outputproperty="svn.log" 
    161           failifexecutionfails="false"> 
    162           <arg line="info ${base.dir}"/> 
    163         </exec> 
    164         <if> 
    165           <isset property="svn.log"/> 
    166           <then> 
    167             <propertyregex property="svn.revision" 
    168               input="${svn.log}" select="\1"> 
    169               <regexp pattern="Revision: ([0-9]*)"/> 
    170             </propertyregex> 
    171             <!--<echo>SVN revision: ${svn.revision}</echo>--> 
    172           </then> 
    173         </if> 
    174       </else> 
    175     </if> 
     133  <target name="init" 
     134    depends="init-timestamp, init-revision, init-manifest-cp"/> 
     135 
     136  <target name="init-manifest-cp"> 
    176137    <!-- construct manifest classpath --> 
    177138    <propertyregex property="component.manifest-cp-temp" 
Note: See TracChangeset for help on using the changeset viewer.