io7m | single-page | multi-page

brooklime 1.1.0

ID d792ce57-6851-415a-b6c9-18550e512136
1

Command-Line Interface

1.1

Overview

1
The brooklime package provides a command-line interface for performing tasks such as creating, closing, releasing, listing, and examining Nexus staging repositories. The base brooklime command is broken into a number of subcommands which are documented over the following sections.
2

1.1.2 Command-Line Overview

Usage: brooklime [options] [command] [command options]
  Options:
    --verbose
      Set the minimum logging verbosity level
      Default: info
      Possible Values: [trace, debug, info, warn, error]
  Commands:
    close      Close an existing staging repository
      Usage: close [options]
        Options:
          --baseURI
            The Nexus URI
            Default: https://oss.sonatype.org:443/
        * --password
            The Nexus password
        * --repository
            The staging repository ID
        * --stagingProfileId
            The Nexus staging profile id
        * --user
            The Nexus user name
          --verbose
            Set the minimum logging verbosity level
            Default: info
            Possible Values: [trace, debug, info, warn, error]

    create      Create a staging repository
      Usage: create [options]
        Options:
          --baseURI
            The Nexus URI
            Default: https://oss.sonatype.org:443/
        * --description
            The staging repository description
        * --password
            The Nexus password
        * --stagingProfileId
            The Nexus staging profile id
        * --user
            The Nexus user name
          --verbose
            Set the minimum logging verbosity level
            Default: info
            Possible Values: [trace, debug, info, warn, error]

    drop      Drop an existing staging repository
      Usage: drop [options]
        Options:
          --baseURI
            The Nexus URI
            Default: https://oss.sonatype.org:443/
        * --password
            The Nexus password
        * --repository
            The staging repository ID
        * --stagingProfileId
            The Nexus staging profile id
        * --user
            The Nexus user name
          --verbose
            Set the minimum logging verbosity level
            Default: info
            Possible Values: [trace, debug, info, warn, error]

    list      List the current staging repositories
      Usage: list [options]
        Options:
          --baseURI
            The Nexus URI
            Default: https://oss.sonatype.org:443/
        * --password
            The Nexus password
        * --stagingProfileId
            The Nexus staging profile id
        * --user
            The Nexus user name
          --verbose
            Set the minimum logging verbosity level
            Default: info
            Possible Values: [trace, debug, info, warn, error]

    release      Release an existing staging repository
      Usage: release [options]
        Options:
          --baseURI
            The Nexus URI
            Default: https://oss.sonatype.org:443/
        * --password
            The Nexus password
        * --repository
            The staging repository ID
        * --stagingProfileId
            The Nexus staging profile id
        * --user
            The Nexus user name
          --verbose
            Set the minimum logging verbosity level
            Default: info
            Possible Values: [trace, debug, info, warn, error]

    show      Show an existing staging repository
      Usage: show [options]
        Options:
          --baseURI
            The Nexus URI
            Default: https://oss.sonatype.org:443/
        * --password
            The Nexus password
        * --repository
            The staging repository ID
        * --stagingProfileId
            The Nexus staging profile id
        * --user
            The Nexus user name
          --verbose
            Set the minimum logging verbosity level
            Default: info
            Possible Values: [trace, debug, info, warn, error]

    upload      Upload files to an existing staging repository
      Usage: upload [options]
        Options:
          --baseURI
            The Nexus URI
            Default: https://oss.sonatype.org:443/
        * --directory
            The directory containing files to be uploaded
        * --password
            The Nexus password
        * --repository
            The staging repository ID
        * --stagingProfileId
            The Nexus staging profile id
        * --user
            The Nexus user name
          --verbose
            Set the minimum logging verbosity level
            Default: info
            Possible Values: [trace, debug, info, warn, error]

    version      Show the application version
      Usage: version [options]
        Options:
          --verbose
            Set the minimum logging verbosity level
            Default: info
            Possible Values: [trace, debug, info, warn, error]

      
3
All subcommands accept a --verbose parameter that may be set to one of trace, debug, info, warn, or error. This parameter sets the lower bound for the severity of messages that will be logged. For example, at debug verbosity, only messages of severity debug and above will be logged. Setting the verbosity to trace level effectively causes everything to be logged, and will produce large volumes of debugging output.
4
The brooklime command-line tool uses jcommander to parse command-line arguments, and therefore supports placing command-line arguments into a file, one argument per line, and then referencing that file with @. For example:
5

