Facing Ivy issues


Initially while trying to run dev/stable or dev/1.0.x branch i got the following failure log

FAILURE LOG - https://gist.github.com/2358767

Later on diagnosing i found the cause as follows

Ivy cache directory in my machine got somehow shifted to ~/repository/local and opengamma cached all the downloaded jar’s to ~/.ivy2/cache-{user} now the jar in the ivy central repo is not updated to the latest code. Due to this OG-Financial picked the old OG-Analytics jar and tried to compile using it. It didn’t get the new OG-Analytics jar as the jar installed during ant run on OG-Analytics was copied to ~/repository/local/ instead of ~/.ivy2/cache-{user}.

My fix - Changed defaultCacheDir in common/ivysettings.xml to ~/repository/local/

Also if the OG ivy repo is not updated to the latest jar files , please do.


I would like to know why versions are not used instead of pointing to the latest version here.
Using version would have instantly solved all these issues.


That is what I was alluding to by ‘some other mechanism’. Versions might help the situation, but if we’re going to do it properly we really need to address branches as well. We’ve had a few abortive attempts at fixing the issue internally, but it’s always exposed more issues. Longer term, we need to really get it right, and to be honest, it’s only an issue we’ve really come up against fairly recently.


Had 0.9 and 1.0 checked out and built on my workstation and ran into numerous issues trying to run ExampleComponentServerDev in Eclipse. Deleted ~/.ivy, ~/repository and all of the OG-Platform directories and started again from scratch. Solved the problem with running the examples in Eclipse.

BTW The docs page for Running the Example Engine using Ant says “To run the example server from Eclipse, run com.opengamma.examples.startup.ExampleServer, by right clicking -> Run As -> Java Application”. Should this be changed to “com.opengamma.examples.ExampleComponentServerDev”?


Yes. The problem is that when we’re running in development mode we publish things with a latest.integration version and that means if you have multiple repositories on the go, then they clash. We’re investigating a possible fix by having per-clone caches and local repositories or by some other mechanism.

Thanks for the pointer about the docs, I’ll fix that.


I was trying to reproduce your problem yesterday and couldn’t seem to so I was also coming to the conclusion it was an ivy problem. We’re working on improving the ivy situation as we’ve run into problems here if you have more than one copy of OG-Platform checked out (e.g. different versions or branches), then they can interfere.

Many thanks for reposting the issue as a new discussion.