[英]how to specify the version of a plugin dependency when using Maven BOM files
I have a Maven BOM file which I import into my project pom: 我有一个Maven BOM文件,我将其导入到我的项目pom中:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>be.company.mvn</groupId>
<artifactId>be.company.mvn.bom.core</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
works fine for dependencies, and even for plugins. 适用于依赖项,甚至适用于插件。 But now I also want to control the version of the dependency of a plugin used in project pom:
但是现在我还想控制项目pom中使用的插件的依赖版本:
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
</dependency>
</plugin>
Is it possible to get this working? 有可能让这个工作吗? I want to specify the version of commons-dbcp in my BOM file without having to specify it as a dependency of the jetty plugin in the BOM file too.
我想在BOM文件中指定commons-dbcp的版本,而不必将其指定为BOM文件中jetty插件的依赖项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.