Artifact Commands

The CLI includes the following artifact commands:

Command

Description

Command

Description

delete artifact <artifact-name> <artifact-version>

Deletes an artifact.

describe artifact <artifact-name> <artifact-version> [<scope>]

Describes an artifact, including information about the application and plugin classes contained in the artifact. If no scope is provided, the artifact is looked for first in the 'SYSTEM' and then in the 'USER' scope.

describe artifact-plugin <artifact-name> <artifact-version> <plugin-type> <plugin-name> [<scope>]

Describes a plugin of a specific type and name available to a specific artifact. Can return multiple details if there are multiple versions of the plugin. If no scope is provided, plugins are looked for first in the 'SYSTEM' and then in the 'USER' scope.

get artifact properties <artifact-name> <artifact-version> [<scope>]

Gets the properties of an artifact. If no scope is provided, properties are looked for first in the 'SYSTEM' and then in the 'USER' scope.

list artifact plugin-types <artifact-name> <artifact-version> [<scope>]

Lists all plugin types usable by the specified artifact. If no scope is provided, artifacts are looked for first in the 'SYSTEM' and then in the 'USER' scope.

list artifact plugins <artifact-name> <artifact-version> <plugin-type> [<scope>]

Lists all plugins of a specific type available to a specific artifact. Returns the type, name, classname, and description of the plugin, as well as the artifact the plugin came from. If no scope is provided, artifacts are looked for first in the 'SYSTEM' and then in the 'USER' scope.

list artifact versions <artifact-name> [<scope>]

Lists all versions of a specific artifact. If no scope is provided, artifacts are looked for first in the 'SYSTEM' and then in the 'USER' scope.

list artifacts [<scope>]

Lists all artifacts. If no scope is provided, artifacts in all scopes are returned. Otherwise, only artifacts in the specified scope are returned.

load artifact <local-file-path> [config-file <artifact-config>] [name <artifact-name>] [version <artifact-version>]

Loads an artifact into CDAP. If the artifact name and version are not both given, they will be derived from the filename of the artifact. File names are expected to be of the form <name>-<version>.jar. If the artifact contains plugins that extend another artifact, or if it contains third-party plugins, a config file must be provided. The config file must contain a JSON object that specifies the parent artifacts and any third-party plugins in the JAR.

For example, if there is a config file with these contents:

{
"parents":[
"app1[1.0.0,2.0.0)","app2[1.2.0,1.3.0]" ],
"plugins":[
{ "type": "jdbc",
"name": "mysql",
"className": "com.mysql.jdbc.Driver"
}
],
"properties":{
"prop1": "val1"
}
}

This config specifies that the artifact contains one JDBC third-party plugin that should be available to the 'app1' artifact (versions 1.0.0 inclusive to 2.0.0 exclusive) and 'app2' artifact (versions 1.2.0 inclusive to 1.3.0 inclusive). The config may also include a 'properties' field specifying properties for the artifact.

set artifact properties <artifact-name> <artifact-version> <scope> <local-file-path>

Sets properties of an artifact. The properties file must contain a JSON object with a 'properties' key whose value is a JSON object of the properties for the artifact.

Created in 2020 by Google Inc.