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

Context Navigation

  • Last Change
  • Annotate
  • Revision Log

root/tags/OMERO.insight_3_Beta1/build/app.xml

Revision 4729, 7.2 kB (checked in by jburel, 23 months ago)

replaced OMEROClient by OMERO.insight

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 * Child build file to compile and run the application.
5 * This file is only meant to be used as an imported file within the Shoola
6 * master build file.
7~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
8<project name="app" default="usage">
9 
10  <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11   * Fail at import time if the external properties this child depends upon
12   * have not been defined.
13  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
14  <checkdef prop="build.dir"/> 
15  <checkdef prop="base.lib.dir"/>
16  <checkdef prop="base.src.dir"/>
17  <checkdef prop="base.config.dir"/>
18 
19  <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20   * Settings to compile and run the app:
21   *   + app.dir: The destination dir where we compile and run the app.
22   *   + app.compiled.dir: The sub-dir of app.dir in which we store all the
23   *           compiled classes and resources.
24   *   + app.config.dir: The sub-dir of app.dir in which we store all the
25   *           configuration files required for the app to run.
26   *   + app.lib.dir: The sub-dir of app.dir in which we store all the library
27   *           files required for the app to compile and run.
28   *   + app.sources: All java files to compile.  Currently these are all the
29   *           .java files within ${base.src.dir} with the exception of the
30   *           spot package if Java 3D is not available to the current JVM.
31   *   + app.libs: All libraries required by the app.  Currently all jar files
32   *           within ${base.lib.dir}.  Note that jar files in sub-dirs are not
33   *           included.
34   *   + app.resources: All other resources needed by the app.  We consider a
35   *           resource any non-java file in ${base.src.dir}.  Obviously CVS
36   *           dirs and files are excluded.
37   *   + app.config: All the configuration files required for the app to run.
38   *           These are the contents of ${base.config.dir}.  Obviously CVS
39   *           dirs and files are excluded.
40   *   + app.compile.classpath: The classpath used to compile the app.  Set to
41   *           include all required libraries.
42   *   + app.run.classpath: The classpath used to run the app.  Set to include
43   *           all required libraries as well as all compiled classes.
44   *   + app.mainclass: The fqn for the app entry point.
45  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> 
46  <property name="app.dir" location="${build.dir}/app"/>
47  <property name="app.compiled.dir" location="${app.dir}/compiled"/> 
48  <property name="app.config.dir" location="${app.dir}/config"/> 
49  <property name="app.lib.dir" location="${app.dir}/lib"/> 
50  <available classname="javax.media.j3d.SceneGraphObject" property="app.j3d"/> 
51  <patternset id="app.sources">
52    <include name="**/*.java"/>
53    <exclude name="**/roi**/*.java"/>
54  </patternset>
55  <fileset id="app.libs" dir="${base.lib.dir}" includes="*.jar"/>
56  <fileset id="app.resources" dir="${base.src.dir}" excludes="**/*.java"/>
57  <fileset id="app.config" dir="${base.config.dir}"/> 
58  <path id="app.compile.classpath">
59    <fileset dir="${app.lib.dir}" includes="*.jar"/> 
60  </path> 
61  <path id="app.run.classpath">
62    <path refid="app.compile.classpath"/>
63    <pathelement location="${app.compiled.dir}"/>
64  </path>
65  <property name="app.mainclass" value="org.openmicroscopy.shoola.Main"/>
66 
67
68 
69 
70  <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
71   * Create and set up ${app.dir}.
72   * The application root dir and its sub-dirs are created and then all files
73   * needed to compile and run the app are copied over from the original dirs.
74  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
75  <target name="app-init" depends="init">
76    <mkdir dir="${app.dir}"/>
77    <mkdir dir="${app.compiled.dir}"/>
78    <mkdir dir="${app.config.dir}"/>
79    <mkdir dir="${app.lib.dir}"/> 
80    <copy todir="${app.compiled.dir}">
81      <fileset refid="app.resources"/>
82    </copy> 
83    <copy todir="${app.config.dir}">
84      <fileset refid="app.config"/>
85    </copy> 
86    <copy todir="${app.lib.dir}">
87      <fileset refid="app.libs"/>
88    </copy> 
89  </target>
90 
91  <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92   * Compile the app sources into ${app.compiled.dir}.
93   * The app sources is the set of all files within ${base.src.dir} matching
94   * app.sources pattern.  The classpath is set to ${app.compile.classpath}.
95  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> 
96  <target name="compile" 
97          depends="app-init" 
98          description="Compile the whole app.">
99    <javac srcdir="${base.src.dir}"
100           destdir="${app.compiled.dir}"
101           includeantruntime="no" 
102           deprecation="yes"
103           debug="yes"
104           debuglevel="lines,vars,source">
105      <classpath refid="app.compile.classpath"/>
106      <patternset refid="app.sources"/>
107    </javac> 
108  </target> 
109 
110  <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111   * Run the app in its own JVM.
112   * The location of the home directory is passed to the app via the command
113   * line.  The JVM minumum memory size is set to 256M and the maximum to
114   * 512M.  Note that JVM memory size is specified via -X options, which make
115   * it (in theory) non-portable.
116  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> 
117  <target name="run"
118          depends="compile" 
119          description="Run the app in its own JVM."> 
120    <echo message="Launching OMERO.insight ..."/>
121    <java classname="${app.mainclass}"
122          classpathref="app.run.classpath" 
123          fork="yes"
124          failonerror="yes">
125      <jvmarg line="-Xms256M -Xmx512M"/> 
126      <arg value="${app.dir}"/> 
127    </java> 
128  </target>
129 
130  <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131   * Remove all output generated by the targets within this file.
132   * This target simply deletes the ${app.dir}, relying on the fact that all
133   * other targets output under this dir.  As long as dir mapping props stick
134   * to this rule, new targets can be added without modifying this one.
135   * Should a target output dir need to be mapped to a dir outside of
136   * ${app.dir}, then an explicit delete has to be added here.
137  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
138  <target name="clean"
139          description="Remove all output generated by app targets.">
140    <delete dir="${app.dir}"/>
141  </target> 
142 
143  <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
144   * Outputs a list of available targets.
145   * This is the list of all public targets exported by this file.
146  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
147  <target name="usage"
148          description="List available app targets.">
149    <echo level="info">
150Application targets:
151--------------------
152  compile: Compile the app sources into ${app.compiled.dir}.
153  run: Run the app in its own JVM.
154  app.clean: Remove ${app.dir}.
155    </echo> 
156  </target> 
157
158</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/