Exporter Configuration

The exporter is an application used to export all projects from a given local folder into a remote repository. It can also be used to export the user profiles model.

1. Exporter strategy

The Exporter application supports one strategy :

  • Connected export: the Exporter application establishes a connection to the targeted repository and export projects (chosen by the user).

    • Credentials might be required if the server has been configured to use identification, authentication or user profiles, see Server Configuration job documentation.

See also Projects — Export job documentation.

2. Exporter parameters

exporter.bat file uses -vmargs as a standard eclipse parameter. Eclipse parameters that are used by exporter.bat override the value defined in capella.ini file. So if you want to change a system property existing in capella.ini (-vmargs -Xmx3000m for example) do not forget to do the same change in exporter.bat.

The exporter needs credentials to connect to the CDO server if the server has been started with authentication or user profile. Credentials can be provided using either -repositoryCredentials or -repositoryLogin and -repositoryPassword parameters or via fr.obeo.dsl.viewpoint.collab.credentials.tools.net4j.login and fr.obeo.dsl.viewpoint.collab.credentials.tools.net4j.password system properties or environment variables. Environment variable overrides the arguments values and Java system properties take precedence over both.

Here is a list of arguments that can be set to the Exporter (in exporter.bat or in a launch config):

Arguments Description

-repositoryCredentials

Login and password can be provided using a credential file.

To use this property file

  • Add the following program argument: -repositoryCredentials path_to_credentials_file

  • Fill the specified file using the following format (only one line allowed):

    aLogin:aPassword

Notes:

  • This parameter must not be used with -repositoryLogin or -repositoryPassword parameters else the importer will fail.

  • If the credentials do not contain any password, the password will be searched in the eclipse secure storage. See how to set the password in the secure storage.

  • Login can also be provided with fr.obeo.dsl.viewpoint.collab.credentials.tools.net4j.login environment variable or system property.

  • Password can also be provided with fr.obeo.dsl.viewpoint.collab.credentials.tools.net4j.password environment variable or system property.

-repositoryLogin

The exporter needs a login in order to connect to the CDO server if the server has been started with authentication or user profile.

Notes:

  • -repositoryPassword must not be used with -repositoryCredentials else the application will fail.

  • Login can also be provided with fr.obeo.dsl.viewpoint.collab.credentials.tools.net4j.login environment variable or system property.

-repositoryPassword

This parameter is used to provide a password to the exporter accordingly to the login.

If -repositoryPassword is not used, the password will be searched in the eclipse secure storage. See how to set the password in the secure storage.

Notes:

  • Warning: some special characters like double-quote might not be properly handled when passed in argument of the importer.

  • If -repositoryPassword is not used, the password will be searched in the eclipse secure storage. See how to set the password in the secure storage

  • -repositoryPassword must not be used with -repositoryCredentials else the application will fail.

  • Password can also be provided with fr.obeo.dsl.viewpoint.collab.credentials.tools.net4j.password environment variable or system property.

-hostName

Define the team server hostname (default: localhost).

-port

Define the team server port (default: 2036).

-connectionType

The connection kind can be set to tcp or ssl (keep it in low-case) (default: tcp)

-repoName

Define the team server repository name (default: repoCapella).

-sourceToExport

Define the path of folder containing projects to export.

This folder can be :

  • a folder that contains one or more projects to export,

  • a zip containing one or more Sirius project that is aird file,

  • a folder that contains one or more zip files.

-logFolder

Define the folder where to save logs (default: -outputFolder).

-overrideExistingProject

If the remote repository already contains a project to export with the same name, this argument allows removing this existing project (default: false).

-mergeDifferenceOnExistingProjects

If -overrideExistingProject is set to true (default: false), this argument allows selecting one of the two following override strategies:

  • Replace: Delete remote resources content and replace by local content (commit history is lost) (default)

  • Merge: Use Diff/Merge to compare local and existing resources and commit only the differences.

-overrideExistingImage

If the remote repository already contains an image with the same name, this argument allows ignoring and overriding it.

-closeServerOnFailure

Ask to close the server on project export failure (default: false). If the server hosts several repositories, it is better to use the parameter -stopRepositoryOnFailure.

-stopRepositoryOnFailure

Ask to close the repository on project export failure (default: false).

It is currently not possible to restart a single repository, if defined in cdo-server.xml. To restart the stopped repository, stop and restart the server.

-addTimestampToResultFile

Add a time stamp to result files name (.zip, logs, commit history) (default: true).

-httpLogin

Exporter application will trigger an Http request. This argument allows giving a login to identify with on the Jetty server. Login can also be provided with fr.obeo.dsl.viewpoint.collab.credentials.tools.http.login environment variable or system property.

-httpPassword

Exporter application will trigger an Http request. This argument allows giving a password to authenticate with on the Jetty server. Password can also be provided with fr.obeo.dsl.viewpoint.collab.credentials.tools.http.password environment variable or system property.

-httpPort

Exporter application will trigger an Http request. This argument allows giving a port to communicate with on the Jetty server.

-httpsConnection

Exporter application will trigger an Http request. This boolean argument specifies if the connection should be Https or Http.

-help

Print help message.

If the server has been started with user profile, the Exporter needs to have write access to the whole repository (including the user profiles model). See Resource permission pattern examples section.

If this recommendation is not followed, the Exporter might not be able to override existing projects on remote, for example. This may lead to a failed export.

The exporter uses the default configuration of Capella and does not need its own configuration area. For this to work properly, the exporter needs to have read/write permission to the configuration area of Capella, otherwise it can end up with some errors about access being denied. A common situation where the exporter can be found in this situation is when the Scheduler is launched as a Windows service. In this case, the user account executing the service is not necessarily configured to have the read/write permission to Capella’s configuration area. If somehow you cannot give the read/write permission to the exporter, a workaround is to provide it a dedicated configuration area by adding the following arguments at the end of exporter.bat file: -Dosgi.configuration.area="path/to/exporter/configuration/area" and if necessary, update the existing argument -data exporter-workspace to point to a location with read/write permission.

2.1. How to set the password in secure storage

The exporter does not use the same credentials as the user. It is stored in a different entry in the Eclipse 'Secure Storage'. Storing and clearing the credentials requires a dedicated application that can be executed as an Eclipse Application or using a Jenkins job.

3. Examples

example1: export project
exporter.bat -nosplash -data exporter-workspace
-closeServerOnFailure true
-connectionType ssl
-sourceToExport C:\Users\me\Documents\runtime-T4C