maven项目打ZIP包
1、Maven插件配置:
<!-- ZIP打包 -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>assemble-zip</id>
<goals>
<goal>single</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
assembly.xml配置:
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>distribution</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory>${project.basedir}/src/main/resources</directory>
<outputDirectory>/etc/</outputDirectory>
</fileSet>
<fileSet>
<directory>${project.basedir}/sbin</directory>
<outputDirectory>/sbin</outputDirectory>
<lineEnding>unix</lineEnding>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<useProjectArtifact>true</useProjectArtifact>
<outputDirectory>lib</outputDirectory>
<!-- 将scope为runtime的依赖包打包到lib目录下。 -->
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>
2、 maven打包运行主类:
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- 运行主类,如果只有一个时可以不用配置,有多个时配置。 -->
<!-- <mainClass>${start-class}</mainClass> -->
</configuration>
</plugin>
maven项目打ZIP包的更多相关文章
- IDEA中MAVEN项目打JAR包的简单方法
Idea中为一般的非Web项目打Jar包是有自己的方法的,网上一搜就能查到很多. 但是如果是为Maven项目打Jar包,其实是很简单的,因为maven本身就有打Jar包的命令. 最简单的方法 ...
- idea中maven项目打jar包
从Eclipse换成Idea的小伙伴们可能会找不到Eclipse中Maven项目打jar包的方法,因为eclipse只需要在工程上点击右键,右键菜单中就有Maven打包的相关选项. 然而Idea的右键 ...
- Maven项目导出jar包,包含依赖
1. Maven项目导出jar包,包含依赖:mvn dependency:copy-dependencies package 2. 可以在Project创建lib文件夹,输入以下命令:mvn depe ...
- Eclipse中Maven项目添加jar包
各个标签的含义如下: Overview:显示maven项目的一些基本信息Dependencies:添加jar包的页面Plugins:添加maven插件的页面.比如tomcat-maven-plugin ...
- 解决eclipse maven 项目重新下载包这个问题
问题:eclipse项目使用maven下载依赖包,但是有时候断网什么来着就不会自动下载了,挺蛋疼了. 所以,需要我们重新更新项目下载呢. 首先是要在maven的conf文件下setting.xml配置 ...
- 转:maven项目添加jar包.
很多新手都不知道如何在maven项目里添加jar包. 以前我还没接触maven的时候下载过一个demo,是maven项目. 我居然是照着他的pom.xml文件一个一个的写!!! 很多人认为理所当然的东 ...
- 关于使用命令添加jar进自己的pom文件中-maven项目添加jar包
现在几乎开发项目都是使用的maven项目,但是有的时候可以使用比较偏门或者新的jar可能在网上搜不到在pom文件里的配置应该如何写,因此写下这篇博客. 比如我现在想加入的AAA.jar这个包 打开cm ...
- java maven项目 导入jar包注意
1.将jar 包放到lib目录下 2.build path 3.点击maven主项目右键选择properties 4.选择myeclipse 下的第一个选项 5.点击add 选择archives ...
- Maven项目聚合 jar包锁定 依赖传递 私服
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...
随机推荐
- 【云计算】Docker多进程管理方案-cfengine && supervisord
docker容器内多进程的管理方案 时间 2015-05-08 00:00:00 涯余 原文 http://yayua.github.io/docker/container-process-moni ...
- MVC入门教程二[第一个小Demo](转载)
本文目标 1.了解"模型"."视图"."控制器"的创建.调试和使用过程. 本文目录 1.创建模型 2.创建视图 3.创建控制器 4.调试 5 ...
- zookeeper伪分布式集群安装
1.安装3个zookeeper 1.1创建集群安装的目录 1.2配置一个完整的服务 这里不做详细说明,参考我之前写的 zookeeper单节点安装 进行配置即可,此处直接复制之前单节点到集群目录 创建 ...
- iOS 使用 AVCaptureVideoDataOutputSampleBufferDelegate获取实时拍照的视频流
iOS 使用 AVCaptureVideoDataOutputSampleBufferDelegate获取实时拍照的视频流 可用于实时视频聊天 实时视频远程监控 #import <AVFound ...
- 3dmax做的模型导入U3d后 当模型靠近摄像机时镂空问题
使用3dMax Reset XForm下就好了. 原因可能是 法线方向问题?
- 纯css3响应式3d翻转菜单
前端开发whqet,csdn,王海庆,whqet,前端开发专家 周末快乐哈,今天来看一个纯CSS3实现的3d翻转菜单.3d响应式菜单,希望对大家有所帮助. 在线赞赏效果.在线编辑代码,或者下载收藏. ...
- Hibernate的批量操作
在实际的操作中,会经常的遇到批量的操作,使用hibernate将 100条记录插入到数据库的一个很自然的做法可能是这样的 Session session = sessionFactory.openSe ...
- Redis使用经验
首先,缓存的对象有三种: 1:数据库中单条的的数据(以表名跟id作为key永久保存到Redis),在有更新的地方都要更新缓存(不适用于需要经常更新的数据): 2:对于一些不分页,不需要实时(需要多表查 ...
- TCP协议详解(理论篇)
TCP协议详解(理论篇) 2012-08-20 0个评论 作者:陈立龙 收藏 我要投稿 TCP协议详解(理论篇) 1. 与UDP不同的是,TCP提供了一种面向连接 ...
- No enclosing instance of type Demo is accessible. Must qualify the allocation with an enclosing instance of type Demo (e.g. x.new A() where x is an instance of Demo).
No enclosing instance of type Demo is accessible. Must qualify the allocation with an enclosing inst ...