Akash Jain
Akash Jain

Reputation: 730

Plugin Management: Unable to get desired dependency version

I'm trying to build a spring-boot project, in my plugin management i want the plugin to override it's base dependency and take and upgraded dependency, but i'm unable to do it,

this is the plugin

               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.13.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>commons-io</groupId>
                            <artifactId>commons-io</artifactId>
                            <version>2.14.0</version>
                            <exclusions>
                                <exclusion>
                                    <groupId>commons-io</groupId>
                                    <artifactId>commons-io</artifactId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                    </dependencies>
                </plugin>

here commons-io is internally taking 2.12.0 version but i want it to take `2.14.0' version, i tried almost everything

when i run mvn help:effective-pom it show's the updated commons-io version but when i run mvn dependency:tree -Dverbose i keep getting the older version, infact it never use's the 2.14.0 version at all.

How do i force it to use the updated version?

Upvotes: 0

Views: 17

Answers (0)

Related Questions