Skip to main content

Version: 23.10

svc-imports

The svc-imports task scans the specified service definitions' scripts and fills some of the file includes automatically.

Task Structure

The structure of the svc-imports task element is shown below.

<svc-imports>
<fileset dir=... >
<include name=... />
</fileset>
</svc-imports>

The fileset element is an Ant FileSet. For detailed information, see FileSet Type - Apache Ant.

Task Attributes

All attributes are optional unless otherwise indicated.

The fileset element recognises the following attributes.

AttributeDescription
dirString

Required. The base directory containing service definition JSON files.

The include element recognises the following attributes.

AttributeDescription
nameString

Required. A file name or file mask identifying service definition JSON files.

The service definition files are located in the directory specified by the dir attribute of the containing fileset element.

If using a file mask to filter files, ensure it only selects service definition JSON files.

Example

The example Ant task below scans and fills some of the file includes automatically for multiple service definitions as specified by the fileset element.

<svc-imports>
<fileset dir="src">
<include name="**/service-def.json"/>
</fileset>
</svc-imports>