This commit is contained in:
Manuele Simi 2008-04-15 16:55:57 +00:00
parent 3ecb26f1d7
commit e7999e0104
1 changed files with 458 additions and 471 deletions

435
build.xml
View File

@ -5,32 +5,35 @@ Version 0.5
REQUIRED INPUT PROPERTIES
This buildfile assumes that the following properties have been defined in a "build.properties" file
This buildfile assumes that the following properties have or may have been defined in a "build.properties" file
in the configuration directory of the service (or else using the -D flag on the command line).
package: Root package of the service implementation: it should be the first package in the
package: (mandatory) Root package of the service implementation: it should be the first package in the
implementation hierarchy which uniquely identifies the implementation.
lib.dir: Root directory where auxiliary jar files are located. Ideally outside ${base.dir} as not needed for remote build and dynamic deployment.
wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the "name" attributed of the
lib.dir: (mandatory) Root directory where auxiliary jar files are located. Ideally outside ${base.dir} as not needed for remote build and dynamic deployment.
wsdl.<n>: (mandatory) Name of the <n>-th port-type of the service, as defined in the "name" attributed of the
"definitions" root element of the corresponding WSDL file.
The order imposed over port-type serves only to distinguish build properties and
and has no particular semantics otherwise.
This script supports by default up to 6 wsdls (wsdl.1, wsdl.2, wsdl.3,...).
Further wsdls require a simple script extension (see guidelines at end of script).
<wsdl>.<n>.namespace: Namespace of the <n>-th port-type of the service, as defined in the "targetNamespace" attribute
of the "definitions" root element of the corresponding WSDL file.
The order imposed over port-type serves only to distinguish build properties and
and has no particular semantics otherwise.
namespace.<n>: (mandatory) The <n>-th target namespace of a port-type WSSDL or of auxiliary XSD definition. Again, the over imposed over namespaces
serves only to distinguish build properties and has no particular semantics otherwise.
package.<n>: (optional) The package name of the stubs generated from WSDL and/or XSD elements in the <n>-th target namespace. If it is specified, it is
considered to be relative to ${package}.stubs. If it is omitted, WSLD and XSD elements are placed in $package}.stubs.
etics.build: (optional) Set to 'true', it indicates that build structures and procedures
should be optimised for remote builds in ETICS. If it is omitted, this buildfile will optimise build structures and procedures
for local builds.
-->
<project default="service" name="GCUBE Service Buildfile">
<project default="deployService" name="GCUBE Service Buildfile">
<!-- environment -->
<property environment="env" />
<!-- external environment -->
<echo message="container.dir ->${env.GLOBUS_LOCATION}" level="info"/>
<property name="container.dir" value="${env.GLOBUS_LOCATION}" />
<property name="container.schema.dir" location="${container.dir}/share/schema" />
<property name="build.packages" location="${container.dir}/share/gcore_tools/build-packages.xml" />
@ -44,21 +47,16 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
</taskdef>
<!-- discriminate between local and remote build -->
<var name="etics.build" value="${env.ETICSBUILD}" />
<if name="etics.build" value="true">
<else>
<var name="etics.build" value="false"/>
</else>
</if>
<property name="etics.build" value="false" />
<!-- service-specific locations -->
<property name="build.location" location="${env.BUILD_LOCATION}" />
<property name="service.dir" location="." />
<property name="schema.dir.name" value="schema" />
<property name="schema.dir" location="${service.dir}/${schema.dir.name}"/>
<property name="etc.dir.name" value="etc" />
<property name="etc.dir" value="${service.dir}/${etc.dir.name}" />
<property name="source.dir" value="${service.dir}/src" />
<!-- load input properties -->
<property file="${etc.dir}/build.properties" />
@ -67,19 +65,31 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
<replace regex="\." replacement="/"/>
</stringutil>
<property name="lib.location" value="${build.location}/${lib.dir}" />
<property name="stubs.dir.name" value="stubs" /> <!-- auxiliary stub classes -->
<property name="stubs.dir" value="${service.dir}/${package.dir}/${stubs.dir.name}" />
<available file="${stubs.dir}" property="stubs.dir.present"/>
<!-- file defaults -->
<property name="garname" value="${package}"/>
<property name="garfile" value="${garname}.gar"/>
<property name="jarfile" value="${package}.jar" />
<property name="jarfile.stubs" value="${package}.stubs.jar" />
<if name="etics.build" value="true">
<property name="build.location" location="${service.dir}" />
<property name="lib.location" value="${build.location}/lib" />
<property name="gar.location" value="${lib.location}"/>
<else>
<property name="build.location" location="${env.BUILD_LOCATION}" />
<property name="lib.location" value="${build.location}/${lib.dir}" />
<property name="gar.location" value="${build.location}"/>
</else>
</if>
<property name="stubs.package" value="${package}.${stubs.dir.name}"/>
<property name="stubs.dir.name" value="stubs" /> <!-- auxiliary stub classes -->
<property name="stubs.dir" value="${source.dir}/${package.dir}${stubs.dir.name}" />
<available file="${stubs.dir}" property="stubs.dir.present"/>
<!-- temporary build locations -->
<property name="build.dir" location="${service.dir}/../build" />
<property name="build.dir" location="${build.location}/build" />
<property name="build.class.dir" location="${build.dir}/classes" />
<property name="build.lib.dir" location="${build.dir}/lib" />
<property name="build.schema.dir" location="${build.dir}/schema" />
@ -102,15 +112,9 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
<fileset dir="${etc.dir}" id="garetc" />
<property name="garetc.id" value="garetc" />
<!-- startup tasks -->
<target name="stubs" depends="clean,deployStubs" description="generates, builds, jars and deploy stubs">
</target>
<target name="service" depends="cleanService,garService" description="generates, builds, and gars service">
</target>
<!-- initialisation tasks -->
<target name="init" description="creates build structures">
<target name="init" depends="clean" description="creates build structures">
<!-- input summary -->
<echo message="Root Package -> ${package}" level="info"/>
@ -124,6 +128,9 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
<echo message="Service Jar -> ${jarfile}" level="info"/>
<echo message="Stubs Jar -> ${jarfile.stubs}" level="info"/>
<!-- create dependency location, if it does not exist already -->
<mkdir dir="${lib.location}" />
<!-- create temporary build folders -->
<mkdir dir="${build.dir}" />
<mkdir dir="${build.class.dir}" />
@ -146,215 +153,255 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
<fileset dir="${schema.dir}"/>
</copy>
<if name="etics.build" value="false">
<!-- Populates library folder -->
<copy toDir="${build.lib.dir}">
<fileset dir="${lib.location}">
<exclude name="${jarfile.stubs}" />
</fileset>
</copy>
</if>
<!-- Populates library folder -->
<copy toDir="${build.lib.dir}">
<fileset dir="${lib.location}">
<exclude name="${jarfile.stubs}" />
</fileset>
</copy>
</target>
<!-- wsdl specific tasks. Clone for each additional wsdl, if required -->
<target name="processWSDL.1" depends="init" if="wsdl.1.name" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.1.name}'s WSDL:" level="debug"/>
<target name="processWSDL.1" depends="init" if="wsdl.1" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.1}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.1.name}.wsdl" />
<property name="wsdl.target" value="${wsdl.1.name}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.1.name}PortType" />
<property name="wsdl.source" value="${wsdl.1}.wsdl" />
<property name="wsdl.target" value="${wsdl.1}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.1}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.1.name}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.1.name}" />
<property name="porttype.wsdl" value="${wsdl.1}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.1}" />
</ant>
</target>
<target name="processWSDL.2" depends="init" if="wsdl.2.name" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.2.name}'s WSDL:" level="debug"/>
<target name="processWSDL.2" depends="init" if="wsdl.2" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.2}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.2.name}.wsdl" />
<property name="wsdl.target" value="${wsdl.2.name}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.2.name}PortType" />
<property name="wsdl.source" value="${wsdl.2}.wsdl" />
<property name="wsdl.target" value="${wsdl.2}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.2}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.2.name}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.2.name}" />
<property name="porttype.wsdl" value="${wsdl.2}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.2}" />
</ant>
</target>
<target name="processWSDL.3" depends="init" if="wsdl.3.name" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.3.name}'s WSDL:" level="debug"/>
<target name="processWSDL.3" depends="init" if="wsdl.3" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.3}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.3.name}.wsdl" />
<property name="wsdl.target" value="${wsdl.3.name}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.3.name}PortType" />
<property name="wsdl.source" value="${wsdl.3}.wsdl" />
<property name="wsdl.target" value="${wsdl.3}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.3}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.3.name}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.3.name}" />
<property name="porttype.wsdl" value="${wsdl.3}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.3}" />
</ant>
</target>
<target name="processWSDL.4" depends="init" if="wsdl.4.name" description="Flattens wsdl and generate bindings">
<target name="processWSDL.4" depends="init" if="wsdl.4" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.4.name}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.4.name}.wsdl" />
<property name="wsdl.target" value="${wsdl.4.name}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.4.name}PortType" />
<property name="wsdl.source" value="${wsdl.4}.wsdl" />
<property name="wsdl.target" value="${wsdl.4}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.4}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.4.name}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.4.name}" />
<property name="porttype.wsdl" value="${wsdl.4}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.4}" />
</ant>
</target>
<target name="processWSDL.5" depends="init" if="wsdl.5.name" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.5.name}'s WSDL:" level="debug"/>
<target name="processWSDL.5" depends="init" if="wsdl.5" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.5}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.5.name}.wsdl" />
<property name="wsdl.target" value="${wsdl.5.name}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.5.name}PortType" />
<property name="wsdl.source" value="${wsdl.5}.wsdl" />
<property name="wsdl.target" value="${wsdl.5}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.5}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.5.name}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.5}.name" />
<property name="porttype.wsdl" value="${wsdl.5}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.5}" />
</ant>
</target>
<target name="processWSDL.6" depends="init" if="wsdl.6.name" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.6.name}'s WSDL:" level="debug"/>
<target name="processWSDL.6" depends="init" if="wsdl.6" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.6}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.6.name}.wsdl" />
<property name="wsdl.target" value="${wsdl.6.name}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.6.name}PortType" />
<property name="wsdl.source" value="${wsdl.6}.wsdl" />
<property name="wsdl.target" value="${wsdl.6}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.6}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.6.name}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.6}.name" />
<property name="porttype.wsdl" value="${wsdl.6}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.6}" />
</ant>
</target>
<target name="generateStubs.1" if="wsdl.1.name" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.1.name}'s STUBS:" level="debug"/>
<target name="generateStubs.1" if="wsdl.1" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.1}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mapping.fromNamespace" value="${wsdl.1.namespace}" />
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.1.name}" />
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.1.name}_service.wsdl" />
<property name="wsdl.file" value="${wsdl.1}_service.wsdl" />
</ant>
</target>
<target name="generateStubs.2" if="wsdl.2.name" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.2.name}'s STUBS:" level="debug"/>
<target name="generateStubs.2" if="wsdl.2" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.2}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mapping.fromNamespace" value="${wsdl.2.namespace}" />
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.2.name}" />
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.2.name}_service.wsdl" />
<property name="wsdl.file" value="${wsdl.2}_service.wsdl" />
</ant>
</target>
<target name="generateStubs.3" if="wsdl.3.name" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.3.name}'s STUBS:" level="debug"/>
<target name="generateStubs.3" if="wsdl.3" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.3}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mapping.fromNamespace" value="${wsdl.3.namespace}" />
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.3.name}" />
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.3.name}_service.wsdl" />
<property name="wsdl.file" value="${wsdl.3}_service.wsdl" />
</ant>
</target>
<target name="generateStubs.4" if="wsdl.4.name" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.4.name}'s STUBS:" level="debug"/>
<target name="generateStubs.4" if="wsdl.4" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.4}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mapping.fromNamespace" value="${wsdl.4.namespace}" />
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.4.name}" />
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.4.name}_service.wsdl" />
<property name="wsdl.file" value="${wsdl.4}_service.wsdl" />
</ant>
</target>
<target name="generateStubs.5" if="wsdl.5.name" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.5.name}'s STUBS:" level="debug"/>
<target name="generateStubs.5" if="wsdl.5" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.5}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mapping.fromNamespace" value="${wsdl.5.namespace}" />
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.5.name}" />
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.5.name}_service.wsdl" />
<property name="wsdl.file" value="${wsdl.5}_service.wsdl" />
</ant>
</target>
<target name="generateStubs.6" if="wsdl.6.name" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.6.name}'s STUBS:" level="debug"/>
<target name="generateStubs.6" if="wsdl.6" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.6}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mapping.fromNamespace" value="${wsdl.6.namespace}" />
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.6.name}" />
<property name="mappings" value="${mappings}"/>
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.6.name}_service.wsdl" />
<property name="wsdl.file" value="${wsdl.6}_service.wsdl" />
</ant>
</target>
<!-- Cross-wsdl tasks. Adds dependencies for each additional wsdl, if required -->
<target name="processWSDLs" depends="processWSDL.1,processWSDL.2,processWSDL.3,processWSDL.4,processWSDL.5,processWSDL.6" description="generate bindings for all porttypes" />
<target name="generateStubs" depends="generateStubs.1,generateStubs.2,generateStubs.3,generateStubs.4,generateStubs.5,generateStubs.6" description="generate stub classes for all porttypes" />
<target name="generateStubs" depends="generateMappings,generateStubs.1,generateStubs.2,generateStubs.3,generateStubs.4,generateStubs.5,generateStubs.6" description="generate stub classes for all porttypes" />
<target name="generateMappings">
<var name="mappings" value=""/>
<if name="namespace.1">
<if name="package.1">
<var name="package.1" value="${stubs.package}.${package.1}"/>
<else>
<var name="package.1" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.1}=${package.1} -N${namespace.1}/service=${package.1}.service -N${namespace.1}/bindings=${package.1}.bindings"/>
</if>
<if name="namespace.2">
<if name="package.2">
<var name="package.2" value="${stubs.package}.${package.2}"/>
<else>
<var name="package.2" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.2}=${package.2} -N${namespace.2}/service=${package.2}.service -N${namespace.2}/bindings=${package.2}.bindings"/>
</if>
<if name="namespace.3">
<if name="package.3">
<var name="package.3" value="${stubs.package}.${package.3}"/>
<else>
<var name="package.3" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.3}=${package.3} -N${namespace.3}/service=${package.3}.service -N${namespace.3}/bindings=${package.3}.bindings"/>
</if>
<if name="namespace.4">
<if name="package.4">
<var name="package.4" value="${stubs.package}.${package.4}"/>
<else>
<var name="package.4" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.4}=${package.4} -N${namespace.4}/service=${package.4}.service -N${namespace.4}/bindings=${package.4}.bindings"/>
</if>
<if name="namespace.5">
<if name="package.5">
<var name="package.5" value="${stubs.package}.${package.5}"/>
<else>
<var name="package.5" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.5}=${package.5} -N${namespace.5}/service=${package.5}.service -N${namespace.5}/bindings=${package.5}.bindings"/>
</if>
<if name="namespace.6">
<if name="package.6">
<var name="package.6" value="${stubs.package}.${package.6}"/>
<else>
<var name="package.6" value="${stubs.package}"/></else>
</if>
<var name="mappings" value="${mappings} -N${namespace.6}=${package.6} -N${namespace.6}/service=${package.6}.service -N${namespace.6}/bindings=${package.6}.bindings"/>
</if>
</target>
<!-- Service tasks -->
<target name="deployService" depends="garService" description="deploy service gar">
<exec executable="${container.dir}/bin/gcore-deploy-service">
<arg value="${gar.location}/${package}.gar"/>
</exec>
</target>
<!-- Service Build tasks -->
<target name="buildService" depends="processWSDLs" description="compiles service implementation">
<if name="etics.build" value="false">
<javac srcdir="${package.dir}" destdir="${build.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}">
<classpath>
<fileset dir="${lib.location}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
<exclude name="${jarfile}" />
</fileset>
</classpath>
</javac>
<else>
<javac srcdir="${package.dir}" destdir="${build.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}">
<classpath>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
<exclude name="${jarfile}" />
</fileset>
</classpath>
</javac>
</else>
</if>
<javac srcdir="${source.dir}" destdir="${build.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}">
<classpath>
<fileset dir="${lib.location}">
<include name="**/*.jar" />
</fileset>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
<exclude name="${jarfile}" />
</fileset>
</classpath>
</javac>
</target>
<target name="jarService" depends="buildService" description="jars service implementation">
@ -376,15 +423,19 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
<reference refid="${garetc.id}" />
</ant>
<delete dir="tmp" />
<if name="etics.build" value="false">
<move file="${package}.gar" toDir="${build.location}"/>
</if>
<move file="${garfile}" toDir="${gar.location}"/>
</target>
<!-- Stub Build tasks -->
<target name="buildStubs" depends="processWSDLs,generateStubs" description="build service stubs">
<echo message="BUILDING ${wsdl.1}'s STUBS:" level="debug"/>
<if name="stubs.dir.present">
<copy toDir="${build.stubs.src.dir}/${package.dir}/${stubs.dir.name}" overwrite="true">
<fileset dir="${stubs.dir}" casesensitive="yes">
<exclude name="**/*.class" />
</fileset>
</copy>
</if>
<javac srcdir="${build.stubs.src.dir}" destdir="${build.stubs.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}" description="compile stub classes">
<include name="**/*.java" />
<classpath>
@ -393,48 +444,14 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
<exclude name="${jarfile.stubs}" />
<exclude name="${jarfile}" />
</fileset>
<fileset dir="${lib.location}">
<include name="**/*.jar" />
<exclude name="**/${jarfile.stubs}" />
<exclude name="**/${jarfile}" />
</fileset>
</classpath>
</javac>
<if name="stubs.dir.present">
<if name="etics.build" value="false">
<javac srcdir="${stubs.dir}" destdir="${build.stubs.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}" description="compile additional stub classes and resources">
<include name="**/*.java" />
<classpath>
<pathelement path="${build.stubs.class.dir}"/>
<fileset dir="${lib.location}">
<include name="**/*.jar" />
<exclude name="**/${jarfile.stubs}" />
<exclude name="**/${jarfile}" />
</fileset>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
<exclude name="${jarfile.stubs}" />
<exclude name="${jarfile}" />
</fileset>
</classpath>
</javac>
<else>
<javac srcdir="${stubs.dir}" destdir="${build.stubs.class.dir}" debug="${java.debug}" deprecation="${java.deprecation}" description="compile additional stub classes and resources">
<include name="**/*.java" />
<classpath>
<pathelement path="${build.stubs.class.dir}"/>
<fileset dir="${container.dir}/lib">
<include name="*.jar" />
<exclude name="${jarfile.stubs}" />
<exclude name="${jarfile}" />
</fileset>
</classpath>
</javac>
</else>
</if>
<copy toDir="${build.stubs.class.dir}/${package.dir}/${stubs.dir.name}" overwrite="true">
<fileset dir="${stubs.dir}" casesensitive="yes">
<exclude name="**/*.java" />
<exclude name="**/*.class" />
</fileset>
</copy>
</if>
<copy toDir="${build.stubs.class.dir}/META-INF" overwrite="false">
<copy toDir="${build.stubs.class.dir}/META-INF" overwrite="false"><!-- copy configuration info as well -->
<fileset dir="${etc.dir}" casesensitive="yes" />
</copy>
</target>
@ -447,14 +464,21 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
<copy file="${build.lib.dir}/${jarfile.stubs}" toDir="${lib.location}"/>
<if name="etics.build" value="false">
<copy file="${build.lib.dir}/${jarfile.stubs}" toDir="${container.dir}/lib"/>
<copy toDir="${container.dir}/lib">
<fileset dir="${lib.location}">
<include name="*.jar" />
</fileset>
</copy>
</if>
</target>
<target name="stubs" depends="deployStubs" description="generates, builds, jars and deploy stubs"/>
<!-- undeployement tasks -->
<target name="undeployStubs" description="deploy stub jar">
<delete file="${container.dir}/lib/${jarfile.stubs}"/>
</target>
<target name="undeployService" description="undeploy service jar">
<exec executable="${container.dir}/bin/gcore-undeploy-service">
<arg value="${package}"/>
</exec>
</target>
<!-- javadoc tasks -->
<target name="doc">
@ -496,48 +520,11 @@ wsdl.<n>.name: Name of the <n>-th port-type of the service, as defined in the
</target>
<!-- cleanup tasks -->
<target name="cleanService" depends="clean">
<delete dir="${service.dir}/tmp" />
<delete file="${garfile}" />
</target>
<target name="clean">
<delete dir="${build.dir}" />
<delete dir="${build.dir}" quiet="true"/>
<delete dir="${service.dir}/tmp" quiet="true"/>
<delete file="${gar.location}/${garfile}" quiet="true"/>
</target>
<!-- Task Templates for additional wsdls: for each one, clone, decomment, and replace <n> with wsdl number -->
<!--<target name="processWSDL.<n>" depends="init" if="wsdl.<n>" description="Flattens wsdl and generate bindings">
<echo message="PROCESSING ${wsdl.<n>}'s WSDL:" level="debug"/>
<ant antfile="${build.stubs}" target="flatten">
<property name="source.flatten.dir" location="${build.schema.service.dir}" />
<property name="target.flatten.dir" location="${build.schema.service.dir}" />
<property name="wsdl.source" value="${wsdl.<n>}.wsdl" />
<property name="wsdl.target" value="${wsdl.<n>}_flattened.wsdl" />
<property name="wsdl.porttype" value="${wsdl.<n>}PortType" />
</ant>
<ant antfile="${build.stubs}" target="generateBinding">
<property name="source.binding.dir" value="${build.schema.service.dir}" />
<property name="target.binding.dir" value="${build.schema.service.dir}" />
<property name="porttype.wsdl" value="${wsdl.<n>}_flattened.wsdl" />
<property name="binding.root" value="${wsdl.<n>}" />
</ant>
</target>
<target name="generateStubs.<n>" depends="mergePackageMapping" if="wsdl.<n>" description="Generate wsdl stub classes">
<echo message="GENERATING ${wsdl.<n>}'s STUBS:" level="debug"/>
<ant antfile="${build.stubs}" target="generateStubs">
<property name="mapping.fromNamespace" value="${wsdl.<n>.namespace}" />
<property name="mapping.toPackage" value="${package}.${stubs.dir.name}.${wsdl.<n>.name}" />
<property name="source.stubs.dir" location="${build.schema.service.dir}" />
<property name="target.stubs.dir" location="${build.stubs.src.dir}" />
<property name="wsdl.file" value="${wsdl.<n>.name}_service.wsdl" />
</ant>
</target>
-->
</project>