maven-cdn-alioss-plugin开源项目

我要开发同款
匿名用户2017年02月23日
50阅读
开发技术Java
所属分类Web应用开发、文件上传组件
授权协议Apache

作品详情

maven-cdn-alioss-plugin 是一款阿里云oss上传插件,用于上传cdn文件(js、css、图片等)。

example1,上传源码路径

<plugin>    <groupId>com.fengjx.maven.cdn</groupId>    <artifactId>maven-cdn-alioss-plugin</artifactId>    <version>1.0.0</version>    <configuration>        <endpoint>https://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.0</version>    <configuration>        <endpoint>https://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
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论