Back to Top

Download From Nexus Repository

Class Name com.midvision.rapiddeploy.plugins.artifact.nexus.task.DownloadFromNexusTask
Category Sonatype Nexus

Download From Nexus Repository Task.

Description

Download From Nexus Task. Downloads an artifact from a remote Nexus repository, to a local respository.

If the local repository does not exist, it is created. Nexus does NOT need to be installed locally.
If the local artifact already exists, it will not be downloaded again.

Examples

mavenArtifactId - The Maven artifact Id. Please see Maven documentation.
Syntax: <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>
Example: org.apache.maven:maven-profile:[1.0.0,3.0.0) - Resolves all versions between 1.0.0 and 3.0.0;
Example: org.apache.maven:maven-profile:[1.0.0,) - Resolves all versions between 1.0.0 and LATEST

artifactVersion - The version to download. In this example, if the localRepositoryPath is
/scratch/working/builds/local_repo/
and the artifactVersion is
2.2.1
, then the files are downloaded to
/scratch/working/builds/local_repo/org/apache/maven/maven-profile/2.2.1/maven-profile-2.2.1.jar

resolveDependencies If this is set to true, transitive (compile) dependencies of the artifact will be resolved (downloaded) into the local repository. If set to true in the above example, we would see:
                     				org.apache.maven:maven-profile:jar:2.2.1 resolved to /scratch/working/builds/local_repo/org/apache/maven/maven-profile/2.2.1/maven-profile-2.2.1.jar
                     				org.apache.maven:maven-model:jar:2.2.1 resolved to /scratch/working/builds/local_repo/org/apache/maven/maven-model/2.2.1/maven-model-2.2.1.jar
                     				org.codehaus.plexus:plexus-utils:jar:1.5.15 resolved to /scratch/working/builds/local_repo/org/codehaus/plexus/plexus-utils/1.5.15/plexus-utils-1.5.15.jar
                     				org.codehaus.plexus:plexus-interpolation:jar:1.11 resolved to /scratch/working/builds/local_repo/org/codehaus/plexus/plexus-interpolation/1.11/plexus-interpolation-1.11.jar
                     				org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 resolved to /scratch/working/builds/local_repo/org/codehaus/plexus/plexus-container-default/1.0-alpha-9-stable-1/plexus-container-default-1.0-alpha-9-stable-1.jar
                     				junit:junit:jar:3.8.1 resolved to /scratch/working/builds/local_repo/junit/junit/3.8.1/junit-3.8.1.jar
                     				classworlds:classworlds:jar:1.1 resolved to /scratch/working/builds/local_repo/classworlds/classworlds/1.1/classworlds-1.1.jar
                     			

Resources

The following resources may be set on this task:

Table of task Resources

Name Type Default Value Optional Description
artifactVersion java.lang.String 2.2.1 false The version to download. In this example will download the jar to: /scratch/working/builds/local_repo/org/apache/maven/maven-profile/2.2.1/maven-profile-2.2.1.jar
failOnError java.lang.Boolean true false This task will not fail the deployment on error if set to false.
localRepositoryPath java.lang.String /scratch/working/builds/local_repo true The local Maven repository path. If the repository does not exist at this location, it will be created.
mavenArtifactId java.lang.String org.apache.maven:maven-profile:[1.0.0,3.0.0) false The Maven artifact Id. Please see Maven documentation. The artifact identifier. Syntax: <groupId>:<artifactId>[:<extension>[:<classifier>]]:<version>, must not be null. Example: org.apache.maven:maven-profile:[1.0.0,3.0.0) Resolves all versions between 1.0.0 and 3.0.0; Example: org.apache.maven:maven-profile:[1.0.0,) Resolves all versions between 1.0.0 and LATEST
password java.lang.String   true Optional password to use to authenticate when connecting to the remote repository (if required).
proxyHost java.lang.String   true Optional proxy server hostname or IP address (if using a proxy connection).
proxyPassword java.lang.String   true Optional password to use to authenticate with a proxy server (if using a proxy connection).
proxyPort java.lang.String   true Optional proxy server port (if using a proxy connection).
proxyUsername java.lang.String   true Optional username to use to authenticate with a proxy server (if using a proxy connection).
remoteRepositoryUrl java.lang.String http://repo1.maven.org/maven2/ false The remote Nexus repository URL
resolveDependencies java.lang.Boolean false false Resolve the dependencies of this artifact.
skipOnFailure java.lang.String Previous Task Name true Skip current task based on the name of the previous task whether has failed or not.
username java.lang.String   true Optional username to use to authenticate when connecting to the remote repository (if required).