空包作用
作用:强制排除所有对该包的依赖;
空包制作
- 构建一个空包pom.xml,如下图所示:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Maven POM -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>99.0-does-not-exist</version>
<packaging>jar</packaging>
</project>
- 本地打包:mvn install;
- 发布到maven仓库:mvn deploy;