root/branches/omero_ds_fix/build.xml
| Revision 1063, 6.7 kB (checked in by jmoore, 2 years ago) |
|---|
| Line | |
|---|---|
| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <project name="main" default="usage" basedir="."> |
| 3 | <!-- |
| 4 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 5 | # |
| 6 | # Copyright (C) 2005 Open Microscopy Environment |
| 7 | # Massachusetts Institue of Technology, |
| 8 | # National Institutes of Health, |
| 9 | # University of Dundee |
| 10 | # |
| 11 | # |
| 12 | # |
| 13 | # This library is free software; you can redistribute it and/or |
| 14 | # modify it under the terms of the GNU Lesser General Public |
| 15 | # License as published by the Free Software Foundation; either |
| 16 | # version 2.1 of the License, or (at your option) any later |
| 17 | # version. |
| 18 | # |
| 19 | # This library is distributed in the hope that it will be useful, |
| 20 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 21 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 22 | # Lesser General Public License for more details. |
| 23 | # |
| 24 | # You should have received a copy of the GNU Lesser General Public |
| 25 | # License along with this library; if not, write to the Free |
| 26 | # Software |
| 27 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA |
| 28 | # 02111-1307 USA |
| 29 | # |
| 30 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 31 | |
| 32 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 33 | # Written by: Josh Moore <josh.moore@gmx.de> |
| 34 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 35 | |
| 36 | DOCUMENTATION: |
| 37 | ================================================= |
| 38 | |
| 39 | To use this script you need only have downloaded |
| 40 | the source code (either from subversion or as |
| 41 | distribution). The build system can be used by |
| 42 | calling: |
| 43 | |
| 44 | java omero <arguments> |
| 45 | |
| 46 | from within the OMERO_HOME directory (this is |
| 47 | what you checked out of subversion and where this |
| 48 | file is located). |
| 49 | |
| 50 | --> |
| 51 | |
| 52 | <import file="components/antlib/resources/global.xml"/> |
| 53 | |
| 54 | <target name="help" depends="usage"/> |
| 55 | <target name="usage" |
| 56 | description="Usage information"> |
| 57 | <concat> |
| 58 | <filelist dir="${import.dir}" files="usage-ant.txt"/> |
| 59 | </concat> |
| 60 | </target> |
| 61 | |
| 62 | <!-- Multiproject: |
| 63 | The idea for these targets is taken from maven2 and is |
| 64 | supported by the antlib/resources/lifecycle.xml ant script. |
| 65 | Unlike most other targets which can be called from anywhere, |
| 66 | these targets can only be called from the top-level because |
| 67 | they mask the lifecycle.xml target definitions. |
| 68 | --> |
| 69 | <target name="multiproject" depends="compatibility,init"/> |
| 70 | |
| 71 | <target name="multi" depends="multiproject" |
| 72 | description="Convenience target. Iterates over all components calling the $${defaultTarget} method (default=${defaultTarget}"> |
| 73 | <iterate target="${defaultTarget}"/> |
| 74 | </target> |
| 75 | |
| 76 | <target name="prepare" depends="multiproject" |
| 77 | description="Lifecycle target: calls 'prepare' on all components"> |
| 78 | <iterate target="prepare"/> |
| 79 | </target> |
| 80 | |
| 81 | <target name="generate" depends="multiproject" |
| 82 | description="Lifecycle target: calls 'generate' on all components"> |
| 83 | <iterate target="generate"/> |
| 84 | </target> |
| 85 | |
| 86 | <target name="compile" depends="multiproject" |
| 87 | description="Lifecycle target: calls 'compile' on all components"> |
| 88 | <iterate target="compile"/> |
| 89 | </target> |
| 90 | |
| 91 | <target name="test" depends="multiproject" |
| 92 | description="Lifecycle target: calls 'test' on all components"> |
| 93 | <iterate target="test"/> |
| 94 | </target> |
| 95 | |
| 96 | <target name="package" depends="multiproject" |
| 97 | description="Lifecycle target: calls 'package' on all components"> |
| 98 | <iterate target="package"/> |
| 99 | </target> |
| 100 | |
| 101 | <target name="install" depends="multiproject" |
| 102 | description="Lifecycle target: calls 'install' on all components"> |
| 103 | <iterate target="install"/> |
| 104 | <!-- WORKAROUND until cc configuration is changed --> |
| 105 | <mkdir dir="${components.dir}/ejb/target/"/> |
| 106 | <touch file="${components.dir}/ejb/target/ejb-3.0-TRUNK.jar"/> |
| 107 | <!-- END WORKAROUND --> |
| 108 | </target> |
| 109 | |
| 110 | <target name="integration" depends="multiproject" |
| 111 | description="Lifecycle target: calls 'integration' on all components"> |
| 112 | <iterate target="integration"/> |
| 113 | </target> |
| 114 | |
| 115 | <target name="dist"> |
| 116 | <mkdir dir="${dist.dir}"/> |
| 117 | <echo>javadoc needs to copy images</echo> |
| 118 | |
| 119 | <!-- |
| 120 | etc/ |
| 121 | ======================================================== |
| 122 | Copies example property files to the ${dist.dir} |
| 123 | for use by the user to configure the install. |
| 124 | --> |
| 125 | <copy todir="${dist.dir}/etc" overwrite="true"> |
| 126 | <fileset dir="${omero.home}/etc"> |
| 127 | <exclude name="local.properties"/> |
| 128 | </fileset> |
| 129 | </copy> |
| 130 | <concat destfile="${dist.dir}/etc/omero.properties" append="true"> |
| 131 | <filelist dir="${app.comp}" files="product.properties"/> |
| 132 | </concat> |
| 133 | |
| 134 | <!-- |
| 135 | Copies ... |
| 136 | --> |
| 137 | <copy todir="${dist.dir}"> |
| 138 | <fileset dir="${omero.home}"> |
| 139 | <include name="omero.class"/> |
| 140 | <include name="components/antlib/**"/> |
| 141 | <include name="lib/tools/**"/> |
| 142 | <include name="lib/repository/ant/**"/> |
| 143 | <include name="lib/repository/xml-apis/**"/> |
| 144 | <include name="lib/repository/xerces/**"/> |
| 145 | <include name="lib/repository/omero/postgresql/**"/> |
| 146 | <!-- For testing purposes --> |
| 147 | <include name="lib/repository/groovy/**"/> |
| 148 | <include name="lib/repository/testng/**"/> |
| 149 | <!-- deploy --> |
| 150 | <include name="components/common/build.xml"/> |
| 151 | <!-- reload-db --> |
| 152 | <include name="components/server/build.xml"/> |
| 153 | <!-- usermgmt --> |
| 154 | <include name="components/client/build.xml"/> |
| 155 | </fileset> |
| 156 | </copy> |
| 157 | <copy todir="${dist.dir}"> |
| 158 | <fileset dir="${app.comp}/${target.rel}"> |
| 159 | <include name="*.ear"/> |
| 160 | </fileset> |
| 161 | </copy> |
| 162 | |
| 163 | <!-- |
| 164 | SQL to createdb. |
| 165 | --> |
| 166 | <copy todir="${dist.dir}/sql"> |
| 167 | <fileset dir="${common.comp}/${generated.rel}/resources" includes="*.sql"/> |
| 168 | </copy> |
| 169 | <!-- |
| 170 | Copy new build.xml to ${dist.dir} |
| 171 | --> |
| 172 | <copy |
| 173 | file="${import.dir}/omero.xml" |
| 174 | tofile="${dist.dir}/build.xml" |
| 175 | overwrite="true" |
| 176 | /> |
| 177 | <copy todir="${dist.dir}/client"> |
| 178 | <fileset dir="${common.comp}/${target.rel}" includes="*.jar"/> |
| 179 | <fileset dir="${client.comp}/${target.rel}" includes="*.jar"/> |
| 180 | <fileset dir="${import.comp}/${target.rel}" includes="*.jar"/> |
| 181 | <fileset dir="${server.comp}/${target.rel}" includes="*.jar"/> |
| 182 | <fileset dir="${lib.dir}/repository"> |
| 183 | <include name="omero/jboss*/**/*.jar"/> |
| 184 | <include name="org/springframework/spring/**/*.jar"/> |
| 185 | <include name="commons-logging/commons-logging/**/*.jar"/> |
| 186 | <include name="log4j/**/*.jar"/> |
| 187 | <include name="omero/omejava/**/*.jar"/> |
| 188 | </fileset> |
| 189 | <flattenmapper/> |
| 190 | </copy> |
| 191 | |
| 192 | </target> |
| 193 | |
| 194 | <target name="zip"> |
| 195 | <zip destfile="omero-${omero.version}.zip"> |
| 196 | <zipfileset dir="${dist.dir}" prefix="omero-${omero.version}"/> |
| 197 | </zip> |
| 198 | </target> |
| 199 | |
| 200 | <target name="clean" depends="multiproject" |
| 201 | description="Lifecycle target: calls 'clean' on all components"> |
| 202 | <delete dir="${dist.dir}"/> |
| 203 | <iterate target="clean"/> |
| 204 | </target> |
| 205 | |
| 206 | </project> |
Note: See TracBrowser
for help on using the browser.
