I am working with a large open source java project that uses ant and ivy for dependency management. The project itself has a ivy.xml that specify a dependency of apache's httpclient version 3.1.
<dependency org="commons-httpclient" name="commons-httpclient" rev="3.1" conf="*->master" />
However, this project contains plugins(different ivy.xml file) that I need to work with. And the plugin itself has a library that needs httpclient version 4.5.
<dependency name="httpclient" org="org.apache.httpcomponents" rev="4.5" force="true"/>
After running ant compile, I see that it has downloaded the jar package for both version. However, when I tried to use method from the 4.5 version in the plugin, it gave me a method not found error which indicates that it loads the older version.
So I am wondering if there's a way to force the plugin inside the project to use a specified version of a certain library without breaking the rest of the project? Thanks!