As part of Structure101 it is possible to output all Structure101 Studio architecture diagrams to image files and violations to an xml file.
Example XML file to perform the operation:
<?xml version="1.0" encoding="UTF-8"?>
<headless version="1.0">
<operations>
<operation type="report-architecture">
<argument name="output-file" value="c:/abc/report-xs.xml"/>
<argument name="identifier-on-violation" value="build unstable"/>
</operation>
</operations>
<arguments>
<argument name="local-project" value="C:\Documents and Settings\user\project.java.hsp">
<override attribute="classpath" value="C:\classes-to-parse"/>
</argument>
<argument project="project-with-diagrams-in-repository"/>
<argument repository="path-to-repository"/>
</arguments>
</headless>
Available arguments include:
Argument | Required | Description |
---|---|---|
local-project | no | See project-spec. |
output-file | no | File to which metrics are recorded to. Stored in XML format. |
project | yes | project with diagrams in repository. |
repository | yes | 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. |
identifier-on-violation | no | It can take any text. If this value is set to a text string then that text will be present in console output if a violation is found. This feature can be used in conjunction with Hudson or Jenkins (Textfinder plugin) to make the build unstable. |
useProjectFileDiagrams | no | If set to true then diagrams in the specified project file are used instead of repository diagrams. Default value is false. |
detailed | no | If set to true then the list of elemental (lowest level) violations will be saved to output. If false the violations will be rolled up to the relevant cell level, e.g. package-to-package. Default value is false. |
Important: Requires a valid license file in the current directory with a build license, or the -licensedirectory parameter to be set.