This operation publishes a local project model to a new snapshot in a repository. The Key Measures, Structure Spec, Architecture Diagrams and Actions are also published thus capturing the model with the actions and diagrams as they were at the time of the snapshot.

Example XML file to perform a publish operation:

<?xml version="1.0" encoding="UTF-8"?>
<headless version="1.0">
    <operations>
        <operation type="publish">
            <argument name="label" value="1.0.1"/> // optional
            <argument name="overwrite" value="true"/> // optional
            <argument name="diagrams" value="true"/> // optional
        </operation>
    </operations>
    <arguments>
        <argument name="local-project" value="C:\Documents and Settings\user\project.java.hsp">
            <override attribute="classpath" value="C:\classes-to-parse"/> // optionally override classpath to parse
            <override attribute="overview" value="false"/> // optional, load in overview mode, default is false
            <override attribute="externals" value="true"/> // optional, include externals in model, default is false
            <override attribute="needstocompile" value="false"/> // optional, include needs to compile dependencies, default is false
        </argument>
        <argument name="repository" value="C:\repository"/>
        <argument name="project" value="project"/>
    </arguments>
</headless>    
   

Available arguments include:

Argument Required Description
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>/s101cpp/data.
project yes The name of the project in the repository to which this snapshot will be published. If the project doesn't exist it will be created.
local-project yes See project-spec.
label no A label for the snapshot, typically a version number or build identifier. If not provided but the project exists then the last label published will be used. For a project not yet published if no label is provided then 1.0.0 is used.
date no A date for the snapshot. If specified, this must be unique within the repository project. The date format is locale-specific.
rpkey no Specifies the "remote publish key". Necessary if you are publishing to a remote (web) repository that is password-protected
overwrite no If set to true, then any existing snapshot for the label is overwritten (saving disk space). When set to false a new snapshot is created in a folder named <label name>_n where n increments from 2. The web app always shows the last snapshot published for a label. Default is false.


Important: Requires a valid license file in the current directory with a build license, or the -licensedirectory parameter to be set.