pom忽略依赖的子依赖的子依赖
时间: 2024-02-11 15:08:33 浏览: 20
如果你想要忽略某个依赖的子依赖的子依赖,你需要在 `<exclusions>` 标签中嵌套另一个 `<exclusion>` 标签。示例如下:
```
<dependencies>
<dependency>
<groupId>com.example</groupId>
<artifactId>example-library</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<groupId>com.example</groupId>
<artifactId>example-dependency</artifactId>
<exclusions>
<exclusion>
<groupId>com.example</groupId>
<artifactId>example-sub-dependency</artifactId>
</exclusion>
</exclusions>
</exclusion>
</exclusions>
</dependency>
</dependencies>
```
在上面的示例中,我们忽略了 `com.example:example-library` 依赖中的 `com.example:example-dependency` 子依赖中的 `com.example:example-sub-dependency` 子依赖。