alioss

alioss is a maven plugin for upload cdn files to aliyun-oss

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.fengjx.maven.cdn
ArtifactId

ArtifactId

maven-cdn-alioss-plugin
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

alioss
alioss is a maven plugin for upload cdn files to aliyun-oss
Project Organization

Project Organization

tech-microworld
Source Code Management

Source Code Management

https://github.com/tech-microworld/maven-cdn-alioss-plugin

Download maven-cdn-alioss-plugin

How to add to project

<plugin>
    <groupId>com.fengjx.maven.cdn</groupId>
    <artifactId>maven-cdn-alioss-plugin</artifactId>
    <version>1.0.0</version>
</plugin>

Dependencies

compile (3)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 3.0.3
org.apache.maven : maven-project jar 3.0-alpha-2
com.aliyun.oss : aliyun-sdk-oss jar 2.2.3

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上传插件,用于上传cdn文件(js、css、图片等)

example1, 上传源码路径

<plugin>
    <groupId>com.fengjx.maven.cdn</groupId>
    <artifactId>maven-cdn-alioss-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
    <configuration>
        <endpoint>http://oss-cn-shenzhen.aliyuncs.com</endpoint>
        <accessKeyId>xxxxx</accessKeyId>
        <accessKeySecret>xxxxxx</accessKeySecret>
        <!-- 上传的Bucket名称 -->
        <bucketName>bucketName</bucketName>
        <!-- oss路径前缀 -->
        <prefix>blog/assets</prefix>
        <!-- false:打印日志, true:隐藏日志 -->
        <quiet>false</quiet>
        <includes>
            <include>**/src/main/webapp/js/**</include>
            <include>**/src/main/webapp/css/**</include>
            <include>**/src/main/webapp/images/**</include>
            <include>**/src/main/webapp/skins/**</include>
        </includes>
        <excludes>
            <exclude>**/src/main/webapp/skins/**/*.ftl</exclude>
            <exclude>**/src/main/webapp/skins/**/*.properties</exclude>
        </excludes>
    </configuration>
</plugin>
mvn cdn-alioss:upload

example2, 上传编译路径

<plugin>
    <groupId>com.fengjx.maven.cdn</groupId>
    <artifactId>maven-cdn-alioss-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>
    <configuration>
        <endpoint>http://oss-cn-shenzhen.aliyuncs.com</endpoint>
        <accessKeyId>xxxx</accessKeyId>
        <accessKeySecret>xxxxx</accessKeySecret>
        <!-- 上传的Bucket名称 -->
        <bucketName>bucketName</bucketName>
        <!-- oss路径前缀 -->
        <prefix>blog/assets</prefix>
        <!-- false:打印日志, true:隐藏日志 -->
        <quiet>false</quiet>
        <baseDir>${project.build.directory}/${project.build.finalName}</baseDir>
        <includes>
            <include>**/js/**</include>
            <include>**/css/**</include>
            <include>**/images/**</include>
            <include>**/skins/**</include>
        </includes>
        <excludes>
            <exclude>**/skins/**/*.ftl</exclude>
            <exclude>**/skins/**/*.properties</exclude>
        </excludes>
    </configuration>
</plugin>
mvn package cdn-alioss:upload
com.fengjx.maven.cdn

微观世界

Versions

Version
1.0.0