Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to specify the version of a plugin dependency when using Maven BOM files

Tags:

maven

I have a Maven BOM file which I import into my project 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:

   <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.

like image 583
Nicolas Mommaerts Avatar asked Dec 18 '15 16:12

Nicolas Mommaerts


1 Answers

There is an opened issue for that MNG-5588 (opened in Feb 2014...). Feel free to vote for it. At the moment, only a "classic" parent pluginsManagement can be used.

like image 130
Michael Laffargue Avatar answered Oct 14 '22 00:10

Michael Laffargue