Skip to content

TalkWIthKeyboard/oss-upload-maven-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Uploads a file to aliyun OSS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages