How to attach source code of libraries downloaded

2019-01-22 13:24发布

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?

3条回答
Melony?
2楼-- · 2019-01-22 13:51

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

查看更多
ら.Afraid
3楼-- · 2019-01-22 14:03

Have you tried attaching the source configurations?

<dependencies defaultconfmapping="*->default,sources">
查看更多
劫难
4楼-- · 2019-01-22 14:08

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.

查看更多
登录 后发表回答