This Pipelines Task performs a Maven project build on files in a Git repository.
This task performs the following:
Performs Maven build from input maven command.
Creates Maven configuration required for jfrog-cli.
Prerequisites
This task requires a resource that is has mvn build done and Maven configuration available.
Usage
Basic:
- task: jfrog/mvn-build@v0.0.1 id: mvn-build input: gitResourceName: "input_resource_name" # input resource name that needs a Maven build sourceLocation: "" configFileLocation: "/jfrog/" configFileName: "mvn-config" sourceSnapshotRepo: "mvn-local" sourceReleaseRepo: "mvn-release-local"
By default, the task uses JFROG_CLI_BUILD_NAME
and JFROG_CLI_BUILD_NUMBER
environment variables when building the build info.
Input Variables
Name | Required | Default | Description |
---|---|---|---|
gitResourceName | true | Resource name on which Maven build is to be performed. | |
sourceLocation | false | current directory | Specifies the location of the source files. By default this is set to the root directory of the GitRepo resource. Defaults to the root of the GitRepo. |
configFileLocation | false | Specifies the directory containing the JFrog CLI mvn-config file. | |
configFileName | false | Specifies the name of the JFrog CLI mvn-config file. | |
sourceSnapshotRepo | true | Artifactory repository to resolve snapshot dependencies. If set, sourceReleaseRepo is also required. | |
sourceReleaseRepo | true | Artifactory repository to resolve release dependencies. If set, sourceSnapshotRepo is also required. | |
publishSnapshotRepo | true | Snapshot artifacts created by the MvnBuild are uploaded to this Artifactory repository. If set, publishReleaseRepo is also required. | |
publishReleaseRepo | true | Release artifacts created by the MvnBuild are uploaded to this Artifactory repository. If set, deployerSnapshot Repo is also required. | |
command | false | clean install | Specifies a command line string of options to use with Maven. |
retry | false | false | Flag to perform retry on failure. |
Output Variables
None
Exported Environment Variables
None
How does it work?
This task uses Gradle configuration generated and jfrog cli.
License
This project is licensed under Apache 2.0 license.