1.1.5 @ Syntax

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1001                     open     Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

$ (cat <<EOF
list
--user
someone
--password
notarealpassword
--stagingProfileId
c608eebdbad499e5fd3eb6d6
EOF
) > args.txt

$ brooklime @args.txt
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1001                     open     Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

      
6
All subcommands, unless otherwise specified, yield an exit code of 0 on success, and a non-zero exit code on failure.
1.2

Close

Name

1
close - Close staging repositories

Description

1
The close command closes a staging repository.
2

1.2.2.2 Parameters

Parameter Type Required Description
--baseURI URI false The base URI of the repository manager.
--password String true The password for the Nexus user account.
--stagingProfileId String true The staging profile ID.
--user String true The name of the Nexus user account.
--repository String true The staging repository ID.
--retryCount Integer false The number of times to retry failed HTTP requests.
--retryDelay Integer false The number of seconds to pause between retrying failed HTTP requests.

Example

1

1.2.3.1 Example

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1001                     open     Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

$ brooklime close --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6 --repository example-1001

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1001                     closed   Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

      
1.3

Create

Name

1
create - Create staging repositories

Description

1
The create command creates a new staging repository. If the command completes successfully, the ID of the newly created staging repository is printed to the standard output.
2

1.3.2.2 Parameters

Parameter Type Required Description
--baseURI URI false The base URI of the repository manager.
--password String true The password for the Nexus user account.
--stagingProfileId String true The staging profile ID.
--user String true The name of the Nexus user account.
--description String true The humanly-readable description of the staging repository.
--retryCount Integer false The number of times to retry failed HTTP requests.
--retryDelay Integer false The number of seconds to pause between retrying failed HTTP requests.
--outputFile Path false The output file that will contain the staging repository ID.

Example

1

1.3.3.1 Example

$ brooklime create --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6 --description 'An example staging repository.'
example-1000

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     An example staging repository.

      
1.4

Drop

Name

1
drop - Drop staging repositories

Description

1
The drop command drops a staging repository.
2

1.4.2.2 Parameters

Parameter Type Required Description
--baseURI URI false The base URI of the repository manager.
--password String true The password for the Nexus user account.
--stagingProfileId String true The staging profile ID.
--user String true The name of the Nexus user account.
--repository String true The staging repository ID.
--retryCount Integer false The number of times to retry failed HTTP requests.
--retryDelay Integer false The number of seconds to pause between retrying failed HTTP requests.

Example

1

1.4.3.1 Example

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1001                     open     Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

$ brooklime drop --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6 --repository example-1001

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

      
1.5

List

Name

1
list - List staging repositories

Description

1
The list command lists the staging repositories that currently exist for the given staging profile.
2

1.5.2.2 Parameters

Parameter Type Required Description
--baseURI URI false The base URI of the repository manager.
--password String true The password for the Nexus user account.
--stagingProfileId String true The staging profile ID.
--user String true The name of the Nexus user account.
--retryCount Integer false The number of times to retry failed HTTP requests.
--retryDelay Integer false The number of seconds to pause between retrying failed HTTP requests.

Example

1

1.5.3.1 Example

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1001                     open     Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

      
1.6

Release

Name

1
release - Release staging repositories

Description

1
The release command releases a staging repository. The staging repository, if successfully released, is automatically dropped. This is the standard behaviour when, for example, deploying packages to Maven Central.
2

1.6.2.2 Parameters

Parameter Type Required Description
--baseURI URI false The base URI of the repository manager.
--password String true The password for the Nexus user account.
--stagingProfileId String true The staging profile ID.
--user String true The name of the Nexus user account.
--repository String true The staging repository ID.
--retryCount Integer false The number of times to retry failed HTTP requests.
--retryDelay Integer false The number of seconds to pause between retrying failed HTTP requests.

Example

1

1.6.3.1 Example

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1001                     closed   Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

$ brooklime release --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6 --repository example-1001

$ brooklime list --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6
ID                               Status   Description
example-1000                     open     Implicitly created (auto staging).
example-1002                     open     Implicitly created (auto staging).

      
1.7

