[BREAKGLASS] Maven plugin to upload files to s3 https://github.com/bazaarvoice/s3-upload-maven-plugin
Go to file
2021-07-30 13:10:47 -05:00
src/main/java/com/bazaarvoice/maven/plugins/s3/upload Add optional region to plugin parameters 2021-07-26 11:31:23 -05:00
.gitignore Allow for uploading of directories 2013-12-30 22:56:03 -06:00
LICENSE.md Adding Apache 2.0 license, per https://bits.bazaarvoice.com/jira/browse/GIT-1281 2016-07-22 15:50:27 -05:00
OWNERS Adding LICENSE and OWNERS files. 2015-12-08 13:54:11 -06:00
pom.xml Update scm config in pom.xml for fork 2021-07-30 13:10:47 -05:00
readme.md Add fork notes to README.md 2021-07-29 12:58:25 -05:00

s3-upload-maven-plugin

Uploads a file or (recursively) the contents of a directory to S3.

Fork notes

Adds pre-release quality support for AWS SSO credentials.

Configuration parameters

Parameter Description Required Default
bucketName The name of the bucket yes
source The source file or folder (was sourceFile before 1.2) yes
destination The destination file or destination folder (was destinationFile before 1.2) yes
recursive If this is a directory copy, recursively copy all contents (since 1.2) no false
accessKey S3 access key no if unspecified, uses the Default Provider, falling back to env variables
secretKey S3 secret key no if unspecified, uses the Default Provider, falling back to env variables
doNotUpload Dry run no false
endpoint Use a different s3 endpoint no s3.amazonaws.com
region Explicitly set a region (since 1.6) no determined from region provider chain

Example: Upload a file

<build>
  ...

  <plugins>
    ...

    <plugin>
      <groupId>com.bazaarvoice.maven.plugins</groupId>
      <artifactId>s3-upload-maven-plugin</artifactId>
      <version>1.4</version>
      <configuration>
        <bucketName>my-s3-bucket</bucketName>
        <source>dir/filename.txt</source>
        <destination>remote-dir/remote-filename.txt</destination>
      </configuration>
    </plugin>
  </plugins>
</build>

Example: Recursively upload a folder

<build>
  ...

  <plugins>
    ...

    <plugin>
      <groupId>com.bazaarvoice.maven.plugins</groupId>
      <artifactId>s3-upload-maven-plugin</artifactId>
      <version>1.4</version>
      <configuration>
        <bucketName>my-s3-bucket</bucketName>
        <source>dir</source>
        <destination>remote-dir</destination>
        <recursive>true</recursive>
      </configuration>
    </plugin>
  </plugins>
</build>