1. Batch Publishing

The Publication For Capella Contributor Client can be run from a command line to launch the publication of a Capella model.

1.1. Launching the Publication Application

The publication command line tool is a headless Eclipse Application (fr.obeo.perseus.client.publisher) integrated in the Publication For Capella Contributor Client.

It can be launched using the capella executable with the following parameters:

  • -application: fr.obeo.perseus.client.publisher

  • -data: The path to the workspace

  • -airdPath: The path to the aird file within the workspace

  • -commitMessage: The publication commit message

  • -p4cLogin: The Publication For Capella contributor user login

  • -p4cPassword: The Publication For Capella contributor user password

  • -serverURI: (Optional, in case of first publication) The target Publication For Capella server URI

  • -projectId: (Optional, in case of first publication) The target Publication For Capella project ID

  • -timeoutSeconds: (Optional) Maximum time to wait for a server response (Default: 300 seconds)

This application requires a login/password account. The account must be created by a server administrator and have a valid contributor license. The account must also be granted contributor access to the target Publication For Capella projects. For now the batch publishing application does not support OIDC accounts. The destination project inside the Publication For Capella server must already exist.
Example under linux
./capellac --launcher.suppressErrors -nosplash -console -consoleLog \
-application fr.obeo.perseus.client.publisher \
-data workspace_path \
-airdPath capella_project/capella_project.aird \
-commitMessage "commit message" \
-p4cLogin login \
-p4cPassword password
Example under windows
capellac.exe --launcher.suppressErrors -nosplash -console -consoleLog ^
-application fr.obeo.perseus.client.publisher ^
-data workspace_path ^
-airdPath capella_project\capella_project.aird ^
-commitMessage "commit message" ^
-p4cLogin login ^
-p4cPassword password

1.2. Publishing a Team for Capella model

The batch publication tool can be used in a Team for Capella context, for instance to regularly publish a Capella model shared on a Team for Capella server.

A template script in TeamForCapella/tools provides a way to achieve this: publisher_p4c_from_t4c.bash / publisher_p4c_from_t4c.bat. The script imports a Team for Capella model then publishes it using an auxiliary publisher_p4c.bash / publisher_p4c.bat script.

To use it, the auxiliary publisher_p4c script needs to be modified to include the Team for Capella server license key:

-DOBEO_LICENSE_SERVER_CONFIGURATION=<To set in T4C context>

Then the publisher_p4c_from_t4c can be used to publish Team for Capella models.

As-is, the template script is based on variables that need to be set before calling the script (or be set within the script):

  • MODEL_NAME: The name of the capella project to publish

  • ROOT: The path to the capella folder containing the capella executable

  • WORKSPACE: The path to the workspace

  • T4C_REPO_NAME: The Team for Capella repository name

  • T4C_HOST: The Team for Capella server host

  • T4C_PORT: The Team for Capella server port

  • T4C_USER: The Team for Capella user login

  • T4C_PASSWORD: The Team for Capella user password

  • P4C_COMMIT_MESSAGE: The publication commit message

  • P4C_USER: The Publication For Capella contributor user login

  • P4C_PASSWORD: The Publication For Capella contributor user password

Example under linux
export MODEL_NAME=ModelName
export ROOT="C:/Programs/capella"
export WORKSPACE=tmp_workspace
export T4C_REPO_NAME=repoCapella
export T4C_HOST=localhost
export T4C_PORT=2036
export T4C_USER=admin
export T4C_PASSWORD=admin
export P4C_COMMIT_MESSAGE="Automatic commit"
export P4C_USER=batchuser
export P4C_PASSWORD=password
Example under windows with PowerShell
set MODEL_NAME=ModelName
set ROOT="C:\Programs\capella"
set WORKSPACE=tmp_workspace
set T4C_REPO_NAME=repoCapella
set T4C_HOST=localhost
set T4C_PORT=2036
set T4C_USER=admin
set T4C_PASSWORD=admin
set P4C_COMMIT_MESSAGE="Automatic commit"
set P4C_USER=batchuser
set P4C_PASSWORD=password