[MOBY-guts] biomoby commit
Martin Senger
senger at pub.open-bio.org
Fri Aug 26 06:27:02 UTC 2005
senger
Fri Aug 26 02:27:02 EDT 2005
Update of /home/repository/moby/moby-live/Java
In directory pub.open-bio.org:/tmp/cvs-serv2547
Modified Files:
build.properties.template build.xml
Log Message:
moby-live/Java build.properties.template,1.3,1.4 build.xml,1.18,1.19
===================================================================
RCS file: /home/repository/moby/moby-live/Java/build.properties.template,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- /home/repository/moby/moby-live/Java/build.properties.template 2004/10/18 14:35:05 1.3
+++ /home/repository/moby/moby-live/Java/build.properties.template 2005/08/26 06:27:02 1.4
@@ -30,3 +30,9 @@
servlet.url.graphs = /graphs/*
registry.cache.dir = /tmp/mobycache
+
+#moses.filter.dt
+#moses.service = runFasta
+#moses.quiet = yes
+#moses.nographs = yes
+
===================================================================
RCS file: /home/repository/moby/moby-live/Java/build.xml,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- /home/repository/moby/moby-live/Java/build.xml 2005/08/07 23:41:40 1.18
+++ /home/repository/moby/moby-live/Java/build.xml 2005/08/26 06:27:02 1.19
@@ -9,6 +9,11 @@
<project name="jMoby: BioMoby in Java" default="compile" basedir=".">
+ <!-- ================================================================== -->
+ <!-- Contributed tasks -->
+ <!-- ================================================================== -->
+ <taskdef resource="net/sf/antcontrib/antlib.xml"/>
+
<!-- ================================================================== -->
<!-- Properties -->
<!-- ================================================================== -->
@@ -22,34 +27,34 @@
<property file="${user.home}/build.properties"/>
<!-- The directories containing sources and supporting files -->
- <property name="src.root" value="src"/>
- <property name="src.main" value="${src.root}/main"/>
- <property name="src.clients" value="${src.root}/Clients"/>
- <property name="src.services" value="${src.root}/Services"/>
- <property name="src.webapps" value="${src.root}/webapps"/>
- <property name="src.support" value="${src.root}/support"/>
- <property name="src.config" value="${src.root}/config"/>
+ <property name="src.root" value="${project.home}/src"/>
+ <property name="src.main" value="${src.root}/main"/>
+ <property name="src.clients" value="${src.root}/Clients"/>
+ <property name="src.webapps" value="${src.root}/webapps"/>
+ <property name="src.support" value="${src.root}/support"/>
+ <property name="src.config" value="${src.root}/config"/>
+ <property name="src.templates" value="${src.config}/templates"/>
<!-- Properties for the documentation and distribution -->
- <property name="docs.dir" value="docs"/>
+ <property name="docs.dir" value="${project.home}/docs"/>
<property name="javadoc.dir" value="${docs.dir}/API"/>
<property name="dist.dir" value="${docs.dir}/dist"/>
<!-- The directory containing third-party libraries -->
<!-- Note: this directory can be populated from remote sites -->
<!-- using target 'gather', e.g. ./build.sh gather -->
- <property name="lib.dir" value="lib"/>
+ <property name="lib.dir" value="${project.home}/lib"/>
<!-- Temporary build directories -->
- <property name="build.dir" value="build"/>
- <property name="build.classes" value="${build.dir}/classes"/>
- <property name="build.lib" value="${build.dir}/lib"/>
- <property name="build.clients" value="${build.dir}/Clients"/>
- <property name="build.services" value="${build.dir}/Services"/>
- <property name="build.rdfagent" value="${build.dir}/rdfagent"/>
- <property name="build.dist" value="${build.dir}/dist"/>
- <property name="build.webapps" value="${build.dir}/webapps/jmoby"/>
- <property name="build.run" value="${build.dir}/run"/>
+ <property name="build.dir" value="build"/>
+ <property name="build.classes" value="${build.dir}/classes"/>
+ <property name="build.lib" value="${build.dir}/lib"/>
+ <property name="build.clients" value="${build.dir}/Clients"/>
+ <property name="build.rdfagent" value="${build.dir}/rdfagent"/>
+ <property name="build.dist" value="${build.dir}/dist"/>
+ <property name="build.webapps" value="${build.dir}/webapps/jmoby"/>
+ <property name="build.run" value="${build.dir}/run"/>
+ <property name="build.others" value="${build.dir}/others"/>
<!-- Tomcat/Axis/servlets related properties -->
<!-- (note that the Tomcat real path is defined inside the 'init' target -->
@@ -58,21 +63,40 @@
<property name="tomcat.host" value="localhost"/>
<property name="tomcat.webapps" value="webapps"/>
<property name="axis.relative.path" value="axis"/>
- <property name="axis.apath" value="${axis.relative.path}/servlet/AxisServlet"/>
+ <property name="axis.admin.url" value="${axis.relative.path}/servlet/AxisServlet"/>
<property name="servlets.relative.path" value="."/>
+ <!-- A directories containing classes from generated code -->
+ <property name="classes.datatypes" location="${build.others}/datatypes"/>
+ <property name="classes.skeletons" location="${build.others}/skeletons"/>
+
+ <!-- A directories containing classes from samples -->
+ <property name="classes.samples" location="${build.others}/samples"/>
+
<!-- Classpath -->
<path id="build.classpath">
<pathelement location="${build.classes}"/>
<pathelement location="${build.clients}"/>
- <pathelement location="${build.services}"/>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
+
+ <!-- Additional classpath (includes classes of generated sources) -->
+ <path id="moses.build.classpath">
+ <path refid="build.classpath"/>
+ <pathelement location="${classes.datatypes}"/>
+ <pathelement location="${classes.skeletons}"/>
+ </path>
+
+ <!-- Additional classpath (includes classes of samples) -->
+ <path id="samples.build.classpath">
+ <path refid="moses.build.classpath"/>
+ <pathelement location="${classes.samples}"/>
+ </path>
<!-- Excludes for compilation -->
- <property name="project.excludes" value="**/notyet/*"/>
+ <property name="project.excludes" value="**/notyet/**"/>
<!-- Excludes for compilation under JDK older than 1.5 -->
<property
@@ -100,10 +124,9 @@
<mkdir dir="${build.classes}"/>
<mkdir dir="${build.lib}"/>
<mkdir dir="${build.clients}"/>
- <mkdir dir="${build.clients}/help"/>
- <mkdir dir="${build.services}"/>
<mkdir dir="${build.rdfagent}"/>
<mkdir dir="${build.run}"/>
+ <mkdir dir="${build.others}"/>
<!-- Conditions -->
<condition property="web.xml.present">
@@ -195,38 +218,39 @@
<!-- ================================================================== -->
<target name="compile" depends="compile-normal,compile-latest"
description="Compile all source code (default).">
- <copy todir="${build.clients}/help">
- <fileset dir="${src.clients}/help"/>
- </copy>
- </target>
+ <copy todir="${build.clients}/help">
+ <fileset dir="${src.clients}/help"/>
+ </copy>
+ <copy todir="${build.classes}/templates">
+ <fileset dir="${src.templates}"/>
+ </copy>
+ </target>
- <target name="compile-normal" depends="init,config">
- <fail unless="libs.present">
- Missing one or more third-party libraries.
- Try to run build.sh or build.bat to fetch them from the net.
- </fail>
- <javac srcdir="${src.main}"
- destdir="${build.classes}"
- debug="true"
- debuglevel="lines,vars,source"
- excludes="${project.excludes},${version.excludes}">
- <classpath refid="build.classpath"/>
- </javac>
- <javac srcdir="${src.clients}"
- destdir="${build.clients}"
-debug="yes"
- excludes="${project.excludes}">
- <classpath refid="build.classpath"/>
- </javac>
- <javac srcdir="${src.services}"
- destdir="${build.services}"
- excludes="${project.excludes}">
- <classpath refid="build.classpath"/>
- </javac>
- </target>
+ <target name="compile-normal" depends="init,config">
+ <fail unless="libs.present">
+ Missing one or more third-party libraries.
+ Try to run build.sh or build.bat to fetch them from the net.
+ </fail>
+ <javac srcdir="${src.main}"
+ destdir="${build.classes}"
+ debug="true"
+ debuglevel="lines,vars,source"
+ excludes="${project.excludes},${version.excludes}">
+ <classpath refid="build.classpath"/>
+ </javac>
+ <javac srcdir="${src.clients}"
+ destdir="${build.clients}"
+ debug="true"
+ debuglevel="lines,vars,source"
+ excludes="${project.excludes}">
+ <classpath refid="build.classpath"/>
+ </javac>
+ </target>
<target name="compile-latest" depends="compile-normal" if="real.java.version.latest">
<javac srcdir="${src.main}"
+ debug="true"
+ debuglevel="lines,vars,source"
destdir="${build.classes}"
includes="${version.excludes}">
<classpath refid="build.classpath"/>
@@ -258,8 +282,9 @@
description="Generate API documentation.">
<javadoc
+ additionalparam="-quiet"
packagenames="*.*"
- excludepackagenames="org.biomoby.service.generated,org.biomoby.service.notyet,notyet"
+ excludepackagenames="notyet"
destdir="${javadoc.dir}"
classpathref="build.classpath"
defaultexcludes="yes"
@@ -275,40 +300,24 @@
<sourcepath>
<pathelement location="${src.main}"/>
<pathelement location="${src.clients}"/>
- <pathelement location="${src.services}"/>
</sourcepath>
- <!-- excluded files -->
- <!-- This does not work...
- <fileset dir="${src.services}" defaultexcludes="yes">
- <include name="**/*.java"/>
- <exclude name="org/biomoby/service/generated/*,org/biomoby/service/Echo*"/>
- </fileset>
- <fileset dir="${src.clients}" defaultexcludes="yes">
- <include name="**/*.java"/>
- <exclude name="Echo*"/>
- </fileset>
- -->
-
<header><![CDATA[<font size="-1">Generated: ${TODAY_LONG}</font>]]></header>
<bottom><![CDATA[<font size="-1">
<a href="mailto:moby-dev at biomoby.org?subject=jMoby%20API">Submit a bug or feature</a><BR>
Generated: ${TODAY_LONG}</font>]]></bottom>
<group
title="jMoby Shared Resources"
- packages="org.biomoby.shared"/>
+ packages="org.biomoby.shared,org.biomoby.shared.*"/>
<group
- title="Client components"
- packages="org.biomoby.client"/>
+ title="jMoby Client components"
+ packages="org.biomoby.client,org.biomoby.client.*"/>
<group
- title="Moby registry components"
- packages="org.biomoby.registry"/>
+ title="jMoby Registry components"
+ packages="org.biomoby.registry,org.biomoby.registry.*"/>
<group
- title="Components for service providers"
- packages="org.biomoby.service"/>
- <group
- title="General utilities for SOAP communication"
- packages="embl.ebi.soap"/>
+ title="jMoby Components for BioMoby service providers"
+ packages="org.biomoby.service,org.biomoby.service.*"/>
<!-- here add additional 'group' elements if you wish -->
<!-- (multiple packages should be separated by ":")
@@ -352,13 +361,11 @@
<jar destfile="${build.lib}/jmoby.jar">
<fileset dir="${build.classes}"/>
<fileset dir="${build.clients}"/>
- <fileset dir="${build.services}"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
</manifest>
</jar>
</target>
-
<!-- ================================================================== -->
<!-- Builds a jar file with RDFagent classes -->
@@ -502,10 +509,10 @@
</target>
<target name="tomcat-init" depends="init">
- <fail unless="real.catalina.home">
+ <fail unless="real.catalina.home">-
- Tomcat Catalina not found.
- -----------------------------------
+ Tomcat Catalina not found
+ =========================
Please set environment variable CATALINA_HOME to point to it, or
create a file 'build.properties' and put there the line:
catalina.home = <location of your CATALINA>
@@ -517,10 +524,10 @@
<condition property="tomcat.is.running">
<socket server="${tomcat.host}" port="${tomcat.port}"/>
</condition>
- <fail unless="tomcat.is.running">
+ <fail unless="tomcat.is.running">-
- Tomcat does not seem to be running.
- -----------------------------------
+ Tomcat does not seem to be running
+ ==================================
I have just checked ${tomcat.host}:${tomcat.port}...
You may perhaps consider to start it.
</fail>
@@ -628,8 +635,29 @@
</target>
+
+
+
+
+
+
+
<!-- work in progress -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
<target name="deploy-digest" depends="tomcat-populate">
<!-- deploy services (using a deployment descriptor) -->
<java classname="org.apache.axis.client.AdminClient" taskname="AdminClient"
@@ -639,14 +667,18 @@
<arg value="-p"/>
<arg value="${tomcat.port}"/>
<arg value="-s"/>
- <arg value="${axis.apath}"/>
+ <arg value="${axis.admin.url}"/>
<arg file="${src.config}/mobydigest.wsdd"/>
</java>
<echo message="Moby Services [re-]deployed, you may need to restart Tomcat"/>
</target>
- <!-- populate local Tomcat with files needed for Web Services -->
+
+
+
+ <!-- ================================================================== -->
+ <!-- populate local Tomcat with files needed for BioMoby Web Services -->
<target name="tomcat-populate" depends="tomcat-init,jar">
<property name="deploy.axis.dir"
location="${real.catalina.home}/${tomcat.webapps}/${axis.relative.path}/WEB-INF"/>
@@ -655,10 +687,561 @@
<copy todir="${deploy.axis.dir}/lib">
<fileset dir="${lib.dir}">
<include name="alltools.jar"/>
+ <include name="jdom.jar"/>
</fileset>
<fileset dir="${build.lib}" includes="*.jar"/>
</copy>
</target>
+
+ <!-- ================================================================== -->
+ <!-- Calling an Axis Admin client to do the real [un]deploying. -->
+ <!-- This target is usually called with 'antcall' getting parameter: -->
+ <!-- ${wsdd.file} ... a file with a [un]deployment descriptor -->
+ <!-- ${deploy.task.name} ... a name given to this task (optional) -->
+ <!-- (that's why it does not define any dependent targets here) -->
+ <!-- ================================================================== -->
+ <target name="-deploy">
+
+ <!-- an optional parameter: how to name this task -->
+ <condition property="deploy.task.name" value="Deploy">
+ <not><isset property="deploy.task.name"/></not>
+ </condition>
+
+ <!-- deploy (or undeploy) services (using given deployment descriptor) -->
+ <java classname="org.apache.axis.client.AdminClient" taskname="${deploy.task.name}"
+ classpathref="build.classpath" fork="true" failonerror="true">
+ <arg value="-h"/>
+ <arg value="${tomcat.host}"/>
+ <arg value="-p"/>
+ <arg value="${tomcat.port}"/>
+ <arg value="-s"/>
+ <arg value="${axis.admin.url}"/>
+ <arg file="${wsdd.file}"/>
+ </java>
+
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- This target creates a comma-delimited list of names of services, -->
+ <!-- taken from properties: service.*, and fills it in property -->
+ <!-- 'services.list' -->
+ <!-- ================================================================== -->
+ <target name="-find-services">
+ <propertyselector
+ property="services.list"
+ delimiter=","
+ match="service\..*?([^.]+)$"
+ select="\1"
+ casesensitive="false" />
+ <fail unless="services.list">-
+
+ No list of service names found.
+ ===============================
+ A list can be defined in one of the following ways:
+ a) Create a property 'services.list' containing
+ a comma-delimited list of names of services, or
+ b) For each service, create a property 'service.<service-name>
+ (replace <service-name> with a real name of service).
+ </fail>
+ <echo message="${services.list}" taskname="Services names"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <target name="deploy-services"
+ depends="tomcat-running,tomcat-populate,-find-services"
+ description="Deploy (given) BioMoby services.">
+
+ <!-- deploy each service -->
+ <!-- (note that target '-find-services' has set 'services.list' -->
+ <foreach list="${services.list}"
+ delimiter=","
+ inheritall="yes"
+ target="-deploy-a-service"
+ param="service.name" />
+
+ </target>
+
+ <!-- parameter: ${service.name} -->
+ <target name="-deploy-a-service">
+ <antcall target="-deploy">
+ <param name="wsdd.file" value="${build.dir}/wsdd/${service.name}.wsdd"/>
+ <param name="deploy.task.name" value="Deploy ${service.name}"/>
+ </antcall>
+ </target>
+
+ <!-- ================================================================== -->
+ <target name="undeploy-services" depends="tomcat-running,-find-services"
+ description="Undeploy (given) BioMoby services.">
+
+ <!-- undeploy each service -->
+ <!-- (note that target '-find-services' has set 'services.list' -->
+ <foreach list="${services.list}"
+ delimiter=","
+ inheritall="yes"
+ target="-undeploy-a-service"
+ param="service.name" />
+ </target>
+
+ <!-- parameter: ${service.name} -->
+ <target name="-undeploy-a-service">
+ <tempfile property="dd.tmp.file" />
+ <echo file="${dd.tmp.file}">
+ <undeployment xmlns="http://xml.apache.org/axis/wsdd/">
+ <service name="${service.name}"/>
+ </undeployment>
+ </echo>
+ <antcall target="-deploy">
+ <param name="wsdd.file" value="${dd.tmp.file}"/>
+ <param name="deploy.task.name" value="Undeploy ${service.name}"/>
+ </antcall>
+ <delete file="${dd.tmp.file}" quiet="true"/>
+ </target>
+
+
+ <!-- ================================================================== -->
+ <!-- -->
+ <!-- Samples, tutorials... -->
+ <!-- -->
+ <!-- ================================================================== -->
+
+ <!--
+ They are not compiled by default together with the src/main
+because they may have dependecies on the generated code - and that
+would break compilation for those who do not intend to generate or to
+have it
+
+ The sources for samples and tutorials are in 'src/samples' and
+they are compiled into 'build/others/samples'. The compilation also
+takes all files (such as property files, testing data etc.) from
+'src/samples-resources' and put them into
+'build/others/samples/resources'.
+
+ The samples-jar target packed together samples classes (from
+'build/others/samples') and their resources (from
+'build/others/samples/resources') into 'build/lib/jmoby-samples.jar'.
+
+ The samples-docs target calls javadoc on sample sources with
+destination into 'docs/APIsamples'.
+
+ The samples targets are dependent on "moses" targets
+(generators of code) because it is expected that some samples will be
+using the "moses" generated datatypes and skeletons. Through these
+"moses" targets they depend also on the main jMoby targets.
+
+ -->
+
+ <!-- A directories with samples -->
+ <property name="src.samples" location="${src.root}/samples"/>
+ <property name="samples.resources" location="${src.root}/samples-resources"/>
+
+ <!-- A directory containing API of (all) samples -->
+ <property name="samples.javadoc.dir" location="${docs.dir}/APIsamples"/>
+
+ <!-- ================================================================== -->
+ <!-- Samples: Init -->
+ <!-- ================================================================== -->
+ <target name="samples-init" depends="init">
+ <mkdir dir="${classes.samples}"/>
+ <mkdir dir="${classes.samples}/resources"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Samples: Compile samples, copy their resources -->
+ <!-- ================================================================== -->
+ <target name="samples-compile" depends="samples-init,moses-compile"
+ description="Compile samples and tutorial.">
+ <copy todir="${classes.samples}/resources">
+ <fileset dir="${samples.resources}"/>
+ </copy>
+ <javac srcdir="${src.samples}"
+ debug="true"
+ debuglevel="lines,vars,source"
+ destdir="${classes.samples}"
+ excludes="${project.excludes}">
+ <classpath refid="samples.build.classpath"/>
+ </javac>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Samples: Remove samples classes -->
+ <!-- ================================================================== -->
+ <target name="samples-clean" depends="init"
+ description="Remove classes of the samples">
+ <delete dir="${classes.samples}"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Samples: Make a jar file with samples classes and their resources -->
+ <!-- ================================================================== -->
+ <target name="samples-jar" depends="samples-compile"
+ description="Create a jar file with samples classes">
+ <jar destfile="${build.lib}/jmoby-samples.jar">
+ <fileset dir="${classes.samples}"/>
+ <manifest>
+ <attribute name="Built-By" value="${user.name}"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Samples: Generate API documentation for samples -->
+ <!-- ================================================================== -->
+ <target name="samples-cleanapi">
+ <delete quiet="true" includeEmptyDirs="true">
+ <fileset dir="${samples.javadoc.dir}"/>
+ </delete>
+ </target>
+
+ <target name="samples-docs" depends="samples-compile,samples-cleanapi"
+ description="Generate API documentation for samples.">
+ <mkdir dir="${samples.javadoc.dir}"/>
+ <javadoc
+ additionalparam="-quiet"
+ packagenames="*.*"
+ destdir="${samples.javadoc.dir}"
+ classpathref="samples.build.classpath"
+ defaultexcludes="yes"
+ breakiterator="yes"
+ windowtitle="jMoby - Samples and Tutorials"
+ doctitle="jMoby - Samples and Tutorials"
+ author="true"
+ version="true"
+ use="true"
+ public="true">
+
+ <!-- this does not work well; because it calls file:// from http:// ... security problem -->
+ <!-- one can still use the generated API if you type in your browser -->
+ <!-- direct local path instead of http://... -->
+ <link href="docs/API" resolveLink="yes">
+ </link>
+
+ <!-- included files -->
+ <sourcepath>
+ <pathelement location="${src.samples}"/>
+ </sourcepath>
+
+ <!-- decorations -->
+ <header><![CDATA[<font size="-1">Generated: ${TODAY_LONG}</font>]]></header>
+ <bottom><![CDATA[<font size="-1">
+ <a href="mailto:moby-dev at biomoby.org?subject=samples%20API">Submit a bug or feature</a><BR>
+ Generated: ${TODAY_LONG}</font>]]></bottom>
+ </javadoc>
+ </target>
+
+
+ <!-- ================================================================== -->
+ <!-- -->
+ <!-- Moses generators... -->
+ <!-- -->
+ <!-- ================================================================== -->
+
+ <!--
+ Moses generators are not compiled by default together with the
+src/main because they depend on the generated code - and that would
+break compilation for those who do not intend to generate or to have
+it.
+ The sources for Moses generators are in 'generated/datatypes'
+and 'generated/skeletons', and they are compiled into
+'build/others/datatypes' and 'build/others/skeletons'. The compilation
+also copies necessary templates from 'src/config/templates' and put
+them into 'build/classes/templates'.
+
+ Some targets are specific to datatype generator:
+
+ generate-datatypes generate-services
+ clean-datatypes clean-services
+ jar-datatypes jar-services
+ moses-datatypes moses-services
+
+ Other targets deals with both these generators:
+
+ moses-init
+ moses-compile
+ moses-docs
+
+ The jar targets packed separately datatypes and services into
+'build/lib' under names 'bimoby-datatypes.jar' and
+'biomoby-skeletons'.
+
+ The moses-docs target calls javadoc on all generated sources
+with destination in 'docs/APIservices'.
+
+ Be aware that some generator targets need network because they
+go first to the Biomoby registry.
+
+ -->
+
+ <!-- A directories containing generated code -->
+ <property name="dir.generated" location="${project.home}/generated"/>
+ <property name="src.datatypes" location="${dir.generated}/datatypes"/>
+ <property name="src.skeletons" location="${dir.generated}/skeletons"/>
+
+ <!-- A directory containing API of (all) generated code -->
+ <property name="moses.javadoc.dir" location="${docs.dir}/APIservices"/>
+
+
+ <!-- ================================================================== -->
+ <!-- Moses datatypes: do everything -->
+ <!-- ================================================================== -->
+ <target name="moses-datatypes"
+ depends="generate-datatypes,moses-compile,jar-datatypes,moses-docs"
+ description="Do everything for Biomoby data types (needs registry)">
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses datatypes: Generate them -->
+ <!-- ================================================================== -->
+ <target name="generate-datatypes" depends="moses-init"
+ description="Generate sources of Biomoby data types (needs registry)">
+
+ <condition property="moses.filter.dt" value="">
+ <not><isset property="moses.filter.dt"/></not>
+ </condition>
+
+ <condition property="moses.quiet" value="no"><not><isset property="moses.quiet"/></not></condition>
+ <condition property="real.moses.quiet" value="-q"><istrue value="${moses.quiet}"/></condition>
+
+ <condition property="moses.nogener" value="no"><not><isset property="moses.nogener"/></not></condition>
+ <condition property="real.moses.nogener" value="-n"><istrue value="${moses.nogener}"/></condition>
+
+ <condition property="moses.nographs" value="no"><not><isset property="moses.nographs"/></not></condition>
+ <condition property="real.moses.nographs" value="-ng"><istrue value="${moses.nographs}"/></condition>
+
+ <java classname="MosesGenerators" taskname="Data Types"
+ classpathref="build.classpath" fork="true" failonerror="true">
+ <arg value="-dt"/>
+ <arg value="-cacheDir"/>
+ <arg file="${registry.cache.dir}"/>
+ <arg value="-filter"/>
+ <arg value="${moses.filter.dt}"/>
+ <arg value="-outdir"/>
+ <arg file="${src.datatypes}"/>
+ <arg value="${real.moses.quiet}"/>
+ <arg value="${real.moses.nographs}"/>
+ <arg value="${real.moses.nogener}"/>
+ <arg value="-e"/>
+ <arg value="${default.endpoint}"/>
+ <arg value="-uri"/>
+ <arg value="${default.namespace}"/>
+ </java>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses datatypes: Remove generated code -->
+ <!-- ================================================================== -->
+ <target name="clean-datatypes" depends="init"
+ description="Remove generated sources of Biomoby data types">
+ <!-- delete all subdirs but not the ${src.datatypes} itself -->
+ <delete includeemptydirs="true" quiet="true">
+ <fileset dir="${src.datatypes}" includes="**/*"/>
+ </delete>
+ <delete includeemptydirs="true" quiet="true">
+ <fileset dir="${classes.datatypes}" includes="**/*"/>
+ </delete>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses datatypes: Make a jar with generated and compiled data types -->
+ <!-- ================================================================== -->
+ <target name="jar-datatypes" depends="moses-compile"
+ description="Generate jar file with generated data types">
+ <jar destfile="${build.lib}/bimoby-datatypes.jar">
+ <fileset dir="${classes.datatypes}"/>
+ <manifest>
+ <attribute name="Built-By" value="${user.name}"/>
+ </manifest>
+ </jar>
+ </target>
+
+
+ <!-- ================================================================== -->
+ <!-- Moses service skeletons: Remove generated code -->
+ <!-- ================================================================== -->
+ <target name="clean-services" depends="init"
+ description="Remove generated sources of Biomoby services">
+ <!-- delete all subdirs but not the ${src.skeletons} itself -->
+ <delete includeemptydirs="true" quiet="true">
+ <fileset dir="${src.skeletons}" includes="**/*"/>
+ </delete>
+ <delete includeemptydirs="true">
+ <fileset dir="${classes.skeletons}" includes="**/*"/>
+ </delete>
+ </target>
+
+ <target name="generate-services" depends="moses-init,service-check"
+ description="Generate sources of Biomoby service(s) (needs registry)">
+
+ <condition property="moses.service" value="">
+ <not><isset property="moses.service"/></not>
+ </condition>
+ <condition property="moses.authority" value="">
+ <not><isset property="moses.authority"/></not>
+ </condition>
+
+ <condition property="moses.quiet" value="no"><not><isset property="moses.quiet"/></not></condition>
+ <condition property="real.moses.quiet" value="-q"><istrue value="${moses.quiet}"/></condition>
+
+ <condition property="moses.nogener" value="no"><not><isset property="moses.nogener"/></not></condition>
+ <condition property="real.moses.nogener" value="-n"><istrue value="${moses.nogener}"/></condition>
+
+ <condition property="moses.nographs" value="no"><not><isset property="moses.nographs"/></not></condition>
+ <condition property="real.moses.nographs" value="-ng"><istrue value="${moses.nographs}"/></condition>
+
+ <java classname="MosesGenerators" taskname="Service(s)"
+ classpathref="moses.build.classpath" fork="true" failonerror="true">
+ <arg value="-s"/>
+ <arg value="-cacheDir"/>
+ <arg file="${registry.cache.dir}"/>
+ <arg value="-service"/>
+ <arg value="${moses.service}"/> <!-- TBD -->
+ <arg value="-auth"/>
+ <arg value="${moses.authority}"/> <!-- TBD -->
+ <arg value="-outdir"/>
+ <arg file="${src.skeletons}"/>
+ <arg value="${real.moses.quiet}"/>
+ <arg value="${real.moses.nographs}"/>
+ <arg value="${real.moses.nogener}"/>
+ <arg value="-e"/>
+ <arg value="${default.endpoint}"/>
+ <arg value="-uri"/>
+ <arg value="${default.namespace}"/>
+ </java>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses service skeletons: Make a jar with skeletons classes -->
+ <!-- ================================================================== -->
+ <target name="jar-services" depends="moses-compile"
+ description="Jar files with generated services.">
+ <jar destfile="${build.lib}/bimoby-skeletons.jar">
+ <fileset dir="${classes.skeletons}"/>
+ <manifest>
+ <attribute name="Built-By" value="${user.name}"/>
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses service skeletons: Check how many service to generate -->
+ <!-- ================================================================== -->
+ <target name="service-check" unless="moses.service">
+ <input validargs="y,n" addproperty="do.services">
+ Property 'moses.service' is not set.
+ This means that skeletons for ALL services will be generated.
+ If this is what you want, press 'y'. Continue? </input>
+ <condition property="do.abort">
+ <equals arg1="n" arg2="${do.services}"/>
+ </condition>
+ <fail if="do.abort">Build aborted by user.</fail>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses service skeletons: do everything -->
+ <!-- ================================================================== -->
+ <target name="moses-services"
+ depends="generate-services,moses-compile,jar-services,moses-docs"
+ description="Do everything for Biomoby services (needs registry)">
+ </target>
+
+
+ <!-- ================================================================== -->
+ <!-- Moses generally: Init -->
+ <!-- ================================================================== -->
+ <target name="moses-init" depends="init">
+ <copy todir="${build.classes}/templates">
+ <fileset dir="${src.templates}"/>
+ </copy>
+ <mkdir dir="${classes.datatypes}"/>
+ <mkdir dir="${classes.skeletons}"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses generally: Compile generated datatypes and skeletons -->
+ <!-- ================================================================== -->
+ <target name="moses-compile" depends="moses-init,compile"
+ description="Compile all generated sources.">
+ <javac srcdir="${src.datatypes}"
+ destdir="${classes.datatypes}"
+ debug="true"
+ debuglevel="lines,vars,source"
+ excludes="${project.excludes}">
+ <classpath refid="moses.build.classpath"/>
+ </javac>
+ <javac srcdir="${src.skeletons}"
+ debug="true"
+ debuglevel="lines,vars,source"
+ destdir="${classes.skeletons}"
+ excludes="${project.excludes}">
+ <classpath refid="moses.build.classpath"/>
+ </javac>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses generally: Remove classes of datatypes and skeletons -->
+ <!-- ================================================================== -->
+ <target name="moses-clean" depends="init"
+ description="Remove classes of generated sources.">
+ <delete dir="${classes.datatypes}"/>
+ <delete dir="${classes.skeletons}"/>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Moses generally: Generate API for datatypes and skeletons -->
+ <!-- ================================================================== -->
+ <target name="moses-cleanapi">
+ <delete quiet="true" includeEmptyDirs="true">
+ <fileset dir="${moses.javadoc.dir}"/>
+ </delete>
+ </target>
+
+ <target name="moses-docs" depends="moses-compile,moses-cleanapi,docs"
+ description="API documentation for all generated sources.">
+ <javadoc
+ additionalparam="-quiet"
+ packagenames="*.*"
+ destdir="${moses.javadoc.dir}"
+ classpathref="moses.build.classpath"
+ defaultexcludes="yes"
+ breakiterator="yes"
+ windowtitle="jMoby - MoSeS"
+ doctitle="MoSeS - Moby Services Support"
+ author="true"
+ version="true"
+ use="true"
+ public="true">
+
+ <!-- this does not work well; because it calls file:// from http:// ... security problem -->
+ <!-- one can still use the generated API if you type in your browser -->
+ <!-- direct local path instead of http://... -->
+ <link href="docs/API" resolveLink="yes">
+ </link>
+
+ <!-- included files -->
+ <sourcepath>
+ <pathelement location="${src.datatypes}"/>
+ <pathelement location="${src.skeletons}"/>
+ </sourcepath>
+
+ <!-- decorations -->
+ <header><![CDATA[<font size="-1">Generated: ${TODAY_LONG}</font>]]></header>
+ <bottom><![CDATA[<font size="-1">
+ <a href="mailto:moby-dev at biomoby.org?subject=Moses%20API">Submit a bug or feature</a><BR>
+ Generated: ${TODAY_LONG}</font>]]></bottom>
+ <group
+ title="Biomoby data types"
+ packages="org.biomoby.shared.datatypes"/>
+ </javadoc>
+ </target>
+
+ <!-- ================================================================== -->
+ <!-- Undocumented... -->
+ <!-- ================================================================== -->
+ <target name="kompile" depends="samples-compile">
+ </target>
+
+ <target name="klean" depends="samples-clean,moses-clean,clean">
+ </target>
+
</project>
More information about the MOBY-guts
mailing list