Show

Name

1
show - Describe an existing staging repository

Description

1
The show command gives detailed information about an existing staging repository.
2

1.7.2.2 Parameters

Parameter Type Required Description
--baseURI URI false The base URI of the repository manager.
--password String true The password for the Nexus user account.
--stagingProfileId String true The staging profile ID.
--user String true The name of the Nexus user account.
--repository String true The staging repository ID.
--retryCount Integer false The number of times to retry failed HTTP requests.
--retryDelay Integer false The number of seconds to pause between retrying failed HTTP requests.

Example

1

1.7.3.1 Example

$ brooklime show --user someone --password notarealpassword --stagingProfileId c608eebdbad499e5fd3eb6d6 --repository example-1001
Created: 2020-05-03T08:53:42.449Z
Description: An example staging repository.
IP: 255.255.255.255
Notifications: 0
Policy: release
Profile ID: c608eebdbad499e5fd3eb6d6
Profile name: com.example
Profile type: repository
Provider: maven2
Release repository ID: releases
Release repository name: Releases
Repository URI: https://oss.sonatype.org/content/repositories/example-1001
Repository: example-1001
Transitioning: false
Type: open
Updated: 2020-05-03T08:53:48.313Z
User ID: someone
User agent: Brooklime/0.0.1 (com.io7m.brooklime.vanilla/0.0.1)

      
1.8

Upload

Name

1
Upload - Upload files to staging repositories

Description

1
The upload command uploads files to a staging repository. The command will recurse into the directory named by --directory and upload every regular file it encounters. Uploads of individual files are retried up to --retryCount times, pausing --retrySeconds seconds between attempts.
2

1.8.2.2 Parameters

Parameter Type Required Description
--baseURI URI false The base URI of the repository manager.
--password String true The password for the Nexus user account.
--stagingProfileId String true The staging profile ID.
--user String true The name of the Nexus user account.
--repository String true The staging repository ID.
--directory Path true The directory containing files.
--retrySeconds Long false The number of seconds to wait between retries of failed uploads.
--retryCount Integer false The maximum number of retries of failed uploads.
--quiet Boolean false Only log the start of file uploads - not every status update

Example

1

1.8.3.1 Example

$ brooklime upload \
--user someone \
--password notarealpassword \
--stagingProfileId c608eebdbad499e5fd3eb6d6 \
--repository example-1001
--directory /tmp/directory

brooklime: com.io7m.brooklime.cmdline.internal.BLCommandUploadToStagingRepository: INFO: [1/3] /tmp/directory/com/example/test/file0.txt: Started upload, attempt 1 of 10
brooklime: com.io7m.brooklime.cmdline.internal.BLCommandUploadToStagingRepository: INFO: [1/3] /tmp/directory/com/example/test/file0.txt: 7 bytes of 7 bytes, 7 bytes/s, 00:00:00.000 remaining
brooklime: com.io7m.brooklime.cmdline.internal.BLCommandUploadToStagingRepository: INFO: [2/3] /tmp/directory/com/example/test/file1.txt: Started upload, attempt 1 of 10
brooklime: com.io7m.brooklime.cmdline.internal.BLCommandUploadToStagingRepository: INFO: [2/3] /tmp/directory/com/example/test/file1.txt: 7 bytes of 7 bytes, 7 bytes/s, 00:00:00.000 remaining
brooklime: com.io7m.brooklime.cmdline.internal.BLCommandUploadToStagingRepository: INFO: [3/3] /tmp/directory/com/example/test/file2.txt: Started upload, attempt 1 of 10
brooklime: com.io7m.brooklime.cmdline.internal.BLCommandUploadToStagingRepository: INFO: [3/3] /tmp/directory/com/example/test/file2.txt: 7 bytes of 7 bytes, 7 bytes/s, 00:00:00.000 remaining

      
1.9

Version

Name

1
version - Show the application version

Description

1
The version command displays the current application version.

Example

1

1.9.3.1 Example

$ brooklime version
Brooklime 0.0.1

      
2

API

2.1

JavaDoc

1
Please see the included JavaDoc for API reference documentation.
io7m | single-page | multi-page