springjar依赖存在
我有一个Spring应用程序(CustomerPort)。在本文中,我使用的是一个开源jar(commons-lang.2.4)。我的CustomerPort使用其他模块,如jar,它使用不同版本的“commons-lang.2.2” 由于另一个模块使用commons-lang.2.2,因此我的应用程序也推荐模块opensource jar而不是commons-lang.2.4springjar依赖存在,spring,maven,Spring,Maven,我有一个Spring应用程序(CustomerPort)。在本文中,我使用的是一个开源jar(commons-lang.2.4)。我的CustomerPort使用其他模块,如jar,它使用不同版本的“commons-lang.2.2” 由于另一个模块使用commons-lang.2.2,因此我的应用程序也推荐模块opensource jar而不是commons-lang.2.4 请告诉我如何排除Pom.xml文件中的commons-lang.2.2使用标记更正这些可传递依赖项的范围。请阅读Cus
请告诉我如何排除Pom.xml文件中的commons-lang.2.2使用
标记更正这些可传递依赖项的范围。请阅读CustomerPort的pom.xml
中有关maven依赖范围的更多信息,在这里指定对其他jar模块的依赖,您可以为commons lang
指定排除。这将防止Maven从另一个jar引入commons lang
可传递依赖项
<dependency>
<groupId>otherModuleGroupId</groupId>
<artifactId>otherModuleArtifactId</artifactId>
<version>otherModuleVersion</version>
<exclusions>
<exclusion>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</exclusion>
</exclusions>
</dependency>
otherModuleGroupId