Skip to main content

Version: 21.05 (EOL)

svc-scaffold

The svc-scaffold task provides a scaffolding task to create a new Fluent Groovy service.

When you run this task, you specify a service name, a service type and a source directory. The task creates a service-def.json file for you, and creates a Groovy service source file and unit test source file using the Transact Groovy service templates.

Task Attributes

All attributes are optional unless otherwise indicated.

AttributeDescription
templateString

Required. A supported service definition template. For example, "Dynamic Data".

nameString

Required. The service name. For example, "TrackMe DD".

packageNameString

Required. The package name for the generated Groovy service definition. For example, "com.maguire.svc.trackme".

clientCodeString

Required. The service organization client code. For example, "maguire".

dirString

Required. The target project directory to create and deploy files to. For example, "src/trackme-dd".

Example

The example Ant task below creates a new Groovy service using the svc-scaffold task. This example prompts the user to specify the required parameters.

<target name="svc-scaffold">
<input message="Enter the Service Name:" addproperty="name"/>
<input message="Enter the Package Name:" addproperty="packageName"/>
<input message="Enter the Service Template:"
validargs="Delivery Function,Fluent Function,Delivery Function,Fluent Function,Fluent Delivery Process,..."
addproperty="template"/>
<svc-scaffold
template="${template}"
name="${name}"
packageName="${packageName}"
dir="${basedir}/src"/>
</target>