2

I use Ivy for dependency management with the IvyDE Eclipse plugin and I have dependent libraries that change quite frequently and Eclipse doesn't seem to refresh the libraries when I refresh the workspace.

<eclipse.refreshLocal depth="*" resource="/" />

Is there a way to get eclipse to refresh the Ivy libraries using an ant task, or refresh them upon a workspace refresh?

stuff22
  • 1,662
  • 4
  • 24
  • 42
  • So the libraries change, but not the name or the versions of them? – Spencer Kormos Jan 06 '12 at 22:18
  • I basically run a task as part of my script. It resolves the new versions of the dependent libraries, but the ivy.xml library doesn't refresh to display the new jars that just got resolved. – stuff22 Jan 06 '12 at 22:29
  • So you're using an Ant build, and not the standard Eclipse build mechanism? IvyDE has no knowledge of your build.xml file, and I don't know of any programmatic way to call IvyDE. – Spencer Kormos Jan 06 '12 at 22:46
  • If you're not already calling your build file from Ant Builder, maybe try that and refresh the project when activating your build there? – Spencer Kormos Jan 06 '12 at 22:48
  • Yes, ant for the build and ivy for dependency management. I would be satisfied if there was some setting in IvyDE that automatically refreshed the libraries when the project built, or changed, or something like that. But, I can't find such a setting. – stuff22 Jan 06 '12 at 22:57

4 Answers4

1

You can go in the Windows -> Preference -> on Eclipse Startup and change to Trigger Refresh

Pat B
  • 1,915
  • 23
  • 40
1

You could try to touch the ivy.xml.
This might trigger an update of ivy after a workspace refresh.

oers
  • 18,436
  • 13
  • 66
  • 75
0

To add to oers' answer and Pat B's answer above, you would need to go to Window > Preferences > Ivy, and change the following preferences:

  • Set "On Eclipse startup" to "Trigger resolve", and
  • Set "On Ivy File Change" to "Trigger resolve"

These should do the trick, especially in combination with the "touch" suggestion that oers made in his answer.

enter image description here

Community
  • 1
  • 1
Jake Toronto
  • 3,524
  • 2
  • 23
  • 27
0

Can't you use Refresh or Resolve on the right-click menu for the "ivy.xml" Eclipse Library in the project?

Spencer Kormos
  • 8,381
  • 3
  • 28
  • 45
  • I can, but I'd like for it to be seemless and part of the ant script. I don't want another manual step, if possible. – stuff22 Jan 06 '12 at 22:30