root/branches/dbupdates/build.xml
| Revision 1501, 6.7 kB (checked in by jmoore, 19 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <project name="main" default="usage" basedir="."> |
| 3 | <!-- |
| 4 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 5 | # |
| 6 | # $Id$ |
| 7 | # |
| 8 | # Copyright 2006 University of Dundee. All rights reserved. |
| 9 | # Use is subject to license terms supplied in LICENSE.txt |
| 10 | # |
| 11 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 12 | |
| 13 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 14 | # Written by: Josh Moore <josh.moore@gmx.de> |
| 15 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 16 | |
| 17 | DOCUMENTATION: |
| 18 | ================================================= |
| 19 | |
| 20 | To use this script you need only have downloaded |
| 21 | the source code (either from subversion or as |
| 22 | distribution). The build system can be used by |
| 23 | calling: |
| 24 | |
| 25 | java omero <arguments> |
| 26 | |
| 27 | from within the OMERO_HOME directory (this is |
| 28 | what you checked out of subversion and where this |
| 29 | file is located). |
| 30 | |
| 31 | --> |
| 32 | |
| 33 | <import file="components/antlib/resources/global.xml"/> |
| 34 | |
| 35 | <target name="help" depends="usage"/> |
| 36 | <target name="usage" |
| 37 | description="Usage information"> |
| 38 | <concat> |
| 39 | <filelist dir="${import.dir}" files="usage-ant.txt"/> |
| 40 | </concat> |
| 41 | </target> |
| 42 | |
| 43 | <!-- Multiproject: |
| 44 | The idea for these targets is taken from maven2 and is |
| 45 | supported by the antlib/resources/lifecycle.xml ant script. |
| 46 | Unlike most other targets which can be called from anywhere, |
| 47 | these targets can only be called from the top-level because |
| 48 | they mask the lifecycle.xml target definitions. |
| 49 | --> |
| 50 | <target name="multiproject" depends="compatibility,init"/> |
| 51 | |
| 52 | <target name="multi" depends="multiproject" |
| 53 | description="Convenience target. Iterates over all components calling the $${defaultTarget} method (default=${defaultTarget}"> |
| 54 | <iterate target="${defaultTarget}"/> |
| 55 | </target> |
| 56 | |
| 57 | <target name="prepare" depends="multiproject" |
| 58 | description="Lifecycle target: calls 'prepare' on all components"> |
| 59 | <iterate target="prepare"/> |
| 60 | </target> |
| 61 | |
| 62 | <target name="generate" depends="multiproject" |
| 63 | description="Lifecycle target: calls 'generate' on all components"> |
| 64 | <iterate target="generate"/> |
| 65 | </target> |
| 66 | |
| 67 | <target name="compile" depends="multiproject" |
| 68 | description="Lifecycle target: calls 'compile' on all components"> |
| 69 | <iterate target="compile"/> |
| 70 | </target> |
| 71 | |
| 72 | <target name="test" depends="multiproject" |
| 73 | description="Lifecycle target: calls 'test' on all components"> |
| 74 | <iterate target="test"/> |
| 75 | </target> |
| 76 | |
| 77 | <target name="package" depends="multiproject" |
| 78 | description="Lifecycle target: calls 'package' on all components"> |
| 79 | <iterate target="package"/> |
| 80 | </target> |
| 81 | |
| 82 | <target name="install" depends="multiproject" |
| 83 | description="Lifecycle target: calls 'install' on all components"> |
| 84 | <iterate target="install"/> |
| 85 | </target> |
| 86 | |
| 87 | <target name="integration" depends="multiproject" |
| 88 | description="Lifecycle target: calls 'integration' on all components"> |
| 89 | <iterate target="integration"/> |
| 90 | </target> |
| 91 | |
| 92 | <target name="dist"> |
| 93 | <mkdir dir="${dist.dir}"/> |
| 94 | <echo>javadoc needs to copy images</echo> |
| 95 | |
| 96 | <!-- |
| 97 | etc/ |
| 98 | ======================================================== |
| 99 | Copies example property files to the ${dist.dir} |
| 100 | for use by the user to configure the install. |
| 101 | --> |
| 102 | <copy todir="${dist.dir}/etc" overwrite="true"> |
| 103 | <fileset dir="${omero.home}/etc"> |
| 104 | <exclude name="local.properties"/> |
| 105 | </fileset> |
| 106 | </copy> |
| 107 | <concat destfile="${dist.dir}/etc/omero.properties" append="true"> |
| 108 | <filelist dir="${app.comp}" files="product.properties"/> |
| 109 | </concat> |
| 110 | |
| 111 | <!-- |
| 112 | Copies ... |
| 113 | --> |
| 114 | <copy todir="${dist.dir}"> |
| 115 | <fileset dir="${omero.home}"> |
| 116 | <include name="omero.class"/> |
| 117 | <include name="components/antlib/**"/> |
| 118 | <include name="lib/tools/**"/> |
| 119 | <include name="lib/repository/ant/**"/> |
| 120 | <include name="lib/repository/xml-apis/**"/> |
| 121 | <include name="lib/repository/xerces/**"/> |
| 122 | <include name="lib/repository/omero/postgresql/**"/> |
| 123 | <!-- For testing purposes --> |
| 124 | <include name="lib/repository/groovy/**"/> |
| 125 | <include name="lib/repository/testng/**"/> |
| 126 | <!-- deploy --> |
| 127 | <include name="components/common/build.xml"/> |
| 128 | <!-- reload-db --> |
| 129 | <include name="components/server/build.xml"/> |
| 130 | <!-- usermgmt --> |
| 131 | <include name="components/client/build.xml"/> |
| 132 | </fileset> |
| 133 | </copy> |
| 134 | <copy todir="${dist.dir}"> |
| 135 | <fileset dir="${app.comp}/${target.rel}"> |
| 136 | <include name="*.ear"/> |
| 137 | </fileset> |
| 138 | </copy> |
| 139 | |
| 140 | <!-- |
| 141 | SQL to createdb. |
| 142 | --> |
| 143 | <copy todir="${dist.dir}/sql"> |
| 144 | <fileset dir="${common.comp}/${generated.rel}/resources" includes="*.sql"/> |
| 145 | </copy> |
| 146 | <!-- |
| 147 | Copy new build.xml to ${dist.dir} |
| 148 | --> |
| 149 | <copy |
| 150 | file="${import.dir}/omero.xml" |
| 151 | tofile="${dist.dir}/build.xml" |
| 152 | overwrite="true" |
| 153 | /> |
| 154 | <!-- |
| 155 | OMERO.blitz |
| 156 | --> |
| 157 | <copy todir="${dist.dir}/etc"> |
| 158 | <fileset dir="${blitz.comp}/resources" includes="*.config"/> |
| 159 | <flattenmapper/> |
| 160 | </copy> |
| 161 | |
| 162 | <copy todir="${dist.dir}/include"> |
| 163 | <fileset dir="${blitz.comp}/src/cpp" includes="**/*.h"/> |
| 164 | <fileset dir="${blitz.comp}/src/cpp/generated" includes="**/*.h"/> |
| 165 | <fileset dir="${blitz.comp}/src/cpp/generated2" includes="**/*.h"/> |
| 166 | <fileset dir="${blitz.comp}/resources/slice" includes="**/*.ice"/> |
| 167 | <fileset dir="${blitz.comp}/target/generated/resources" includes="**/*.ice"/> |
| 168 | </copy> |
| 169 | |
| 170 | <copy todir="${dist.dir}/lib"> |
| 171 | <fileset dir="${blitz.comp}/src/cpp/.libs" includes="**/*.so*" followsymlinks="false"/> |
| 172 | <flattenmapper/> |
| 173 | </copy> |
| 174 | |
| 175 | <copy todir="${dist.dir}/blitz"> |
| 176 | <fileset dir="${blitz.comp}/target/standalone" includes="**/*"/> |
| 177 | </copy> |
| 178 | |
| 179 | <useServices dir="${dist.dir}/blitz/"/> |
| 180 | |
| 181 | <copy todir="${dist.dir}/client"> |
| 182 | <fileset dir="${common.comp}/${target.rel}" includes="*.jar"/> |
| 183 | <fileset dir="${client.comp}/${target.rel}" includes="*.jar"/> |
| 184 | <fileset dir="${import.comp}/${target.rel}" includes="*.jar"/> |
| 185 | <fileset dir="${server.comp}/${target.rel}" includes="*.jar"/> |
| 186 | <fileset dir="${blitz.comp}/${target.rel}" includes="*.jar"/> |
| 187 | <fileset dir="${tools.jars}/" includes="*.jar"/> |
| 188 | <fileset dir="${lib.dir}/repository"> |
| 189 | <include name="omero/jboss*/**/*.jar"/> |
| 190 | <include name="org/springframework/spring/**/*.jar"/> |
| 191 | <include name="commons-logging/commons-logging/**/*.jar"/> |
| 192 | <include name="log4j/**/*.jar"/> |
| 193 | <include name="omero/omejava/**/*.jar"/> |
| 194 | <include name="omero/ice/**/*.jar"/> |
| 195 | <include name="omero/client/**/*.jar"/> |
| 196 | </fileset> |
| 197 | <flattenmapper/> |
| 198 | </copy> |
| 199 | |
| 200 | </target> |
| 201 | |
| 202 | <target name="zip"> |
| 203 | <zip destfile="omero-${omero.version}.zip"> |
| 204 | <zipfileset dir="${dist.dir}" prefix="omero-${omero.version}"/> |
| 205 | </zip> |
| 206 | </target> |
| 207 | |
| 208 | <target name="clean" depends="multiproject" |
| 209 | description="Lifecycle target: calls 'clean' on all components"> |
| 210 | <delete dir="${dist.dir}"/> |
| 211 | <iterate target="clean"/> |
| 212 | </target> |
| 213 | |
| 214 | </project> |
Note: See TracBrowser
for help on using the browser.
