Reputation: 183
Currently my POM.XML looks like this
dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.0.5.RELEASE</version>
</dependency>
</dependencies>
<build>
<finalName>logger.Demo</finalName>
</build>
</project>
But as soon as i append the below dependency in my above pom.xml i get a warning and few of my classes get invalidated
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.2.RELEASE</version>
</parent>
I get the following warnings in POM.xml 1) Overriding managed version 4.12 for junit 2)Overriding managed version 5.0.6.RELEASE for spring-core
Can someone explain why i am getting the above warnings and how can i resolve it
Upvotes: 0
Views: 687
Reputation: 1704
The introduction described the function of parent
. And the warnings states you should not use these dependencies witch are already defined in the parent, but with different version.
You can remove the version
section for the mentioned dependencies, like
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
Upvotes: 1