我有一个漂亮的BOM表,在它的dependencyManagement部分中有很多依赖项,我想创建另一个BOM表来导入除一个之外的所有依赖项。我尝试这样做:
... in my dependencyManagement section
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot-version}</version>
<type>pom</type>
<scope>import</scope>
<exclusions>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
</exclusions>
</dependency>
...
POM在形式上是正确的,并且所有内容都可以编译。但是,这种排除只是被忽略了。我想念什么?这种方法正确吗?
我正在使用Maven 3+。
导入时排除不起作用,请尝试将其从依赖项的实际用户中排除
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句