mko*_*zun 2 java spring spring-ws dependency-management maven
我有这个依赖树:
[INFO] +- org.springframework.ws:org.springframework.ws:jar:2.1.0.RELEASE:compile
[INFO] | +- org.springframework:org.springframework.aop:jar:3.1.1.RELEASE:compile
[INFO] | | \- org.aopalliance:com.springsource.org.aopalliance:jar:1.0.0:compile
[INFO] | +- org.springframework:org.springframework.oxm:jar:3.1.1.RELEASE:compile
[INFO] | \- org.springframework.ws:org.springframework.xml:jar:2.1.0.RELEASE:compile
[INFO] | \- org.apache.ws:com.springsource.org.apache.ws.commons.schema:jar:1.3.2:compile
Run Code Online (Sandbox Code Playgroud)
我想排除(最后一个):
org.apache.ws:com.springsource.org.apache.ws.commons.schema:jar:1.3.2
这是(根据它的pom):
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
Run Code Online (Sandbox Code Playgroud)
所以我在根工件(org.springframework.ws)中定义:
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>org.springframework.ws</artifactId>
<version>2.1.0.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.apache.ws.commons.schema</groupId>
<artifactId>XmlSchema</artifactId>
</exclusion>
</exclusions>
</dependency>
Run Code Online (Sandbox Code Playgroud)
并没有什么真正的改变。我想排除的工件仍然存在。任何人都可以帮助我如何使它工作?
排除不排除单独的类。它适用于工件,即 jar 文件。您确实可以使用如下标记排除第三方依赖项:
<exclusion>
<groupId>org.apache.ws</groupId>
<artifactId>com.springsource.org.apache.ws.commons.schema</artifactId>
</exclusion>
Run Code Online (Sandbox Code Playgroud)
在哪里:
org.apache.ws 是组IDcom.springsource.org.apache.ws.commons.schema 是工件 ID(来自您的依赖树示例)。
我不认为有排除特定类的内置能力。
| 归档时间: |
|
| 查看次数: |
5762 次 |
| 最近记录: |