root/branches/ticket-39-rename/build.xml
| Revision 690, 5.9 kB (checked in by jmoore, 3 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="usage" |
| 55 | description="Usage information"> |
| 56 | <concat> |
| 57 | <filelist dir="${import.dir}" files="usage-ant.txt"/> |
| 58 | </concat> |
| 59 | </target> |
| 60 | |
| 61 | <!-- Multiproject: |
| 62 | The idea for these targets is taken from maven2 and is |
| 63 | supported by the antlib/resources/lifecycle.xml ant script. |
| 64 | Unlike most other targets which can be called from anywhere, |
| 65 | these targets can only be called from the top-level because |
| 66 | they mask the lifecycle.xml target definitions. |
| 67 | --> |
| 68 | <target name="multiproject" depends="compatibility,init"/> |
| 69 | |
| 70 | <target name="multi" depends="multiproject" |
| 71 | description="Convenience target. Iterates over all components calling the $${defaultTarget} method (default=${defaultTarget}"> |
| 72 | <iterate target="${defaultTarget}"/> |
| 73 | </target> |
| 74 | |
| 75 | <target name="prepare" depends="multiproject" |
| 76 | description="Lifecycle target: calls 'prepare' on all components"> |
| 77 | <iterate target="prepare"/> |
| 78 | </target> |
| 79 | |
| 80 | <target name="generate" depends="multiproject" |
| 81 | description="Lifecycle target: calls 'generate' on all components"> |
| 82 | <iterate target="generate"/> |
| 83 | </target> |
| 84 | |
| 85 | <target name="compile" depends="multiproject" |
| 86 | description="Lifecycle target: calls 'compile' on all components"> |
| 87 | <iterate target="compile"/> |
| 88 | </target> |
| 89 | |
| 90 | <target name="test" depends="multiproject" |
| 91 | description="Lifecycle target: calls 'test' on all components"> |
| 92 | <iterate target="test"/> |
| 93 | </target> |
| 94 | |
| 95 | <target name="package" depends="multiproject" |
| 96 | description="Lifecycle target: calls 'package' on all components"> |
| 97 | <iterate target="package"/> |
| 98 | </target> |
| 99 | |
| 100 | <target name="install" depends="multiproject" |
| 101 | description="Lifecycle target: calls 'install' on all components"> |
| 102 | <iterate target="install"/> |
| 103 | </target> |
| 104 | |
| 105 | <target name="integration" depends="multiproject" |
| 106 | description="Lifecycle target: calls 'integration' on all components"> |
| 107 | <iterate target="integration"/> |
| 108 | </target> |
| 109 | |
| 110 | <target name="dist" depends="integration"> |
| 111 | <mkdir dir="${dist.dir}"/> |
| 112 | <echo>javadoc needs to copy images</echo> |
| 113 | |
| 114 | <!-- |
| 115 | etc/ |
| 116 | ======================================================== |
| 117 | Copies example property files to the ${dist.dir} |
| 118 | for use by the user to configure the install. |
| 119 | --> |
| 120 | <copy todir="${dist.dir}/etc"> |
| 121 | <fileset dir="${omero.home}/etc"> |
| 122 | <exclude name="local.properties"/> |
| 123 | </fileset> |
| 124 | </copy> |
| 125 | |
| 126 | <!-- |
| 127 | Copies ... |
| 128 | --> |
| 129 | <copy todir="${dist.dir}"> |
| 130 | <fileset dir="${omero.home}"> |
| 131 | <include name="omero.class"/> |
| 132 | <include name="components/antlib/**"/> |
| 133 | <include name="lib/tools/**"/> |
| 134 | <include name="lib/repository/ant/**"/> |
| 135 | <include name="lib/repository/xml-apis/**"/> |
| 136 | <include name="lib/repository/xerces/**"/> |
| 137 | <include name="lib/repository/omero/postgresql/**"/> |
| 138 | <!-- For testing purposes --> |
| 139 | <include name="lib/repository/groovy/**"/> |
| 140 | <include name="lib/repository/testng/**"/> |
| 141 | </fileset> |
| 142 | </copy> |
| 143 | <copy todir="${dist.dir}"> |
| 144 | <fileset dir="${app.comp}/${target.rel}"> |
| 145 | <include name="*.ear"/> |
| 146 | </fileset> |
| 147 | </copy> |
| 148 | |
| 149 | <!-- |
| 150 | SQL to createdb. |
| 151 | --> |
| 152 | <copy todir="${dist.dir}/sql"> |
| 153 | <fileset dir="${common.comp}/${generated.rel}/resources" includes="*.sql"/> |
| 154 | </copy> |
| 155 | <!-- |
| 156 | Copy new build.xml to ${dist.dir} |
| 157 | --> |
| 158 | <copy |
| 159 | file="${import.dir}/omero.xml" |
| 160 | tofile="${dist.dir}/build.xml" |
| 161 | overwrite="true" |
| 162 | /> |
| 163 | <copy todir="${dist.dir}/client"> |
| 164 | <fileset dir="${common.comp}/${target.rel}" includes="*.jar"/> |
| 165 | <fileset dir="${client.comp}/${target.rel}" includes="*.jar"/> |
| 166 | <fileset dir="${lib.dir}/repository"> |
| 167 | <include name="omero/jboss*/**/*.jar"/> |
| 168 | <include name="org/springframework/spring/**/*.jar"/> |
| 169 | <include name="commons-logging/commons-logging/**/*.jar"/> |
| 170 | </fileset> |
| 171 | <flattenmapper/> |
| 172 | </copy> |
| 173 | |
| 174 | </target> |
| 175 | |
| 176 | <target name="zip"> |
| 177 | <zip destfile="omero-${omero.version}.zip"> |
| 178 | <zipfileset dir="${dist.dir}" prefix="omero-${omero.version}"/> |
| 179 | </zip> |
| 180 | </target> |
| 181 | |
| 182 | <target name="clean" depends="multiproject" |
| 183 | description="Lifecycle target: calls 'clean' on all components"> |
| 184 | <delete dir="${dist.dir}"/> |
| 185 | <iterate target="clean"/> |
| 186 | </target> |
| 187 | |
| 188 | </project> |
Note: See TracBrowser
for help on using the browser.
