1 <!-- war包 打包时排除jar包或者文件 支持正则表达式 --> 2 <plugin> 3 <groupId>org.apache.maven.plugins</groupId> 4 <artifactId>maven-war-plugin</artifactId> 5 <version>2.4</version> 6 7 <configuration> 8 <warName>screen</warName> 9 <outputDirectory>target</outputDirectory> 10 <!-- 排除 --> 11 <packagingExcludes> 12 WEB-INF/classes/*jdbc.properties, 13 WEB-INF/classes/*config.properties, 14 regex[WEB-INF/lib/(?!log4j-1|common-1).*.*.jar] 15 </packagingExcludes> 16 </configuration> 17 </plugin>
排除第三方依赖
1 <dependency> 2 <groupId>org.springframework.boot</groupId> 3 <artifactId>spring-boot-starter-web</artifactId> 4 <exclusions> 5 <exclusion> 6 <groupId>ch.qos.logback</groupId> 7 <artifactId>logback-classic</artifactId> 8 </exclusion> 9 </exclusions> 10 </dependency>
想替换第三方jar包,增加版本号
原文地址:https://www.cnblogs.com/10fly/p/9894804.html
时间: 2024-10-11 07:06:24