Changeset 4822


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

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

Location:
trunk
Files:
1 deleted
24 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/common.xml

    r4612 r4822  
    1414  <condition property="isUnix"><os family="unix"/></condition> 
    1515 
     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 
    1636  <!-- Non-core ant tasks --> 
    17  
    18   <!-- NB - We do not reference ${artifact.dir}/loci-checks.jar directly, 
    19     as doing so causes loci-checks.jar to be locked by some file systems 
    20     (Windows in particular), which causes the clean and clean-jars targets 
    21     to fail. --> 
    22   <taskdef resource="checkstyletask.properties" 
    23     classpath="${lib.dir}/checkstyle-all-4.2.jar:${lib.dir}/loci-checks.jar"/> 
    2437 
    2538  <taskdef resource="net/sf/antcontrib/antcontrib.properties" 
    2639    classpath="${lib.dir}/ant-contrib-1.0b1.jar"/> 
    2740  <!-- HACK - some environments do not install the antcontrib tasks properly 
    28   from antcontrib.properties above; also load them from antlib.xml --> 
     41    from antcontrib.properties above; also load them from antlib.xml --> 
    2942  <taskdef resource="net/sf/antcontrib/antlib.xml" 
    3043    classpath="${lib.dir}/ant-contrib-1.0b1.jar"/> 
    3144 
    32   <taskdef resource="edu/umd/cs/findbugs/anttask/tasks.properties" 
    33     classpath="${lib.dir}/findbugs-ant.jar"/> 
    34  
    35   <!-- 
    36   <taskdef resource="proguard/ant/task.properties" 
    37     classpath="${lib.dir}/proguard.jar"/> 
    38   --> 
    39  
    4045  <!-- Main build targets --> 
    41  
    42   <target name="compile" depends="copy-source" 
    43     description="compile classes"> 
    44     <javac debug="true" deprecation="true" 
    45       source="${component.java-version}" 
    46       target="${component.java-version}" 
    47       srcdir="${dest.dir}" destdir="${classes.dir}" 
    48       classpath="${component.classpath}" 
    49       includes="${component.source}"/> 
    50   </target> 
    51  
    52   <target name="exec" depends="compile" description="execute package"> 
    53     <java fork="true" classname="${component.main-class}" 
    54       classpath="${classes.dir}:${component.runtime-cp}"/> 
    55   </target> 
    56  
    57   <target name="findbugs" depends="compile" 
    58     description="check source code for bugs"> 
    59     <if> 
    60       <isset property="findbugs.home"/> 
    61       <then> 
    62         <findbugs home="${findbugs.home}" jvmargs="-Xmx512m" 
    63           output="xml" outputFile="${build.dir}/findbugs.xml"> 
    64           <auxClasspath path="${component.classpath}"/> 
    65           <sourcePath path="${dest.dir}"/> 
    66           <class location="${classes.dir}"/> 
    67         </findbugs> 
    68         <java jar="${findbugs.home}/findbugs.jar" fork="true"> 
    69           <arg value="${build.dir}/findbugs.xml"/> 
    70         </java> 
    71       </then> 
    72       <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> 
    76       </else> 
    77     </if> 
    78   </target> 
    79  
    80   <target name="style" depends="compile" 
    81     description="check source code style"> 
    82     <checkstyle config="${root.dir}/checkstyle.xml" failOnViolation="false" 
    83       classpath="${classes.dir}:${component.classpath}"> 
    84       <fileset dir="${dest.dir}" includes="${component.source}"/> 
    85     </checkstyle> 
    86   </target> 
    87  
    88   <target name="jar" depends="compile" 
    89     description="generate JAR file"> 
    90     <mkdir dir="${artifact.dir}"/> 
    91     <jar jarfile="${artifact.dir}/${component.jar}" basedir="${classes.dir}"> 
    92       <manifest> 
    93         <attribute name="Main-Class" value="${component.main-class}"/> 
    94         <attribute name="Class-Path" value="${component.manifest-cp}"/> 
    95       </manifest> 
    96     </jar> 
    97   </target> 
    98  
    99   <target name="docs" depends="compile" 
    100     description="generate javadocs"> 
    101     <javadoc sourcepath="${dest.dir}" destdir="${docs.dir}/api" 
    102       classpath="${component.classpath}:${classes.dir}" 
    103       author="true" version="true" use="true" 
    104       nodeprecated="true" windowtitle="Bio-Formats API"> 
    105       <packageset dir="${dest.dir}"/> 
    106       <doctitle><![CDATA[<h1>Bio-Formats</h1>]]></doctitle> 
    107       <bottom><![CDATA[${copyright.begin} ${YEAR} ${copyright.end}]]></bottom> 
    108       <link href="http://java.sun.com/j2se/1.5.0/docs/api/"/> 
    109       <link href="http://hudson.openmicroscopy.org.uk/job/OMEJAVA/javadoc/"/> 
    110       <link href="http://rsbweb.nih.gov/ij/developer/api/"/> 
    111       <link href="http://www.ssec.wisc.edu/~dglo/docs/"/> 
    112       <!--<link href="http://www.jdocs.com/formlayout/1.0.4/api/"/>--> 
    113       <!--<link href="http://www.jdocs.com/looks/1.2.2/api/"/>--> 
    114     </javadoc> 
    115   </target> 
    11646 
    11747  <target name="clean" description="remove all build files except artifacts"> 
     
    11949  </target> 
    12050 
    121   <target name="clean-classes" description="remove classes from build folder"> 
    122     <delete dir="${classes.dir}"/> 
    123   </target> 
    124  
    125   <target name="clean-dist" 
    126     description="remove distribution bundles from build folder"> 
    127     <delete dir="${dist.dir}"/> 
    128   </target> 
    129  
    130   <target name="clean-docs" description="remove javadocs from build folder"> 
    131     <delete dir="${docs.dir}"/> 
    132   </target> 
    133  
    134   <target name="clean-src" description="remove source files from build folder"> 
    135     <delete dir="${dest.dir}"/> 
    136   </target> 
    137  
    138   <target name="clean-jar" description="remove JAR file from artifacts folder"> 
    139     <delete> 
    140       <fileset dir="${artifact.dir}" includes="${component.jar}"/> 
    141     </delete> 
    142   </target> 
    143  
    14451  <!-- Internal build targets --> 
    14552 
    146   <target name="init"> 
     53  <target name="init-timestamp"> 
    14754    <tstamp> 
    14855      <format property="DATE" pattern="d MMMMM yyyy"/> 
    14956      <format property="YEAR" pattern="yyyy"/> 
    15057    </tstamp> 
     58  </target> 
     59 
     60  <target name="init-revision"> 
    15161    <!-- determine SVN revision number --> 
    15262    <if> 
     
    17484      </else> 
    17585    </if> 
    176     <!-- construct manifest classpath --> 
    177     <propertyregex property="component.manifest-cp-temp" 
    178       input="${component.runtime-cp}" replace="" 
    179       defaultValue="${component.runtime-cp}"> 
    180       <regexp pattern="[^\:]*\/"/> 
    181     </propertyregex> 
    182     <propertyregex property="component.manifest-cp" 
    183       input="${component.manifest-cp-temp}" replace=" " 
    184       defaultValue="${component.manifest-cp-temp}"> 
    185       <regexp pattern=":"/> 
    186     </propertyregex> 
    187     <!--<echo>Manifest-Classpath: ${component.manifest-cp}</echo>--> 
    188   </target> 
    189  
    190   <target name="copy-source" depends="init"> 
    191     <!-- copy binary resources without filtering --> 
    192     <copy todir="${dest.dir}" preservelastmodified="true"> 
    193       <fileset dir="${src.dir}" includes="${component.resources-bin}"/> 
    194     </copy> 
    195     <!-- copy source files and text resources with filtering --> 
    196     <filter token="date" value="${DATE}"/> 
    197     <filter token="year" value="${YEAR}"/> 
    198     <filter token="svn.revision" value="${svn.revision}"/> 
    199     <filter token="visbio.version" value="${visbio.version}"/> 
    200     <copy todir="${dest.dir}" filtering="true" preservelastmodified="true"> 
    201       <fileset dir="${src.dir}" 
    202         includes="${component.source} ${component.resources-text}"/> 
    203     </copy> 
    204     <!-- copy resources to classes folder --> 
    205     <copy todir="${classes.dir}" preservelastmodified="true"> 
    206       <fileset dir="${dest.dir}" excludes="${component.source}"/> 
    207     </copy> 
    20886  </target> 
    20987 
  • trunk/components/bio-formats-auto/build.xml

    r4768 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616 
  • trunk/components/bio-formats-ice/build.xml

    r4563 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/bio-formats-jace/CMakeLists.txt

    r4766 r4822  
    33# 
    44 
    5 # CMake build file for bfjace, the Bio-Formats Jace C++ bindings. 
     5# CMake build file for bfjace, the Bio-Formats C++ bindings. 
    66 
    77cmake_minimum_required(VERSION 2.6) 
    88 
    9 project(bio-formats-jace) 
     9project(bfjace) 
    1010 
    1111### determine configuration ### 
    1212 
    13 find_package(JNI) 
     13message("") 
     14 
     15#find_package(Java REQUIRED) 
     16#message("-- Java Runtime:") 
     17#message("java             : ${JAVA_RUNTIME}") 
     18#message("javac            : ${JAVA_COMPILE}") 
     19#message("jar              : ${JAVA_ARCHIVE}") 
     20#message("") 
     21 
     22find_package(JNI REQUIRED) 
     23message("-- Java Native Interface:") 
     24message("jawt lib         : ${JAVA_AWT_LIBRARY}") 
     25message("jvm lib          : ${JAVA_JVM_LIBRARY}") 
     26message("jni.h            : ${JAVA_INCLUDE_PATH}") 
     27message("jni_md.h         : ${JAVA_INCLUDE_PATH2}") 
     28message("jawt.h           : ${JAVA_AWT_INCLUDE_PATH}") 
     29message("") 
    1430 
    1531set(Boost_USE_STATIC_LIBS OFF) 
    1632set(Boost_USE_MULTITHREAD ON) 
    17 find_package(Boost COMPONENTS thread) 
     33find_package(Boost COMPONENTS thread REQUIRED) 
     34message("-- Boost:") 
     35if(EXISTS ${Boost_LIBRARIES}) 
     36message("boost/thread.hpp : ${Boost_INCLUDE_DIR}") 
     37message("boost libs       : ${Boost_LIBRARIES}") 
     38message("") 
     39else(EXISTS ${Boost_LIBRARIES}) 
     40  message(FATAL_ERROR "Cannot build without Boost Thread library. Please install libboost-thread-dev package or visit www.boost.org.") 
     41endif(EXISTS ${Boost_LIBRARIES}) 
    1842 
    19 include_directories(include jace/include proxies/include 
     43if(IS_DIRECTORY ${JACE_DIR}) 
     44else(IS_DIRECTORY ${JACE_DIR}) 
     45  message(FATAL_ERROR "Cannot build without Jace. Please set JACE_DIR.") 
     46endif(IS_DIRECTORY ${JACE_DIR}) 
     47 
     48include_directories(include ${JACE_DIR}/source/c++/include proxies/include 
    2049  ${JAVA_INCLUDE_PATH} ${JAVA_INCLUDE_PATH2} ${Boost_INCLUDE_DIR}) 
    2150 
    2251### build Jace C++ library ### 
    2352 
    24 add_subdirectory(jace) 
     53message("-- Jace source files:") 
     54message("jace directory   : ${JACE_DIR}") 
     55file(GLOB_RECURSE JACE_SRC ${JACE_DIR}/source/c++/source/*.cpp) 
     56#message("jace source      : ${JACE_SRC}") 
     57message("") 
    2558 
    26 ### build Bio-Formats Jace C++ bindings (bfjace) ### 
     59add_library(jace SHARED ${JACE_SRC}) 
    2760 
    28 message("-- Bio-Formats Jace source files:") 
     61set_target_properties(jace PROPERTIES 
     62  COMPILE_FLAGS "-pthread -Wall -fpermissive" 
     63  LINK_FLAGS "-pthread") 
     64 
     65### build Bio-Formats C++ bindings ### 
     66 
     67message("-- Bio-Formats C++ source files:") 
    2968file(GLOB_RECURSE BFJACE_SRC proxies/source/*.cpp) 
    30 message("  bfjace source : ${BFJACE_SRC}") 
    31  
     69#message("  bfjace source : ${BFJACE_SRC}") 
    3270message("") 
    3371 
     
    4785  ${JAVA_JVM_LIBRARY} ${Boost_LIBRARIES}) 
    4886 
    49 ### TEMP - build some Jace examples for testing ### 
     87### TEMP - build some examples for testing ### 
    5088 
    5189add_executable(example1 source/example1.cpp) 
  • trunk/components/bio-formats-jace/build.properties

    r4761 r4822  
    33# 
    44 
    5 # Ant properties file for bfjace, the Bio-Formats Jace C++ bindings. 
     5# Ant properties file for the Bio-Formats C++ bindings. 
    66# Download Apache Ant from http://ant.apache.org/. 
    77# Type "ant -p" for a list of targets. 
    8  
    9 component.jar            = (none) 
    10 component.classpath      = (none) 
    11 component.java-version   = 1.5 
    12  
    13 component.resources-bin  = (none) 
    14 component.resources-text = (none) 
    15  
    16 component.main-class     = (none) 
    17 component.runtime-cp     = ${component.classpath} 
    188 
    199# override if Ant cannot find your Java runtime classes 
    2010#jre.runtime = ${java.home}/lib/rt.jar 
    2111 
    22 cmake.build-dir          = build 
    23 jace.proxy-dir           = proxies 
     12proxies.dir = proxies 
  • trunk/components/bio-formats-jace/build.xml

    r4761 r4822  
    22build.xml 
    33 
    4 Ant build file for bfjace, the Bio-Formats Jace C++ bindings. 
     4Ant build file for the Bio-Formats C++ bindings. 
    55Download Apache Ant from http://ant.apache.org/. 
    66Type "ant -p" for a list of targets. 
     7 
     8Note that this build file extends common.xml rather than java.xml, 
     9because this component does not consist of Java source files. 
    710--> 
    811 
    9 <project name="formats-jace" default="jar" basedir="."> 
     12<project name="bfcpp" default="compile" basedir="."> 
    1013  <description> 
    11     Build file for Bio-Formats Jace C++ bindings 
     14    Build file for Bio-Formats C++ bindings 
    1215  </description> 
    1316  <property file="base.properties"/> 
     
    1518  <property file="build.properties"/> 
    1619 
    17   <!-- 
    18   Guess where the java runtime classes are for Jace 
    19   Stolen from: 
    20   http://forums.gamegardens.com/discussion/mvnforum/viewthread?thread=324 
    21   --> 
    22   <!-- if Mac OS X --> 
    23   <property name="jre.macosx.classes" 
    24     value="/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar"/> 
    25   <property name="jre.macosx.ui" 
    26     value="/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar"/> 
    27   <condition property="jre.runtime" 
    28     value="${jre.macosx.classes}:${jre.macosx.ui}"> 
    29     <and> 
    30       <os family="mac"/> 
    31       <os family="unix"/> 
    32     </and> 
    33   </condition> 
    34   <!-- Default for Unix --> 
    35   <property name="jre.runtime" value="${java.home}/lib/rt.jar"/> 
     20  <target name="check-jace"> 
     21    <available file="${jace.home}/release/lib" property="jaceFound"/> 
     22    <if> 
     23      <isset property="jaceFound"/> 
     24      <else> 
     25<echo> 
     26This component requires Jace, available from: 
     27  http://sourceforge.net/projects/jace/ 
    3628 
    37   <target name="gen-proxies" depends="clean-gen" 
    38     description="generate Jace proxies from C++ source code"> 
    39     <mkdir dir="${jace.proxy-dir}/include"/> 
    40     <mkdir dir="${jace.proxy-dir}/source"/> 
    41     <java classname="jace.autoproxy.AutoProxy"> 
    42       <arg path="include"/> 
    43       <arg path="source"/> 
    44       <arg path="${jace.proxy-dir}/include"/> 
    45       <arg path="${jace.proxy-dir}/source"/> 
    46       <arg path="${jre.runtime}:${artifact.dir}/bio-formats.jar"/> 
    47       <classpath> 
    48         <fileset dir="jace/lib"> 
    49           <include name="*.jar"/> 
    50         </fileset> 
    51       </classpath> 
    52       <arg value="-mindep"/> 
    53     </java> 
     29Please set the jace.home property to point to 
     30your Jace installation directory. E.g.: 
     31  ant -Djace.home=${user.home}/jace 
     32 
     33You can check out the latest Jace code from 
     34the Subversion repository using the command: 
     35  svn co https://jace.svn.sourceforge.net/svnroot/jace/trunk jace 
     36</echo> 
     37        <fail message="Jace not found."/> 
     38      </else> 
     39    </if> 
    5440  </target> 
    5541 
    56   <target name="clean-gen" description="clean Jace proxies"> 
    57     <delete dir="${jace.proxy-dir}"/> 
     42  <target name="compile-jace" depends="check-jace" 
     43    description="compile Jace Java classes"> 
     44    <available file="${jace.home}/release/lib/jace.jar" 
     45      property="jaceJarsExist"/> 
     46    <if> 
     47      <isset property="jaceJarsExist"/> 
     48      <then> 
     49<echo>Jace libraries exist; run clean-jace target first to recompile.</echo> 
     50      </then> 
     51      <else> 
     52        <ant dir="${jace.home}/source/java"/> 
     53      </else> 
     54    </if> 
    5855  </target> 
    5956 
    60   <target name="build" depends="gen-proxies" 
    61     description="Build Bio-Formats Jace C++ library"> 
    62     <mkdir dir="${cmake.build-dir}"/> 
    63     <exec executable="cmake" dir="${cmake.build-dir}"> 
     57  <target name="gen-proxies" depends="compile-jace" 
     58    description="generate C++ proxies for Bio-Formats Java library"> 
     59    <available file="${proxies.dir}" property="proxiesExist"/> 
     60    <if> 
     61      <isset property="proxiesExist"/> 
     62      <then> 
     63<echo>Proxies exist; run clean-proxies target first to regenerate.</echo> 
     64      </then> 
     65      <else> 
     66        <mkdir dir="${proxies.dir}/include"/> 
     67        <mkdir dir="${proxies.dir}/source"/> 
     68        <!-- NB: Need to fork or else Ant raises a cryptic exception. --> 
     69        <java classname="jace.autoproxy.AutoProxy" fork="true"> 
     70          <arg path="include"/> 
     71          <arg path="source"/> 
     72          <arg path="${proxies.dir}/include"/> 
     73          <arg path="${proxies.dir}/source"/> 
     74          <arg path="${jre.runtime}:${artifact.dir}/bio-formats.jar"/> 
     75          <classpath> 
     76            <fileset dir="${jace.home}/release/lib"> 
     77              <include name="*.jar"/> 
     78            </fileset> 
     79          </classpath> 
     80          <arg value="-mindep"/> 
     81        </java> 
     82      </else> 
     83    </if> 
     84  </target> 
     85 
     86  <target name="gen-makefile" depends="check-jace, gen-proxies" 
     87    description="Generate build system for Bio-Formats C++ bindings"> 
     88    <mkdir dir="${build.dir}"/> 
     89    <exec executable="cmake" dir="${build.dir}" failonerror="true"> 
     90      <arg value="-DJACE_DIR=${jace.home}"/> 
    6491      <arg value=".."/> 
    6592    </exec> 
    66     <exec executable="make" dir="${cmake.build-dir}"/> 
    67     <copy file="${cmake.build-dir}/jace/libjace.so" todir="${cmake.build-dir}"/> 
    68     <copy file="jace/lib/jace-runtime.jar" todir="${cmake.build-dir}"/> 
    69     <copy file="${artifact.dir}/loci_tools.jar" todir="${cmake.build-dir}"/> 
    7093  </target> 
    7194 
    72   <target name="clean-build" description="clean bfjace build files"> 
    73     <delete dir="${cmake.build-dir}"/> 
     95  <target name="copy-libs" depends="check-jace, compile-jace"> 
     96    <mkdir dir="${build.dir}"/> 
     97    <copy file="${artifact.dir}/loci_tools.jar" todir="${build.dir}"/> 
     98    <copy file="${jace.home}/release/lib/jace-runtime.jar" 
     99      todir="${build.dir}"/> 
     100  </target> 
     101 
     102  <target name="compile" depends="gen-makefile, copy-libs" 
     103    description="Build Bio-Formats C++ library"> 
     104    <exec executable="make" dir="${build.dir}" failonerror="true"/> 
     105  </target> 
     106 
     107  <target name="clean-jace" depends="check-jace" 
     108    description="clean Jace libraries"> 
     109    <ant dir="${jace.home}/source/java" target="clean"/> 
     110    <delete file="${jace.home}/release/lib/jace.jar"/> 
     111    <delete file="${jace.home}/release/lib/jace-runtime.jar"/> 
     112  </target> 
     113 
     114  <target name="clean-proxies" description="clean C++ proxies"> 
     115    <delete dir="${proxies.dir}"/> 
    74116  </target> 
    75117 
  • trunk/components/bio-formats/build.xml

    r4609 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616 
  • trunk/components/checkstyle/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/common/build.xml

    r4521 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/flow-cytometry/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/forks/jai/build.xml

    r4503 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/forks/mdbtools/build.xml

    r4424 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/forks/poi/build.xml

    r4424 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/legacy/jvmlink/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/legacy/multi-lut/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/legacy/ome-editor/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/legacy/ome-notes/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/loci-plugins/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/ome-io/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/ome-plugins/build.xml

    r4357 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/ome-xml/build.xml

    r4361 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616</project> 
  • trunk/components/slim-plotter/build.xml

    r4412 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616 
     
    4040      </sequential> 
    4141    </for> 
    42  
    4342    <!-- HACK - copy does not preserve permissions; chmod them back --> 
    4443    <chmod perm="+x"> 
  • trunk/components/test-suite/build.xml

    r4813 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616 
  • trunk/components/visbio/build.xml

    r4382 r4822  
    1212  </description> 
    1313  <property file="base.properties"/> 
    14   <import file="${root.dir}/common.xml"/> 
     14  <import file="${root.dir}/java.xml"/> 
    1515  <property file="build.properties"/> 
    1616 
  • 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.