I have two maven projects, lets call them master and aux. Master has a dependence on aux, and also on a specific version of org.apache.httpcomponents.httpclient. Aux has a dependence on a later version of org.apache.httpcomponents.httpclient.
e.g.
<project...>
<artifactId>master</artifactId>
<groupId>com.my-company</groupId>
<dependencies>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>earlier version</version>
</dependency>
<!--<uses later version of http client>-->
<dependency>
<groupId>com.my-company</groupId>
<artifactId>aux</artifactId>
</dependency>
...
</dependencies>
...
</project>
However, aux depends on classes only found in the newer version of httpclient, and master's dependencies on httpclient aren't forwards compatible, so whichever version I exclude, REST calls fail in the expected places.
Is there a way to require aux to use the newer dependency, and master to use the older one?
I know that I can reconcile aux and master by patching them to be able to use the same dependency, but this would be far from ideal.