Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: develop
Fetching contributors…

Cannot retrieve contributors at this time

933 lines (836 sloc) 46.614 kB
<?xml version="1.0" encoding="utf-8"?>
<project name="toplevel" default="build-default" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<!--
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# $Id$
#
# Copyright 2008 Glencoe Software, Inc. All rights reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Written by: Josh Moore, josh at glencoesoftware.com
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rewrite of the OMERO build system to allow for building
individual components. Use "ant -p" to see the individual
build-* targets.
-->
<description>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Top-level OMERO build. The default build with a target ("./build.py" will suffice
for most builds. If you need OmeroCpp (the C++ bindings for OMERO) use "build-all"
or "build-cpp" targets:
./build.py build-all
To get started using Eclipse, execute "./build.py build-dev" and import the top-level
.project file. Eclipse projects also exist for each individual java component.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</description>
<property name="import.dir" value="${basedir}/components/antlib/resources"/>
<import file="${import.dir}/global.xml"/>
<target name="init" depends="check-bioformats,check-ivy,check-scons,check-ice">
<mkdir dir="${blitz.comp}/generated"/>
<mkdir dir="${blitz.comp}/target/generated/src"/>
</target>
<target name="check-bioformats" unless="bioformats.done">
<!-- Prevent future invocations -->
<property name="bioformats.check.done" value="done"/>
<if><not><available file="${basedir}/components/bioformats/build.xml"/></not>
<then>
<fail>No components/bioformats/build.xml!
Use 'git submodule update --init' to checkout the source code.
</fail>
</then></if>
</target>
<target name="check-ivy" unless="ivy.done">
<!-- Prevent future invocations and PermGen errors-->
<property name="ivy.done" value="done"/>
<!-- Touch the local configuration file which is no longer mandatory -->
<if><not><available file="${basedir}/etc/local.properties"/></not>
<then>
<touch file="${basedir}/etc/local.properties"/>
</then></if>
<installIvy/>
<ivy:buildlist reference="all.buildpath" settingsRef="ivy.toplevel">
<fileset dir="${omero.home}/components" includes="*/build.xml" excludes="**/tools/**"/>
</ivy:buildlist>
<ivy:buildlist reference="blitzserver.buildpath" settingsRef="ivy.toplevel">
<fileset dir="${omero.home}/components/blitz/" includes="build.xml"/>
<fileset dir="${omero.home}/components/common/" includes="build.xml"/>
<fileset dir="${omero.home}/components/dsl/" includes="build.xml"/>
<fileset dir="${omero.home}/components/model/" includes="build.xml"/>
<fileset dir="${omero.home}/components/rendering/" includes="build.xml"/>
<fileset dir="${omero.home}/components/romio/" includes="build.xml"/>
<fileset dir="${omero.home}/components/server/" includes="build.xml"/>
<fileset dir="${omero.home}/components/specification/" includes="build.xml"/>
<fileset dir="${omero.home}/components/xsd-fu/" includes="build.xml"/>
</ivy:buildlist>
<ivy:buildlist reference="all-tools.buildpath" settingsRef="ivy.toplevel">
<fileset dir="${omero.home}/components/tools" includes="*/build.xml"/>
</ivy:buildlist>
<!-- Single file paths defined in antlib/resources/directories.xml -->
</target>
<target name="clean" description="Calls 'clean' on all components" depends="check-ivy">
<!-- Calling check-scons here rather than above, so that dependency graph later will re-install
if a user does "ant clean some-target" -->
<antcall target="check-scons" inheritRefs="true" inheritAll="true"/>
<iterate buildpathref="all.buildpath" target="clean"/>
<iterate buildpathref="OmeroImageJ.buildpath" target="tools-clean"/>
<iterate buildpathref="tools.buildpath" target="clean"/>
<delete dir="${dist.dir}"/>
<delete dir="${lib.dir}/cache"/>
<delete includeemptydirs="true">
<fileset dir="${lib.dir}/repository" includes="omero/**,omero-tools/**"/>
</delete>
<delete dir="${target.dir}" quiet="true"/>
<delete dir="${omero.home}/test-output" quiet="true"/>
<delete includeemptydirs="true" quiet="true">
<fileset dir="${omero.home}/examples" includes="config.log,**/*.o,**/*.class,**/*.exe"/>
</delete>
</target>
<macrodef name="setup-py-install">
<attribute name="tarball"/>
<attribute name="dir"/>
<sequential>
<mkdir dir="${target.dir}"/>
<mkdir dir="${target.dir}/lib/python/site-packages"/>
<untar compression="gzip" src="${lib.dir}/repository/@{tarball}" dest="${target.dir}"/>
<exec executable="python" dir="${target.dir}/@{dir}" failonerror="true">
<env key="PYTHONPATH" value="${env.PYTHONPATH}:${target.dir}/lib/python/site-packages"/>
<arg value="setup.py"/>
<arg value="install"/>
<arg value="--prefix=${target.dir}"/>
</exec>
</sequential>
</macrodef>
<target name="check-scons" description="Checks for scons and sets executable or installs">
<available property="scons.py" value="${target.dir}/scons/scons.py" filepath="${target.dir}/scons" file="scons.py" />
<antcall target="build-scons" inheritAll="true" inheritRefs="true"/>
</target>
<target name="build-scons" description="Installs the scons build tool" unless="scons.py">
<unzip src="${lib.dir}/repository/scons-local-2.1.0.zip" dest="target/scons"/>
</target>
<target name="check-ice" description="Checks for slice/include files and unpacks">
<available property="slice.dir" value="true" filepath="${target.dir}" file="Ice" />
<antcall target="build-ice" inheritAll="true" inheritRefs="true"/>
<!-- Checking the slice2* version before continuing. See #1185 -->
<exec outputproperty="executable.ice.version" executable="slice2java">
<arg value="--version"/>
</exec>
<if>
<not>
<or>
<matches pattern="^${ice.compatibility}" string="${executable.ice.version}"/>
<matches pattern="^${ice.compatibility}" string="auto"/>
</or>
</not>
<then><fail>WRONG ICE VERSION!
slice2java version = ${executable.ice.version}
Expected version = ${ice.compatibility}
If you would like to configure which Ice to use,
set ice.compatibility=3.3 or ice.compatibility=3.4
in your etc/local.properties file or on the command-
line: ./build.py -Dice.compatibility=3.3
</fail></then>
</if>
</target>
<target name="build-ice" depends="check-scons" description="Installs the Ice code generation executables" unless="slice2java.exe">
<if><not><available file="${target.dir}/Ice"/></not><then>
<mkdir dir="${target.dir}/Ice"/>
<untar compression="gzip" src="${lib.dir}/repository/ice-includes-${versions.ice}.tar.gz" dest="target/Ice"/>
</then></if>
</target>
<target name="build-default" description="Default build calls build" depends="build"/>
<target name="build" description="Build all components except for C++" depends="init">
<property name="env.NOMAKE" value="1"/>
<iterate buildpathref="all.buildpath" target="dist"/>
<iterate buildpathref="all-tools.buildpath" target="tools-dist"/>
<iterate buildpathref="tools.buildpath" target="dist"/>
<antcall target="build-dist" inheritRefs="true" inheritAll="true"/>
</target>
<!-- includes C++ -->
<target name="build-all" description="Build everything and copy to dist" depends="init">
<iterate buildpathref="all.buildpath" target="dist"/>
<iterate buildpathref="tools.buildpath" target="build"/>
<iterate buildpathref="tools.buildpath" target="dist"/>
<antcall target="build-dist" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build-dev" description="build-default, then test-compile and build-eclipse"
depends="clean,init,build-default,test-compile,build-eclipse"/>
<target name="build-all-dev" description="build-all, then test-compile and build-eclipse"
depends="clean,init,build-default,test-compile,build-eclipse"/>
<target name="build-blitz" description="Alias for 'build-server'" depends="build-server"/>
<target name="build-server" description="Build blitz and copy to dist/blitz" depends="init">
<iterate buildpathref="blitzserver.buildpath" target="dist"/>
<!-- Must also build python since it provides our command lines -->
<iterate buildpathref="OmeroPy.buildpath" target="tools-dist"/>
<iterate buildpathref="OmeroFs.buildpath" target="tools-dist"/>
<!-- TODO: importer too?? -->
<iterate buildpathref="tools.buildpath" target="dist"/>
<!-- Parts of build-dist -->
<antcall target="copy-licenses" inheritRefs="true" inheritAll="true"/>
<antcall target="copy-etc" inheritRefs="true" inheritAll="true"/>
<antcall target="copy-sql" inheritRefs="true" inheritAll="true"/>
<antcall target="copy-server" inheritRefs="true" inheritAll="true"/>
<antcall target="update-version" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build-java" description="Build Java bindings to the OMERO server" depends="init">
<iterate buildpathref="blitzserver.buildpath" target="dist"/>
<iterate buildpathref="OmeroJava.buildpath" target="tools-dist"/>
<iterate buildpathref="tools.buildpath" target="dist"/>
</target>
<target name="build-py" description="Build Python bindings to the OMERO server" depends="init">
<iterate buildpathref="blitzserver.buildpath" target="dist"/>
<iterate buildpathref="OmeroPy.buildpath" target="tools-dist"/>
<iterate buildpathref="tools.buildpath" target="dist"/>
</target>
<target name="build-importer" description="Build importer and copy to dist/lib and dist/bin. May require 'build-java'" depends="init">
<iterate buildpathref="OmeroImporter.buildpath" target="tools-dist"/>
<iterate buildpathref="tools.buildpath" target="dist"/>
<!-- Parts of build-dist -->
<antcall target="copy-client" inheritRefs="true" inheritAll="true"/>
<antcall target="copy-etc" inheritRefs="true" inheritAll="true"/>
<antcall target="update-version" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build-insight" description="Build insight and copy to dist/lib and dist/bin. May require 'build-java'" depends="init">
<iterate buildpathref="tools.buildpath" target="dist"/>
<iterate buildpathref="insight.buildpath" target="dist"/>
<!-- Parts of build-dist -->
<antcall target="copy-client" inheritRefs="true" inheritAll="true"/>
<antcall target="copy-etc" inheritRefs="true" inheritAll="true"/>
<antcall target="update-version" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build-web" description="Build OmeroWeb and copy to dist. May require 'build-py'" depends="init">
<iterate buildpathref="OmeroWeb.buildpath" target="tools-dist"/>
<iterate buildpathref="tools.buildpath" target="dist"/>
<!-- Parts of build-dist -->
<antcall target="copy-etc" inheritRefs="true" inheritAll="true"/>
<antcall target="update-version" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build-cpp" description="Build OmeroCpp bindings and copy to dist/lib" depends="init">
<iterate buildpathref="blitzserver.buildpath" target="dist"/>
<iterate buildpathref="OmeroCpp.buildpath" target="tools-dist"/>
<iterate buildpathref="tools.buildpath" target="dist"/>
<!-- Parts of build-dist -->
<antcall target="copy-etc" inheritRefs="true" inheritAll="true"/>
<if><isset property="env.NOMAKE"/><then>
<echo>
+------------------------------------------------------------------------+
| |
| ==================================================================== |
| |
| WARNING: NOMAKE was set. C++ bindings will not have built correctly. |
| |
| If you used, 'build-default build-cpp' either use two |
| commands './build.py build-default; ./build.py build-cpp' |
| or use './build.py build-all' |
| ==================================================================== |
| |
+-------------------------------------------------------------------------
</echo></then>
</if>
</target>
<target name="build-schema" description="Build new DB schema and copy to sql/" depends="init">
<iterate buildpathref="dsl.buildpath" target="clean"/>
<iterate buildpathref="model.buildpath" target="clean"/>
<iterate buildpathref="dsl.buildpath" target="install"/>
<iterate buildpathref="model.buildpath" target="install"/>
<iterate buildpathref="model.buildpath" target="publish-schema"/>
<!-- Parts of build-dist -->
<antcall target="copy-sql" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build-model" description="Generate model code for all language bindings" depends="init">
<ant antfile="${blitz.comp}/build.xml" dir="${blitz.comp}" target="icegen" inheritAll="false"/>
<!-- Parts of build-dist: updates both server and client -->
<antcall target="build-dist" inheritRefs="true" inheritAll="true"/>
</target>
<target name="build-matlab" description="Provides a matlab toolbox under target. May required 'build-java'" depends="init">
<iterate buildpathref="OmeroMatlab.buildpath" target="tools-dist"/>
<iterate buildpathref="tools.buildpath" target="dist"/>
<!-- Parts of build-dist -->
<antcall target="copy-etc" inheritRefs="true" inheritAll="true"/>
<antcall target="update-version" inheritRefs="true" inheritAll="true"/>
</target>
<target name="eclipse" depends="init">
<tryEclipse settingsRef="ivy.toplevel" filter="true"/>
</target>
<target name="build-eclipse" description="Creates all source directories needed by eclipse in case default build is failing." depends="init">
<iterate buildpathref="all.buildpath" target="eclipse"/>
<iterate buildpathref="insight.buildpath" target="eclipse"/>
<iterate buildpathref="OmeroJava.buildpath" target="eclipse"/>
<iterate buildpathref="OmeroImporter.buildpath" target="eclipse"/>
<tryEclipse settingsRef="ivy.toplevel" filter="true"/>
</target>
<macrodef name="launchSuite">
<attribute name="suite"/>
<attribute name="excludes" default="**/tools/build.xml"/>
<sequential>
<ivy:settings id="ivy.@{suite}" file="${etc.dir}/ivysettings.xml"/>
<ivy:buildlist reference="@{suite}.buildpath" settingsRef="ivy.@{suite}" ivyfilepath="test.xml">
<fileset dir="${omero.home}/components" includes="*/build.xml" excludes="**/insight/*/**/*.xml,@{excludes}"/>
<fileset dir="${omero.home}/components/tools" includes="*/build.xml"/>
<fileset dir="${omero.home}/components/tools/OmeroImageJ" includes="*/build.xml"/>
</ivy:buildlist>
<iterate buildpathref="@{suite}.buildpath" target="@{suite}"/>
</sequential>
</macrodef>
<target name="test-compile" description="Compile all non-native tests" depends="init">
<property name="env.NOMAKE" value="1"/>
<launchSuite suite="test-compile"/>
</target>
<target name="test-compile-all" description="Compile all tests (including C++)" depends="init">
<launchSuite suite="test-compile"/>
</target>
<target name="test-unit" description="Run all non-native unit tests" depends="init">
<property name="env.NOMAKE" value="1"/>
<launchSuite suite="test"/>
</target>
<target name="test-unit-all" description="Run all unit (including C++) tests" depends="init">
<launchSuite suite="test"/>
</target>
<target name="test-integration" description="Run all non-native integration tests" depends="init">
<property name="env.NOMAKE" value="1"/>
<launchSuite suite="integration"/>
</target>
<target name="test-integration-all" description="Run all integration (including C++) tests" depends="init">
<launchSuite suite="integration"/>
</target>
<target name="test-server" description="Run all non-tools/ tests" depends="init">
<launchSuite suite="integration" excludes="**/tools/build.xml,**/tools/**/build.xml"/>
</target>
<target name="test-report" description="Joins test results into a single report">
<mkdir dir="${target.dir}/reports"/>
<junitreport todir="${target.dir}/reports">
<fileset dir="${basedir}/components">
<include name="*/target/reports/xml/*.xml"/>
</fileset>
<fileset dir="${basedir}/components/tools/">
<include name="*/target/reports/xml/*.xml"/>
</fileset>
<report format="frames" todir="${target.dir}/reports/html"/>
</junitreport>
</target>
<target name="test-dist" description="Copy test files into dist for further testing" depends="test-compile">
<ivy:resolve file="test.xml" type="jar" conf="test" settingsRef="ivy.toplevel" log="quiet"/>
<ivy:retrieve conf="test" pattern="${dist.dir}/lib/client/[artifact].[ext]" sync="false" log="quiet" settingsRef="ivy.toplevel"/>
</target>
<target name="examples-cpp" description="Build and run OmeroCpp examples">
<scons_py dir="${basedir}/examples">
<arg value="builddir=${dist.dir}"/>
<arg value="run_cpp=1"/>
<arg value="no_java=1"/>
</scons_py>
</target>
<target name="examples-java" description="Build and run OmeroJava examples">
<scons_py dir="${basedir}/examples">
<arg value="run_java=1"/>
<arg value="no_cpp=1"/>
</scons_py>
</target>
<target name="examples-py" description="Build and run OmeroPy examples">
<scons_py dir="${basedir}/examples" pythonpath="${env.PYTHONPATH}"><!-- omit OmeroPy/src -->
<arg value="run_py=1"/>
<arg value="no_cpp=1"/>
<arg value="no_java=1"/>
</scons_py>
</target>
<target name="release-zip" description="Zip the dist directory into ${product.name}-${omero.version}.zip">
<zip destfile="${omero.home}/target/${product.name}-${omero.version}.zip">
<zipfileset dir="${dist.dir}" prefix="${product.name}-${omero.version}"
excludes="bin/omero"/>
<zipfileset dir="${dist.dir}" prefix="${product.name}-${omero.version}"
includes="bin/omero"
filemode="755"/>
</zip>
<zip destfile="${omero.home}/target/OMERO.py-${omero.version}.zip">
<zipfileset dir="${dist.dir}" prefix="OMERO.py-${omero.version}"
includes="bin/**,etc/**,lib/python/**,lib/fallback/**,sql/**" excludes="bin/omero"/>
<zipfileset dir="${dist.dir}" prefix="OMERO.py-${omero.version}"
includes="bin/omero" filemode="755"/>
</zip>
<zip destfile="${omero.home}/target/OMERO.java-${omero.version}.zip">
<zipfileset dir="${blitz.comp}/src" prefix="OMERO.java-${omero.version}/src" includes="**/*.java"/>
<zipfileset dir="${blitz.comp}/target" prefix="OMERO.java-${omero.version}/src" includes="**/*.java"/>
<zipfileset dir="${blitz.comp}/generated" prefix="OMERO.java-${omero.version}/src" includes="**/*.java"/>
<zipfileset dir="${insight.comp}/SRC" prefix="OMERO.java-${omero.version}/src" includes="**/*.java"/>
<zipfileset dir="${OmeroJava.comp}/src" prefix="OMERO.java-${omero.version}/src" includes="**/*.java"/>
<zipfileset dir="${dist.dir}/lib/client" prefix="OMERO.java-${omero.version}/libs" includes="**/*.jar"/>
</zip>
<copy todir="target">
<fileset dir="components/tools/OmeroImporter/target" includes="*.zip"/>
</copy>
<ant antfile="${OmeroImageJ.comp}/build.xml" dir="${OmeroImageJ.comp}" target="tools-dist" inheritAll="false"/>
<copy file="components/tools/OmeroM/target/OmeroMatlab.zip" tofile="target/OMERO.matlab-${omero.version}.zip"/>
<copy todir="target">
<fileset dir="components/tools/OmeroPy/dist" includes="*.egg"/>
<fileset dir="components/tools/OmeroFS/dist" includes="*.egg"/>
</copy>
<!-- These should eventually be removed in favor of an ivy-based approach -->
<copy todir="target">
<fileset dir="components/insight/target" includes="insight*.zip" excludes="*-ij*.zip"/>
<mapper type="regexp" from="insight(.*).zip" to="OMERO.insight-${omero.version}\1.zip"/>
</copy>
<copy todir="target">
<fileset dir="components/insight/target" includes="editor*.zip"/>
<mapper type="regexp" from="editor(.*).zip" to="OMERO.editor-${omero.version}\1.zip"/>
</copy>
<copy todir="target">
<fileset dir="components/insight/target" includes="importer*.zip"/>
<mapper type="regexp" from="importer(.*).zip" to="OMERO.importer -${omero.version}\1.zip"/>
</copy>
<copy file="components/insight/target/insight-ij.zip" tofile="target/OMERO.insight-ij-${omero.version}.zip"/>
</target>
<target name="release-src" description="Zip the git source into OMERO.source-${omero.version}.zip">
<git command="archive" output="release-src-command" failonerror="true">
<args>
<arg value="--format=zip"/>
<arg value="HEAD"/>
<arg value="-o"/>
<arg value="${target.dir}/OMERO.source-${omero.version}.zip"/>
</args>
</git>
</target>
<target name="release-clients">
<!-- This replaces the previous OMERO-trunk-clients build -->
<mkdir dir="target/pkg"/>
<delete includeemptydirs="true">
<fileset dir="target/pkg" includes="**/*"/>
</delete>
<apply executable="python" dir="${target.dir}/pkg" failonerror="true">
<env key="OMERO_VERSION" value="${omero.version}"/>
<fileset dir="${omero.home}/lib" includes="composite.py"/>
</apply>
</target>
<target name="release-tar" description="Tar the dist directory into ${product-name}-${omero.version}.tar.bz2">
<tar destfile="${product.name}-${omero.version}.tar.bz2" compression="bzip2">
<zipfileset dir="${dist.dir}" prefix="${product.name}-${omero.version}"
excludes="bin/omero"/>
<zipfileset dir="${dist.dir}" prefix="${product.name}-${omero.version}"
includes="bin/omero"
filemode="755"/>
</tar>
</target>
<target name="release-headers" description="Generates headers.xml for all components" depends="init">
<iterate buildpathref="all.buildpath" target="headers"/>
<iterate buildpathref="tools.buildpath" target="headers"/>
<taskdef resource="checkstyletask.properties" classpathref="omero.classpath"/>
<checkstyle config="${omero.home}/docs/styles/checkstyle-header.xml" failOnViolation="true">
<fileset dir="${basedir}" includes="*,docs/**/*,etc/**/*,sql/**/*"/>
<formatter type="xml" toFile="${target.dir}/headers.xml"/>
</checkstyle>
</target>
<target name="release-findbugs" description="Generates findbugs.xml and checkstyle.xml for all components" depends="init">
<iterate buildpathref="all.buildpath" target="findbugs"/>
<iterate buildpathref="tools.buildpath" target="findbugs"/>
</target>
<target name="release-jdepend" description="Generates jdepend.xml for all components" depends="init">
<path id="omero.classpath">
<fileset dir="${omero.home}/lib/repository"/>
</path>
<jdepend outputfile="target/jdepend.txt" fork="yes" classpathref="omero.classpath">
<exclude name="java.*"/>
<exclude name="java.lang.*"/>
<exclude name="java.io.*"/>
<exclude name="java.util.*"/>
<exclude name="javax.*"/>
<exclude name="org.springframework.*"/>
<exclude name="org.springframework.orm.*"/>
<exclude name="org.apache.*"/>
<exclude name="net.ehcache.*"/>
<classespath>
<!--pathelement location="components/model/target/classes"/-->
<pathelement location="components/server/target/classes"/>
<!--pathelement location="components/blitz/target/classes"/-->
</classespath>
</jdepend>
<jdepend outputfile="target/jdepend.xml" fork="yes" format="xml" classpathref="omero.classpath">
<exclude name="java.*"/>
<exclude name="java.lang.*"/>
<exclude name="java.io.*"/>
<exclude name="java.util.*"/>
<exclude name="javax.*"/>
<exclude name="org.springframework.*"/>
<exclude name="org.springframework.orm.*"/>
<exclude name="org.apache.*"/>
<exclude name="net.ehcache.*"/>
<classespath>
<!--pathelement location="components/model/target/classes"/-->
<pathelement location="components/server/target/classes"/>
<!--pathelement location="components/blitz/target/classes"/-->
</classespath>
</jdepend>
<style in="target/jdepend.xml" out="target/jdepend.dot" style="lib/repository/jdepend2dot.xsl"/>
<exec executable="dot" failifexecutionfails="false"> <!-- In case dot is missing -->
<arg value="-Tpng"/>
<arg value="target/jdepend.dot"/>
<arg value="-o"/>
<arg value="target/jdepend.png"/>
</exec>
</target>
<target name="release-coverage" depends="build-eclipse"
description="Merge code coverage reports into single top-level report">
<path id="omero.classpath">
<fileset dir="${omero.home}/target/libs" />
</path>
<taskdef resource="emma_ant.properties" classpathref="omero.classpath" />
<emma>
<merge outfile="${target.dir}/coverage.es" >
<fileset dir="components" includes="**/target/coverage.emma,**/target/metadata.emma"/>
</merge>
<report sourcepath="${src.dir}" >
<fileset dir="${target.dir}" includes="coverage.es"/>
<html outfile="${target.dir}/coverage.html" />
<xml outfile="${target.dir}/coverage.xml" />
</report>
</emma>
</target>
<target name="release-docs" depends="release-javadoc,release-epydoc,release-slice2html" description="Generate Docs for all components under dist/docs/api">
<zip destfile="${omero.home}/target/OMERO.docs-${omero.version}.zip">
<zipfileset dir="${dist.dir}/docs" prefix="OMERO.docs-${omero.version}"/>
</zip>
</target>
<target name="release-slice2html" description="The Ice API Documentation">
<mkdir dir="${omero.home}/target/docs"/>
<copy file="${blitz.comp}/resources/header.txt" tofile="${omero.home}/target/docs/header.txt" overwrite="true"/>
<copy file="${blitz.comp}/resources/footer.txt" tofile="${omero.home}/target/docs/footer.txt" overwrite="true"/>
<replace file="${omero.home}/target/docs/header.txt" token="@VERSION@" value="${omero.version}"/>
<replace file="${omero.home}/target/docs/footer.txt" token="@VERSION@" value="${omero.version}"/>
<mkdir dir="${dist.dir}/docs/api/slice2html"/>
<apply executable="slice2html" parallel="true" failonerror="true">
<arg value="--hdr"/>
<arg value="${omero.home}/target/docs/header.txt"/>
<!-- <arg value="-REMOVETHISTEXTBETWEENDASHES-ftr"/> Commented out as causing a crash in slice2html
<arg value="${omero.home}/target/docs/footer.txt"/> -->
<arg value="-I"/>
<arg value="${blitz.comp}/generated"/>
<arg value="-I"/>
<arg value="${blitz.comp}/resources"/>
<arg value="-I"/>
<arg value="${omero.home}/target/Ice/slice"/>
<arg value="--output-dir"/>
<arg value="${dist.dir}/docs/api/slice2html"/>
<!-- The order here is important. Later docs overwrite earlier ones -->
<fileset dir="${omero.home}/components/tools" includes="**/resources/**/*.ice"/>
<fileset dir="${omero.home}/components/server/src" includes="**/*.ice"/>
<fileset dir="${omero.home}/components/blitz/generated" includes="**/*.ice"/>
<fileset dir="${omero.home}/components/blitz/resources" includes="**/*.ice"/>
<fileset dir="${omero.home}/components/blitz/resources" includes="README.ice"/>
</apply>
</target>
<target name="release-epydoc" description="The OmeroPy API Documentation">
<mkdir dir="${dist.dir}/docs/api/epydoc"/>
<exec executable="epydoc" failonerror="true">
<arg value="--verbose"/>
<arg value="--parse-only"/>
<arg value="--show-imports"/>
<arg value="--navlink=@NAVLINK@"/>
<arg value="--html"/>
<arg value="--graph=all"/>
<arg value="--exclude-introspect=monitors"/><!-- causes a crash if included, review with next release -->
<arg value="-n"/>
<arg value="OmeroPy API Documentation"/>
<arg value="--css"/>
<arg value="docs/epydocstyle.css"/>
<arg value="-o"/>
<arg value="${dist.dir}/docs/api/epydoc"/>
<arg value="${dist.dir}/lib/python/omero"/>
<arg value="${dist.dir}/lib/python/omeroweb"/>
</exec>
<replace dir="${dist.dir}/docs/api/epydoc"
token="@NAVLINK@"
value="&lt;div id=&quot;name-and-version&quot;&gt;OmeroPy API ${omero.version}&lt;/div&gt;&lt;div id=&quot;top-logo&quot; style=&quot;display:none&quot;&gt;&amp;nbsp;&lt;a href=&quot;http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/&quot; target=&quot;_top&quot;&gt;&lt;div id=&quot;ome-logo-inner&quot;&gt;&lt;img src=&quot;http://hudson.openmicroscopy.org.uk/userContent/ome_docs_trac_banner.png&quot; alt=&quot;OME Docs&quot;&gt;&lt;/a&gt;&lt;/div&gt;"/>
<replace dir="${dist.dir}/docs/api/epydoc">
<replacetoken><![CDATA[<head>]]></replacetoken>
<replacevalue><![CDATA[<head profile="http://www.w3.org/2005/10/profile" >
<link rel="icon"
type="image/vnd.microsoft.icon"
href="http://hudson.openmicroscopy.org.uk/userContent/favicon.ico">]]></replacevalue>
</replace>
</target>
<target name="release-javadoc" description="Generate Javadocs for all components under dist/docs/api">
<mkdir dir="${dist.dir}/docs/api"/>
<patternset id="all.java.files">
<!-- Includes prefixed with "**" in order to pick up
tools/ components -->
<include name="src/**/*.java"/>
<include name="target/generated/src/**/*.java"/>
<exclude name="xxx/**"/>
</patternset>
<mkdir dir="target/docs"/>
<copy file="docs/overview.html" tofile="target/docs/overview.html" overwrite="true"/>
<replace file="target/docs/overview.html" token="@VERSION@" value="${omero.version}"/>
<javadoc
failonerror="true"
Verbose="false"
maxmemory="${javadoc.maxmem}"
destdir="${dist.dir}/docs/api"
author="true"
version="true"
use="true"
breakiterator="true"
windowtitle="OMERO (OME Remote Objects) Server"
overview="target/docs/overview.html"
stylesheetfile="docs/javadocsstyle.css">
<classpath>
<fileset dir="lib">
<include name="**/*.jar"/>
<exclude name="repository/omero/**"/>
<exclude name="repository/omero-tools/**"/>
</fileset>
</classpath>
<fileset dir="components/common/" defaultexcludes="yes">
<patternset refid="all.java.files"/>
</fileset>
<fileset dir="components/server/" defaultexcludes="yes">
<patternset refid="all.java.files"/>
</fileset>
<fileset dir="components/romio/" defaultexcludes="yes">
<patternset refid="all.java.files"/>
</fileset>
<fileset dir="components/rendering/" defaultexcludes="yes">
<patternset refid="all.java.files"/>
</fileset>
<!-- Skipping generated files for blitz. Just too many -->
<fileset dir="components/blitz/src" defaultexcludes="yes" includes="**/*.java"/>
<fileset dir="components/tools/OmeroJava" defaultexcludes="yes">
<patternset refid="all.java.files"/>
</fileset>
<doctitle><![CDATA[<h1> Omero API </h1>]]></doctitle>
<bottom><![CDATA[
<div id="ome-logo-for-top" style="display:none"><a href="http://hudson.openmicroscopy.org.uk/job/OMERO/javadoc/" target="_top"><div id="ome-logo-inner"><img src="http://hudson.openmicroscopy.org.uk/userContent/ome_docs_trac_banner.png" alt="OME Docs"></a></div></div>
<div id="doc-name-right" style="position: absolute;top: 90px;right: 20px;"><b>OmeroJava Api</b></div>
<p><i>Version: ${omero.version}</i></p>
<p><b><i>Copyright &#169; @@YEAR@@ The University of Dundee &amp; Open Microscopy Environment. All Rights Reserved.</i></b></p>
]]></bottom>
<tag name="DEV.TODO" scope="all" description="To do:"/>
<group title="A. Core System"
packages="ome.api:ome.conditions*:ome.parameters*:ome.system*"/>
<group title="B. Model"
packages="ome.model*"/>
<group title="C. Client Packages"
packages="ome.client*:ome.adapters*:pojos*"/>
<group title="D. Server Packages"
packages="ome.api.local*:ome.services*:ome.logic*:ome.tools*:ome.security*:ome.io*:ome.annotations*"/>
<group title="E. Blitz Server"
packages="ome.services.blitz*"/>
<group title="E. Blitz Client"
packages="omero*:omeroj*"/>
<group title="G. Rendering Engine"
packages="omeis*"/>
<group title="H. Utilities"
packages="ome.util*"/>
<group title="I. Deprecated"
packages="ome.dynamic*:ome.rules*"/>
<link href="http://java.sun.com/j2se/1.5/docs/api/"/>
<link href="http://www.springframework.org/docs/api/"/>
<link href="http://www.hibernate.org/hib_docs/v3/api/"/>
<link href="http://aopalliance.sourceforge.net/doc/"/>
<link href="http://lucene.apache.org/java/2_2_0/api"/>
</javadoc>
<replace dir="${dist.dir}/docs/api">
<replacetoken><![CDATA[<HEAD>]]></replacetoken>
<replacevalue><![CDATA[<HEAD profile="http://www.w3.org/2005/10/profile">
<link rel="icon"
type="image/vnd.microsoft.icon"
href="http://hudson.openmicroscopy.org.uk/userContent/favicon.ico">]]></replacevalue>
</replace>
<tstamp>
<format property="yearvalue" pattern="yyyy"/>
</tstamp>
<replace dir="${dist.dir}/docs/api" value="${yearvalue}">
<replacetoken><![CDATA[@@YEAR@@]]></replacetoken>
</replace>
</target>
<target name="release-hudson" depends="check-ivy" description="Saves to the hudson repository for dependent builds">
<ivy:resolve settingsRef="ivy.toplevel"
file="${omero.home}/ivy.xml" type="zip" log="quiet"/>
<ivy:publish settingsRef="ivy.toplevel"
artifactspattern="${omero.home}/OMERO.server-${omero.version}.zip"
srcivypattern="${omero.home}/ivy.xml"
resolver="test-resolver"
pubrevision="${omero.version}"
pubdate="${now}"
status="integration"
overwrite="true"/>
<!-- This causes the ivy file to be modified -->
<!--forcedeliver="true"-->
<ivy:install settingsRef="ivy.toplevel"
organisation="omero" module="main" revision="${omero.version}"
from="omero-resolver" to="hudson-repository"
transitive="true" overwrite="true"/>
</target>
<target name="release-nsis" description="Creates a Windows installer with NSIS">
<taskdef name="nsis" classname="net.sf.nsisant.Task">
<classpath location="lib/repository/nsisant-${versions.nsisant}.jar"/>
</taskdef>
<property name="nsis.dir" value="${omero.home}/components/antlib/nsis"/>
<nsis script="${nsis.dir}/omero.nsi" verbosity="4" noconfig="yes" nocd="yes"><!-- out="target/nsis.log"-->
<define name="VERSION" value="4.1.0.0"/><!--${omero.version} Last digit build?"-->
<define name="OMERO_VERSION" value="${omero.version}"/>
<define name="DBVERSION" value="${omero.db.version}"/>
<define name="DBPATCH" value="${omero.db.patch}"/>
<define name="INCLUDE_DIR" value="${nsis.dir}"/>
<define name="INSTALLER_NAME" value="${omero.home}/target/omero_installer-${omero.version}.exe"/>
<!--scriptcmd cmd="AutoCloseWindow true"/-->
</nsis>
</target>
<target name="release-training" description="Produces a zip with the examples/Training files">
<zip destfile="${omero.home}/target/OMERO.training-${omero.version}.zip">
<zipfileset dir="${omero.home}/examples/Training" prefix="OMERO.training-${omero.version}" includes="**" excludes="markup.py"/>
<zipfileset dir="${omero.home}" prefix="OMERO.training-${omero.version}" includes="LICENSE.txt"/>
</zip>
</target>
<!--
Top-level helpers (shared helpers are in components/antlib/resources)
=====================================================================
-->
<target name="build-dist" depends="init,copy-licenses,copy-etc,copy-sql,copy-server,copy-client,update-version"
description="Copy all components to dist/; called at the end of build-* targets"/>
<target name="copy-licenses" depends="init">
<copy file="${omero.home}/LICENSE.txt" todir="${dist.dir}/"/>
<copy todir="${dist.dir}">
<fileset dir="${omero.home}/lib/" includes="licenses/**"/>
</copy>
</target>
<target name="copy-etc" depends="init">
<copy todir="${dist.dir}/etc">
<fileset dir="${omero.home}/etc">
<exclude name="local.properties"/>
</fileset>
</copy>
<replace dir="${dist.dir}/etc" token="@ICE_LIB_VERSION@" value="${versions.ice_lib}"/>
</target>
<target name="copy-sql" depends="init">
<copy todir="${dist.dir}">
<fileset dir="${omero.home}">
<include name="sql/**"/>
</fileset>
</copy>
</target>
<target name="copy-client" depends="init">
<mkdir dir="${dist.dir}/lib/client"/>
<!-- sync="true" deletes any other files like services.jar or extensions.jar which may be under lib -->
<ivy:resolve file="ivy.xml" type="jar,egg" conf="client" settingsRef="ivy.toplevel" log="quiet"/>
<ivy:retrieve conf="client" pattern="${dist.dir}/lib/client/[artifact].[ext]" sync="false" log="quiet" settingsRef="ivy.toplevel"/>
</target>
<target name="copy-server" depends="init">
<mkdir dir="${dist.dir}/lib/server"/>
<!-- sync="true" deletes any other files like services.jar or extensions.jar which may be under lib -->
<ivy:resolve file="ivy.xml" type="jar,egg" conf="server" settingsRef="ivy.toplevel" log="quiet"/>
<ivy:retrieve conf="server" pattern="${dist.dir}/lib/server/[artifact].[ext]" sync="false" log="quiet" settingsRef="ivy.toplevel"/>
</target>
<macrodef name="jar_update_if">
<attribute name="destfile"/>
<element name="filesets" implicit="yes"/>
<sequential>
<if>
<available file="@{destfile}"/>
<then>
<jar update="true" destfile="@{destfile}">
<filesets/>
</jar>
<signjar alias="${jarsign.alias}"
keystore="${jarsign.keystore}"
storepass="${jarsign.storepass}"
preservelastmodified="true"
jar="@{destfile}"/>
</then>
</if>
</sequential>
</macrodef>
<target name="update-version">
<loadproperties srcFile="${dist.dir}/etc/omero.properties">
<filterchain>
<headfilter skip="20" lines="-1"/>
<prefixlines prefix="dist.check."/>
</filterchain>
</loadproperties>
<if><not><equals arg1="${dist.check.omero.version}" arg2="${omero.version}"/></not>
<then>
<!-- Setting version -->
<copy todir="${dist.dir}/etc" overwrite="true">
<fileset dir="${omero.home}/etc" includes="omero.properties"/>
</copy>
<echo file="${dist.dir}/etc/omero.properties" append="true">
omero.version=${omero.version}
</echo>
<!-- Must update the jars with the modified omero.properties file in order for the version to be updated -->
<jar_update_if destfile="${dist.dir}/lib/server/blitz.jar">
<fileset dir="${dist.dir}/etc" includes="omero.properties"/>
</jar_update_if>
<jar_update_if destfile="${dist.dir}/lib/client/omero_client.jar">
<fileset dir="${dist.dir}/etc" includes="omero.properties"/>
</jar_update_if>
<jar_update_if destfile="${dist.dir}/lib/client/OmeroImporter.jar">
<fileset dir="${dist.dir}/etc" includes="omero.properties"/>
</jar_update_if>
</then>
</if>
</target>
<target name="keystore" depends="init" description="Create keystore">
<genkey alias="${jarsign.alias}"
keystore="${jarsign.keystore}"
storepass="${jarsign.storepass}"
validity="${jarsign.validity}">
<dname>
<param name="CN" value="omedev"/>
<param name="OU" value="Open Microscopy Team"/>
<param name="O" value="openmicroscopy.org"/>
<param name="C" value="UK"/>
</dname>
</genkey>
</target>
<target name="server-verify">
<apply executable="jarsigner" failonerror="true">
<fileset dir="${dist.dir}/lib/server" includes="*.jar"/>
<arg value="-verify"/>
</apply>
</target>
<target name="webstart-sign">
<signjar alias="${jarsign.alias}" keystore="${jarsign.keystore}" storepass="${jarsign.storepass}" preservelastmodified="true">
<path>
<fileset dir="${dist.dir}/lib/insight" includes="*.jar"/>
</path>
</signjar>
</target>
<target name="webstart-verify">
<apply executable="jarsigner" failonerror="true">
<fileset dir="${dist.dir}/lib/insight" includes="*.jar"/>
<arg value="-verify"/>
</apply>
</target>
<target name="release-webstart" depends="init">
<unzip src="components/insight/OUT/dist/OMERO.insight-${omero.version}.zip" dest="${dist.dir}/lib/insight">
<patternset>
<include name="**/*.jar"/>
</patternset>
<flattenmapper/>
</unzip>
<antcall target="webstart-sign" inheritAll="true" inheritRefs="true"/>
<copy file="components/insight/SRC/org/openmicroscopy/shoola/env/ui/graphx/omeabout-bk.png" tofile="${dist.dir}/lib/insight/ome.png"/>
</target>
<target name="version">
<trycatch>
<try>
<git command="describe" output="version.describe" failonerror="true">
<args>
<arg line="--dirty"/>
</args>
</git>
<!--"((.*?)-)(v.)+(.*?)-([0-9]+)-g([^-]+)(-dirty)?" select="1\1-2\2-3\3-4\4-5\5"-->
<propertyregex property="version.describe.clean" input="${version.describe}"
regexp="^(v.)?(.*?)(-[0-9]+)?((-)g(.*?))?$" select="\2\3\5\6"/>
<echo>${version.describe.clean}-ice${versions.ice_lib}</echo>
</try>
<catch>
<echo>UNKNOWN-ice${versions.ice_lib}</echo>
</catch>
</trycatch>
</target>
<target name="print-mem">
<echo>
javac.maxmem=${javac.maxmem}
javadoc.maxmem=${javadoc.maxmem}
</echo>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.