Maven-导入本地 Jar 包
2024-09-01 21:02:59
导入
一个 Jar 包
<dependency>
<groupId>local</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>3.3.1</version>
<scope>system</scope>
<systemPath>${pom.basedir}/src/main/webapp/WEB-INF/lib/aliyun-java-sdk-core-3.3.1.jar</systemPath>
</dependency>
多个 Jar 包,配置 maven-compiler-plugin 插件
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>-extdirs</arg>
<arg>${project.basedir}/src/main/webapp/WEB-INF/lib</arg>
</compilerArgs>
</configuration>
</plugin>
打包
war 包
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>${project.basedir}/src/main/resources/lib/</directory>
<targetPath>WEB-INF/lib</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</webResources>
</configuration>
</plugin>
jar 包
<resources>
<resource>
<directory>${project.basedir}/src/main/resources/lib/</directory>
<targetPath>BOOT-INF/lib/</targetPath>
<includes>
<include>**/*.jar</include>
</includes>
</resource>
</resources>
https://maven.apache.org/plugins/maven-compiler-plugin/examples/pass-compiler-arguments.html
https://blog.csdn.net/catoop/article/details/48489365
最新文章
- servlet定义
- Linux命令小结:fdisk
- alibaba的FastJson(高性能JSON开发包)
- 用css3实现闪烁效果
- 零基础学习云计算及大数据DBA集群架构师【Linux系统配置及网络配置2015年12月30日周三】
- IOS网络开发实战(一)
- mimi
- VIJOS P1647 不差钱 SBT
- 加密Web.Config配置文件
- 简单设置android启动画面
- 崩溃 golang入坑系列
- Linux指令--watch,at
- Asp.Net Core 2.1+的视图缓存(响应缓存)
- Python selenium webdriver设置js操作页面滚动条
- 统计硬币 HDU - 2566 (三种解法:线性代数解法,背包解法,奇思妙想解法 >;_<; )
- 分布式监控系统Zabbix-3.0.3-完整安装记录(0)
- React Native 组建之IOS和Android通用抽屉
- WinForm中DataGridView的使用(一) - 基本使用
- vSphere Web Client 6.5 如何上传ISO文件
- Hdu1050 Moving Tables 2016-05-19 16:08 87人阅读 评论(0) 收藏
热门文章
- 总结 String、StringBuffer与StringBuilder类中常用的方法
- MySQL备份--xtrabackup与mysqldump工具使用
- liunx加载JX2410标准配置文件
- Delphi 类成员的可见性
- (十四)Linux kernel mmc 框架说明,包括mmc_test使用方法
- C 字符串几点
- C# 安装WindowsService时弹出设置服务登录窗口的解决方案
- docker 搭建zookeeper集群和kafka集群
- BIO、NIO、AIO 有什么区别?(未完成)
- Is there a difference between `==` and `is` in Python?