oss-upload-maven-plugin

The maven plugin can upload a file to aliyun OSS.

License

License

Categories

Categories

Maven Build Tools KeY Data Data Formats Formal Verification
GroupId

GroupId

com.github.talkwithkeyboard
ArtifactId

ArtifactId

oss-upload-maven-plugin
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

oss-upload-maven-plugin
The maven plugin can upload a file to aliyun OSS.
Project URL

Project URL

https://github.com/TalkWIthKeyboard/oss-upload-maven-plugin
Source Code Management

Source Code Management

https://github.com/TalkWIthKeyboard/oss-upload-maven-plugin

Download oss-upload-maven-plugin

How to add to project

<plugin>
    <groupId>com.github.talkwithkeyboard</groupId>
    <artifactId>oss-upload-maven-plugin</artifactId>
    <version>1.0.1</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.0
com.aliyun.oss : aliyun-sdk-oss jar 3.8.0
com.google.code.gson : gson jar 2.8.6

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4

Project Modules

There are no modules declared in this project.

Oss-upload-maven-plugin

Uploads a file to aliyun OSS.

Configuration parameters

Parameter Description Required Default
endpoint Oss endpoint yes http://oss-cn-hangzhou.aliyuncs.com
accessKeyId Oss access key no
accessKeySecret Oss access value no
accessFile Oss access info file no
bucketName The name of the bucket yes
source The source file yes
destination The destination file yes

Access file example

{
  "accessKeyId": "test",
  "accessKeySecret": "test"
}

Access info chain

  • Get from ACCESS_KEY_ID,ACCESS_KEY_SECRET in System.env
  • Get from accessKeyId, accessKeySecret in Configuration
  • Get from accessFile in Configuration

Upload a file example

<plugin>
  <groupId>com.github.talkwithkeyboard</groupId>
  <artifactId>oss-upload-maven-plugin</artifactId>
  <version>1.0.1</version>
  <configuration>
    <endpoint>http://oss-cn-hangzhou.aliyuncs.com</endpoint>
    <accessKeyId>test</accessKeyId>
    <accessKeySecret>test</accessKeySecret>
    <bucketName>my-oss-bucket</bucketName>
    <source>dir/filename.txt</source>
    <destination>remote-dir/remote-filename.txt</destination>
  </configuration>
</plugin>
mvn oss-upload:oss-upload

Versions

Version
1.0.1
1.0.0