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 Journey Manager Groovy service templates.
Task Attributes
All attributes are optional unless otherwise indicated.
| Attribute | Description |
|---|---|
template | StringRequired. A supported service definition template. For example, |
name | StringRequired. The service name. For example, |
packageName | StringRequired. The package name for the generated Groovy service definition. For example, |
clientCode | StringRequired. The service organization client code. For example, |
dir | StringRequired. The target project directory to create and deploy files to. For example, |
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>