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 | String Required. A supported service definition template. For example, |
name | String Required. The service name. For example, |
packageName | String Required. The package name for the generated Groovy service definition. For example, |
clientCode | String Required. The service organization client code. For example, |
dir | String Required. 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>