In general, it is recommended to have only one version of dependency in your classpath at a given time. Doing in such a way will allow you to know exactly what version of class will be used at runtime.
To avoid version conflicts try to specify your dependency like this:
<dependency>
<groupId>commons-daemon</groupId>
<artifactId>commons-daemon</artifactId>
<version>1.0.1</version>
<exclusions>
<exclusion>
<groupId>some_group</groupId>
<artifactId>some_artifact</artifactId>
</exclusion>
</exclusions>
</dependency>
Where you need to specify the groupId
and artifactId
of your conflicting artifact with version 2.5.