maven打包 依赖jar与不依赖jar
2024-08-30 10:53:10
?xml version="1.0" encoding="UTF-8"?>
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>jar-with-dependencies</id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<unpack>false</unpack>
<scope>runtime</scope>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>/lib</directory>
</fileSet>
</fileSets>
</assembly>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
//上面为src.xml
<descriptors>
<!--<descriptor>src/main/assembly/src.xml</descriptor>-->
</descriptors>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
我们可以设置jar包的作用域 进行胖包瘦包的选择,集群环境使用<scope>provide</scope>来选择是否需要将集群 jar打进去 ,或者只打第三方jar
最新文章
- oracle--子查询--bai
- odi 12.2.1.1新特性
- 将页面打印成excel
- salesforce 零基础开发入门学习(六)简单的数据增删改查页面的构建
- [eclipse]改项目名称后tomcat连接问题解决方法
- backslash and newline separated by space
- Hadoop学习(4)-- MapReduce
- css选择器浏览器支持情况
- C#_delegate - 有返回值手工调用
- [wikioi]回家
- 5 Logistic回归(二)
- 定义一个数,它可能为正 也可能为负 var num = Math.pow(-1,parseInt(Math.random() * 2) + 1);
- storm消费kafka实现实时计算
- C# 中使用 Excel
- [原][粒子特效][spark]粒子系统system、主节点group、渲染器render
- Zabbix4.0添加端口和进程监控
- TCP和UDP协议的比较
- 如何打造高性能Web应用
- [javaSE] 数据结构(AVL树基本概念)
- constant value too large
热门文章
- 第15.8节 PyQt入门学习:Designer的界面功能介绍
- 【.Net Core】开源项目源码--门户网站--精神科医院官网
- 搭建xss-platform平台
- Server returns invalid timezone. Go to &#39;Advanced&#39; tab and set &#39;serverTimezone&#39; property manually.
- XDown单文件版 下载工具 支持磁力等多种链接方式下载
- P6772 [NOI2020]美食家
- egg的基本使用
- 算法——单词拆分 II
- Big Sur 11.0.1 让2K屏幕开启Hidpi
- Redis数据持久化(RDB、AOF)