• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • Last Change
  • Annotate
  • Revision Log

root/branches/3.0-Beta2/build.xml

Revision 1645, 6.5 kB (checked in by jmoore, 13 months ago)

[MERGING] source:trunk r1643 --> source:branches/3.0-Beta2

  • Property svn:keywords set to Id
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/multiproject.xml"/>
34        <import file="components/antlib/resources/global.xml"/>
35
36        <target name="help" depends="usage"/>
37        <target name="usage"
38                description="Usage information">
39                <concat>
40                        <filelist dir="${import.dir}" files="usage-ant.txt"/>
41                </concat>
42        </target>
43
44<!--    ===============================================
45                BUILD
46        ==================================================  -->
47        <target name="fullbuild" depends="check-system,clean,build,reload-db"
48                description="Extensive build which checks and cleans the build environment, builds, and setups the database"/>
49
50        <target name="build" depends="dsl,model,install"
51                description="A simple build that will install all artifacts to ${omero.repo.local}"/>
52
53        <target name="build-client" depends="check-system,model">
54                <antRun component="common"><target name="install"/></antRun>
55                <antRun component="client"><target name="install"/></antRun>
56        </target>
57
58        <target name="build-server" depends="check-system,model">
59                <antRun component="common"><target name="install"/></antRun>
60                <antRun component="romio"><target name="install"/></antRun>
61                <antRun component="rendering"><target name="install"/></antRun>
62                <antRun component="server"><target name="install"/></antRun>
63        </target>
64
65        <target name="deploy" depends="check-system,build-server">
66                <antRun component="app">
67                        <target name="package"/>
68                        <target name="deploy-ear-jboss"/>
69                </antRun>
70        </target>
71
72        <target name="fulldeploy" depends="check-system,build-server,deploy"/>
73
74
75
76        <!-- Special Components -->
77        <property name="defaultTarget" value="install"/>
78
79        <target name="dsl" depends="check-system" unless="generate.skip">
80                <antRun component="dsl">
81                        <target name="${defaultTarget}"/>
82                </antRun>
83        </target>
84
85        <target name="model" depends="check-system,dsl" unless="generate.skip">
86                <antRun component="common">
87                        <target name="clean"/>
88                        <target name="install"/>
89                </antRun>
90        </target>
91
92        <target name="reload-db">
93                <antRun component="server">
94                        <target name="reload-db"/>
95                </antRun>
96        </target>
97
98        <target name="addgroup">
99                <antRun component="client">
100                        <target name="addgroup"/>
101                </antRun>
102        </target>
103
104        <target name="adduser">
105                <antRun component="client">
106                        <target name="adduser"/>
107                </antRun>
108        </target>
109
110        <target name="dist">
111                <mkdir dir="${dist.dir}"/>
112                <iterate target="dist"/>
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" overwrite="true">
121                        <fileset dir="${omero.home}/etc">
122                                <exclude name="local.properties"/>
123                        </fileset>
124                </copy>
125                <concat destfile="${dist.dir}/etc/omero.properties" append="true">
126                        <filelist dir="${app.comp}" files="product.properties"/>
127                </concat>
128
129                <!--
130                        Copies ...
131                -->
132                <copy todir="${dist.dir}">
133                        <fileset dir="${omero.home}">
134                                <include name="omero.class"/>
135                                <include name="components/antlib/**"/>
136                                <include name="sql/**"/>
137                                <include name="lib/tools/**"/>
138                                <include name="lib/repository/ant/**"/>
139                                <include name="lib/repository/xml-apis/**"/>
140                                <include name="lib/repository/xerces/**"/>
141                                <include name="lib/repository/omero/postgresql/**"/>
142                                <!-- For testing purposes -->
143                                <include name="lib/repository/groovy/**"/>
144                                <include name="lib/repository/testng/**"/>
145                                <!-- deploy -->
146                                <include name="components/common/build.xml"/>
147                                <!-- reload-db -->
148                                <include name="components/server/build.xml"/>
149                                <!-- usermgmt -->
150                                <include name="components/client/build.xml"/>
151                        </fileset>
152                </copy>
153
154                <!-- Copy new build.xml to ${dist.dir} -->
155                <copy
156                        file="${import.dir}/omero.xml"
157                        tofile="${dist.dir}/build.xml"
158                        overwrite="true"
159                />
160
161                <copy todir="${dist.dir}/client">
162                        <fileset dir="${common.comp}/${target.rel}" includes="*.jar"/>
163                        <fileset dir="${client.comp}/${target.rel}" includes="*.jar"/>
164                        <fileset dir="${import.comp}/${target.rel}" includes="*.jar"/>
165                        <fileset dir="${server.comp}/${target.rel}" includes="*.jar"/>
166                        <fileset dir="${blitz.comp}/${target.rel}" includes="*.jar"/>
167                        <fileset dir="${lib.dir}/repository">
168                                <include name="omero/jboss*/**/*.jar"/>
169                                <include name="org/springframework/spring/**/*.jar"/>
170                                <include name="commons-logging/commons-logging/**/*.jar"/>
171                                <include name="log4j/**/*.jar"/>
172                                <include name="omero/omejava/**/*.jar"/>
173                                <include name="omero/ice/**/*.jar"/>
174                                <include name="omero/client/**/*.jar"/>
175                        </fileset>
176                        <flattenmapper/>
177                </copy>
178
179        </target>
180
181        <target name="zip">
182                <zip destfile="${product.name}-${product.version}.zip">
183                        <zipfileset dir="${dist.dir}" prefix="${product.name}-${product.version}"/>
184                </zip>
185        </target>
186
187        <target name="tar">
188                <tar destfile="${product.name}-${product.version}.tar.bz2" compress="bzip2">
189                        <zipfileset dir="${dist.dir}" prefix="${product.name}-${product.version}"/>
190                </tar>
191        </target>
192
193        <target name="clean" depends="multiproject"
194                description="Lifecycle target: calls 'clean' on all components">
195                <delete dir="${dist.dir}"/>
196                <iterate target="clean"/>
197        </target>
198
199        <target name="withtools"
200                description="Calls build and dist on the tools component, copying over dist/">
201                <antRun component="tools">
202                        <target name="build"/>
203                        <target name="dist"/>
204                </antRun>
205        </target>
206
207        <target name="cleantools"
208                description="Calls cleans on the tools component and removes tools/target">
209                <antRun component="tools">
210                        <target name="clean"/>
211                </antRun>
212        </target>
213
214</project>
Note: See TracBrowser for help on using the browser.

Download in other formats:

  • Plain Text
  • Original Format

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/