build-type
Command Reference
Description
Build and package a type defined in the type.xml.
Reads the ${opts.basedir}/${opts.type}/type.xml and generates a set of files suitable for uploading to the server. The type.xml and generated files are packaged into a jar along with any other content found within the module directory hierarchy. After build-type has been run for the first time you will notice two new files: type.rdf and module.rdf. These files contain the same data as found in the type.xml file but use the RDF format, the native representation Workbench uses to maintain the model.
Pre-/post-build hooks
The build-type uses an internal build script that supports two optional Ant build files in the top level of the type directory structure.
- pre-build.xml: Optional ant file to run before the build.
- post-build.xml: Optional ant file to run after the build.
Interaction with Workbench
To assist the development cycle, the -upload and -deploy flags will also upload the the resulting jar and load into the Workbench server, then deploy it to the working CTL context.
ctl -p project -t ProjectBuilder -o name -c build-type -- \ -type ${opts.type} -upload -deploy
As Workbench reads in the contents of the jar, it will generate command implementations if they are not found in the jar. This process works pretty well for workflows and shell command types. Besides expanding type.xml command definitions into implementation files, Workbench also generates any needed CTL properties files.
static: This command can be run outside of an object context.
Usage
ctl -m ProjectBuilder -c build-type [-basedir <>] [-deploy] [-regenerate] [-targetdir <>] -type <> [-upload] [-version <1>]
Options
Option | Description | Type | Default |
---|---|---|---|
basedir | the base modules directory where this type module will be located | string | ${entity.attribute.basedir} |
deploy | when set, installs built module into the local ctl project | boolean | |
regenerate | when set, removes module directory on dav before upload | boolean | |
targetdir | directory where artifact is written | string | ${entity.attribute.targetdir} |
type | type name | string | |
upload | when set, uploads built module to the server | boolean | |
version | module version id | string | 1 |