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:

Copy
<?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 location of your Structure101 repository. One of:
  • local filesystem repository (directory path), e.g. c:\my-s101-repository
  • remote filesystem repository (URL), e.g. http(s)://<server-name-or-ip-addr><:portno>/s101cpp/data
  • cloud-based or Soda Dependency Database repository (properties file), e.g ./my-s101-repository.properties
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 using an URL to a remote filesystem 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.


Users licensed for Soda Build are reminded to also run the companion publish-cpa-attributes operation that adds function hashcodes and C++ attribute data to the Soda Dependency Database.