uploadfiles:upload

Full name:

eu.ralph-schuster:uploadfiles-maven-plugin:1.1.1:upload

Description:

Goal that uploads a file or directory to a distribution repository.

The target "upload" is used mainly to copy simple files or directories up to a repository. It was created due to a tycho lack of publishing P2 repositories. This plugin is able to copy such directories.

Example:
<build>
<plugins>
<plugin>
<groupId>eu.ralph-schuster</groupId>
<artifactId>uploadfiles-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<goals><goal>upload</goal></goals>
<phase>deploy</phase>
</execution>
</executions>
<configuration>
<path>target/repository</path>
<targetPath>.</targetPath>
</configuration>
</plugin>
</plugins>
</build>
The example above uploads the target/repository folder to the root of the repository (specified by <distributionManagement> <repository> or <snapshotRepository>.

Pre and post commands can use variables:

  • $repository.basedir - base directory of repository
  • $repository.user - user name for repository
  • $repository.host - hostname of repository
  • $repository.id - id of repository

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: deploy.

Optional Parameters

Name Type Since Description
chmod boolean 1.0 Whether to run the "chmod" command on the remote site after the deploy. Defaults to "true".
Default value is: true.
User property is: rs.upload.chmod.
chmodMode String 1.0 The mode used by the "chmod" command. Only used if chmod = true. Defaults to "g+w,a+rX".
Default value is: g+w,a+rX.
User property is: rs.upload.chmod.mode.
chmodOptions String 1.0 The options used by the "chmod" command. Only used if chmod = true. Defaults to "-Rf".
Default value is: -Rf.
User property is: rs.upload.chmod.options.
failOnPostCommandErrors boolean 1.1 Set this to 'true' to fail in case any post command fails. You can prefix a single command with '@' so its errors will always be ignored.
Default value is: false.
User property is: rs.upload.failOnPostCommandErrors.
failOnPreCommandErrors boolean 1.1 Set this to 'true' to fail in case any pre command fails. You can prefix a single command with '@' so its errors will always be ignored.
Default value is: false.
User property is: rs.upload.failOnPreCommandErrors.
path File 1.0 File or directory to be uploaded, defaults to main artifact file.
postCommands List 1.1 Execute these remote commands after uploading. You can prefix a single command with '@' so its errors will always be ignored. Commands are executed from the user's home directory.
preCommands List 1.1 Execute these remote commands before uploading. You can prefix a single command with '@' so its errors will always be ignored. Commands are executed from the user's home directory.
project MavenProject - Project
Default value is: ${project}.
repository ArtifactRepository - repository to upload to
Default value is: ${project.distributionManagementArtifactRepository}.
skipDeploy boolean 1.0 Set this to 'true' to skip upload.
Default value is: false.
User property is: rs.upload.skip.
targetPath String 1.0 Target directory and/or target name, relative to repository root. Defaults #path.

Parameter Details

chmod:

Whether to run the "chmod" command on the remote site after the deploy. Defaults to "true".
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: rs.upload.chmod
  • Default: true

chmodMode:

The mode used by the "chmod" command. Only used if chmod = true. Defaults to "g+w,a+rX".
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: rs.upload.chmod.mode
  • Default: g+w,a+rX

chmodOptions:

The options used by the "chmod" command. Only used if chmod = true. Defaults to "-Rf".
  • Type: java.lang.String
  • Since: 1.0
  • Required: No
  • User Property: rs.upload.chmod.options
  • Default: -Rf

failOnPostCommandErrors:

Set this to 'true' to fail in case any post command fails. You can prefix a single command with '@' so its errors will always be ignored.
  • Type: boolean
  • Since: 1.1
  • Required: No
  • User Property: rs.upload.failOnPostCommandErrors
  • Default: false

failOnPreCommandErrors:

Set this to 'true' to fail in case any pre command fails. You can prefix a single command with '@' so its errors will always be ignored.
  • Type: boolean
  • Since: 1.1
  • Required: No
  • User Property: rs.upload.failOnPreCommandErrors
  • Default: false

path:

File or directory to be uploaded, defaults to main artifact file.
  • Type: java.io.File
  • Since: 1.0
  • Required: No

postCommands:

Execute these remote commands after uploading. You can prefix a single command with '@' so its errors will always be ignored. Commands are executed from the user's home directory.
  • Type: java.util.List
  • Since: 1.1
  • Required: No

preCommands:

Execute these remote commands before uploading. You can prefix a single command with '@' so its errors will always be ignored. Commands are executed from the user's home directory.
  • Type: java.util.List
  • Since: 1.1
  • Required: No

project:

Project
  • Type: org.apache.maven.project.MavenProject
  • Required: No
  • Default: ${project}

repository:

repository to upload to
  • Type: org.apache.maven.artifact.repository.ArtifactRepository
  • Required: No
  • Default: ${project.distributionManagementArtifactRepository}

skipDeploy:

Set this to 'true' to skip upload.
  • Type: boolean
  • Since: 1.0
  • Required: No
  • User Property: rs.upload.skip
  • Default: false

targetPath:

Target directory and/or target name, relative to repository root. Defaults #path.
  • Type: java.lang.String
  • Since: 1.0
  • Required: No