Structure101 Build accepts a single XML configuration file specifying:
- the operations to run,
- the arguments common to all operations, and
- the arguments specific to each individual operation.
The basic format of the XML file contains sections for the operations to perform, listed in the order in which you wish them to be performed, and the arguments for those operations:
<?xml version="1.0" encoding="UTF-8"?> <headless version="1.0"> <operations> ... </operations> <arguments> ... </arguments> </headless>
Common arguments
Within the arguments section, you add the common arguments for all operations. The following are usually required :
Argument | Required | Description |
---|---|---|
local-project | yes | See project-spec. The argument must be included |
project | for most operations | The name of the project in the Structure101 Repository to which this local project is associated. |
repository | for most operations | The path to the Structure101 Studio repository root directory, e.g. c:/repository, /home/usr/x/repository, or, if remote, http://<servernameorip><:portno>/s101j/data. |
For example:
<arguments> <argument name="local-project" value="const(THIS_FILE)/structure101-project.java.hsp" /> <argument name="repository" value="C:\repository"/> <argument name="project" value="my-project"/> </arguments>
Operation specific arguments
For details on the arguments specific to individual operations see the appropriate section under build operations.
Example XML configuration file
An example XML file where operations have been combined to run consecutively as part of a "pipeline"
<?xml version="1.0" encoding="UTF-8"?> <headless version="1.0"> <operations> // raise exception, and record to file, if there is a deterioration in one of the specified key measure <operation type="check-key-measures"> <argument name="output-file" value="const(THIS_FILE)/s101-results/key-measures.xml"/> <argument name="output-file-for-snapshot" value="const)THIS_FILE)/s101-results/snapshot-key-measures.xml"/> <argument name="fail-on-spec-violation-dependencies" value="true"/> <argument name="fail-on-architecture-violations" value="false"/> <argument name="fail-on-spec-item-violations" value="true"/> <argument name="fail-on-fat-package-violations" value="true"/> <argument name="fail-on-fat-class-violations" value="true"/> <argument name="fail-on-fat-method-violations" value="true"/> <argument name="fail-on-total-problem-dependencies" value="false"/> <argument name="fail-on-feedback-dependencies" value="false"/> <argument name="fail-on-biggest-class-tangle" value="false"/> <argument name="fail-on-tangled-package" value="false"/> <argument name="identifier-on-violation" value="Structure101 key measure increased"/> </operation> // if no exceptions then publish <operation type="publish"/> // once published record summary for the snapshot/project <operation type="report-summary"> <argument name="output-dir" value="const(THIS_FILE)/s101-results"/> <argument name="xml" value="true"/> <argument name="notips" value="true"/> <argument name="overwrite" value="true"/> <argument name="name" value="abc"/> </operation> </operations> <arguments> <argument name="local-project" value="const(THIS_FILE)/structure101-project.java.hsp" /> <argument name="repository" value="C:\repository"/> <argument name="project" value="project-name"/> </arguments> </headless>