Alex, it sounds like you're getting JUnit 4.7 from a public repository and on that public repo JUnit 4.7 depends on the 1.1 version of Hamcrest matchers.
If you always want to get Hamcrest 1.2, one thing you can do is specify an override as a sibling of the JUnit dependency: http://ant.apache.org/ivy/history/latest-milestone/ivyfile/override.html On Mon, Jan 18, 2010 at 9:02 AM, Alex Foreman < alexander.fore...@morganstanley.com> wrote: > Hi, > Imagine this scenario. > > I have Junit 4.7.0 which depends on Hamcrest 1.1.0. > I specify the two numbers in properties in a file which can be updated. > > If i specify Both dependencies then I get the new version if the file > is update to Hamcrest 1.2.0. > > If i only specify Junit in my ivy.xml then when the file updates I > will still pickup the 1.1.0 dependency not the later 1.2.0 release as > it is found via the junit ivy file. > > In my version matcher is there any meta data that I can use to > discover if the module asked for was brought in transitively or if it > was directly specified? If there is then I can use this to make sure > that any non-specifed transitive dependencies can be forced to later > revisions automatically. > > Thanks, > > -- > Alex Foreman >