Ant Data System Module

Typical operations

Execute tasks files without communication to other modules

For execute some ant tasks like generate file

Execute tasks with inherit properties from root modules structure

ant built file specification

parent module important properties

WPS_Functions

There should be installed modules
 <property name="WPS_Functions" location="${basedir}/WPS_Functions"/>

build_WPS_Functions.xml

ant build.xml for parent module
<property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/>

build_WPS_Functions.xml.properties

saved property file with properties do be read by another modules with inherit them
<property name="build_WPS_Functions.xml.properties" location="${build_WPS_Functions.xml}.properties"/>

new module name

Every module should have name - typical name we use is this documentation is my_new_module

my_new_module

This is the new module name we want to create which is documented there

name of buildfile

The build file should contains new module name and should be named: build_my_new_module.xml.
Note: Like in this example
<project 
xmlns:get_wfs_recurse_xsl="http://procesy5.pl/get_wfs_recurse_xsl"
basedir="../../." name="get_wfs_recurse_xsl"  default="get_wfs_recurse_xsl:xml_recursed_from_tr_map">

Project Root element

Project Root namespaces

my_new_module should have own namespace, for example could have xmlns:my_new_module="http://mydomain.com/my_new_module".
Note: Look for this example
<project 
xmlns:get_wfs_recurse_xsl="http://procesy5.pl/get_wfs_recurse_xsl"
basedir="../../." name="get_wfs_recurse_xsl"  default="get_wfs_recurse_xsl:xml_recursed_from_tr_map" >

Project Root attributes

@basedir
Should be pointing to parent module @basedir, so when installed to install directory, the @basedir should be ../../.
example project root element for "my_new_module"
<project 
xmlns:my_new_module="http://mydomain.com/my_new_module"
basedir="../../." name="my_new_module"  default="my_new_module:my_new_module" >

Project Root Elements

Project default properties
default properties example
<property name="WPS_Functions" location="${basedir}/WPS_Functions"/>
<property name="build_WPS_Functions.xml" location="${WPS_Functions}/build_WPS_Functions.xml"/> <!-- call it to get properties -->
<property name="build_WPS_Functions.xml.properties" location="${build_WPS_Functions.xml}.properties"/> 
Project local properties
build_my_new_module.basedir.temp
This is directory with temp files
local properties example
<property name="build_my_new_module" value="${WPS_Functions}/my_new_module/build_my_new_module.xml"/>
<property name="build_my_new_module.basedir" location="${basedir}/WPS_Functions/my_new_module"  />
<property name="build_my_new_module.basedir.temp" location="${build_my_new_module}/temp"  />
<property name="build_my_new_module.childproperties" location="${WPS_Functions.childproperties}/.my_new_module.properties"/>
Project input/output properites
Project input/output file properites
Are intended to parse input/output from one module to another.
Note: Files should be created in build_my_new_module.basedir.temp
output
When you want to generate some output from another module (example) build_my_new_module.basedir.temp/some_other_module.output.xml.
Note: Example to get output from ahother module
<ant antfile="${some_other_module}" target="some_other_module_task.output"
    <property name="output" value="${build_my_new_module.basedir.temp}/some_other_module.output.xml"/>
>
Modules should have not set output property because it cannot be overwriten.
Note: module should have special task for parse output property from another call like that:
 <target  name="some_other_module.output">
        <input addproperty="input" defaultvalue="${build_some_other_module.basedir.temp}/${uuid}.input.xml"/> 
        <input addproperty="output" defaultvalue="${build_some_other_module.basedir.temp}/${uuid}.output.xml"/> 
Properties
property name="uuid"
<property name="uuid" value="${uuid}"/> this contains UUID Unique System Call ID

Project Default Tasks

read_build_properties
Should run creation of parent module properties and load them
Note: example
<target name="read_build_properties">
        <ant antfile="${build_WPS_Functions.xml}" target="save_build_properties"/>
        <loadproperties srcfile="${build_WPS_Functions.xml.properties}"/>
        <echo>We try to refresh ${default_db.xml} or ${detect_objects_parent_relations.xsl}</echo>
 </target>