18

I use ivy with the ivy eclipse plugin to download dependencies. Works great. But how can I attach the source code for those libraries, in order to step into these libraries?

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
Jens Schauder
  • 77,657
  • 34
  • 181
  • 348

3 Answers3

14

Have you tried attaching the source configurations?

<dependencies defaultconfmapping="*->default,sources">
Robert Munteanu
  • 67,031
  • 36
  • 206
  • 278
  • doesn't seem to do anything. Does this actually work for you? Or is it just an idea? – Jens Schauder Jul 08 '09 at 05:06
  • 2
    Now it works for me as well. I had to do 'resolve' via menu. Strange, I thought it does that whenever one edits the ivy.xml ... anyway. Thanx for the help – Jens Schauder Jul 11 '09 at 04:29
  • FYI, there's an IvyDE console to get more information about what IvyDE is doing. Open the regular Eclipse console, and there's a dropdown menu giving you a list of console types. IvyDE should be in there, and if you switch to it, you'll get another menu to change the log level. – James Moore Dec 10 '12 at 01:29
  • This doesn't work for me. "ivy -verbose" shows the 'sources' being added to every fetch, and the Ivy cache shows configurations with 'sources', but I see no sources. Ivy 2.3. – dfrankow Feb 26 '13 at 23:12
2

There is an ant task that will modify the .classpath file to reference the source attachments.

Rich Seller
  • 83,208
  • 23
  • 172
  • 177
2

I use the IvyDE plugin, and it seems to automatically download and attach sources. I'm using Eclipse Kepler with Apache IvyDE 2.2.0. I didn't have to do anything special in my ivy.xml file or in my Ant build: it just works.

There is a preferences page that might relate to this. For me, it's Window > Preferences > Ivy > Source/Javadoc Mapping:

enter image description here

Those settings affect your entire workspace.

Jake Toronto
  • 3,524
  • 2
  • 23
  • 27