Kwprojcopy

The kwprojcopy command is not a supported feature. Do not use this command to copy projects between servers, back up projects, or in any production work flows.

Use the kwprojcopy command to export a copy of a server project and store it locally. You can also use the kwprojcopy command to import a copy of a project to another projects_root directory.

kwprojcopy export

The kwprojcopy export command exports a copy of a project. Your project name is case-sensitive and should match the name listed in Klocwork.

Usage

kwprojcopy export --url <project_URL> <path> [--force]

where

  • <project_URL> is a URL of the form http://<server_host>:<server_port>/<project> Use https:// if a secure Klocwork Server connection has been configured.
  • <path> is the path to a project archive file created by this command

Example

kwprojcopy export --url http://myserver:8080/myproject C:\copies\myproject_copy --force

You can also create a file to specify your command line arguments. Each argument must be on a separate line. If the arguments file contains multibyte characters, the file must be UTF-8 encoded.

kwprojcopy export @<arguments_file>

Options

By default, the export command does not include sources. If you want to make a complete copy of a project, you must use the --includeSources option.

Name Short name Description
--force -f overwrite the existing project archive if necessary
--includeSources   includes sources in the project archives. The default is no sources.

kwprojcopy import

The kwprojcopy import command takes a copy of a project that you created previously by using the kwprojcopy export command and imports it into the specified projects_root directory.

Prerequisites

Before you import a project into a new projects_root directory, verify that there are no projects that exist with the same name. If a project with the same name already exists, you must delete the conflicting project before running the import command.

Also, verify that the version of the Klocwork server that you import a project into is the same as the version of the server that you exported the project from. Importing a project into a newer or older version of the server is not supported.

Usage

kwprojcopy import --url <server_URL> <path> 

where

  • <server_URL> is a URL of the form http://<server_host>:<server_port>/ Use https:// if a secure Klocwork Server connection has been configured.
  • <path> is the path to the project archive file created by the kwprojcopy export command.

Example

kwprojcopy import --url http://myserver:8080/ C:\copies\myproject_copy 

You can also create a file to specify your command line arguments. Each argument must be on a separate line. If the arguments file contains multibyte characters, the file must be UTF-8 encoded.

kwprojcopy import @<arguments_file>