Skip to content

Success reported even if repository provisioner is unable to retrieve artifact #50

@TimothyScales

Description

@TimothyScales

If the repository provisioner is unable to retrieve the requested artifact from the source repo, it incorrectly returns a success exit code.
In MavenRepositoryProvisioner.java the reportResults() method first checks for a retrieval failure and correctly sets the value of "provisioningSuccess". It then checks for a deployment failure; if nothing was retrieved, deployment never executes, and as a result never fails, so no deployment failure is reported. At this point, the value of "provisioningSuccess" is overwritten by the "success" code from the (non-)deployment, which causes the utility to return 0 (Success) despite its failure to read from the source repository (it does log the failed retrieval to the console, however).
This is a problem when using the repository provisioner to automatically copy several files between repos inside an unattended app which needs to respond appropriately to a failure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions