Java Source Attacher 1.2.4

Add this URL to your Eclipse Installation to reach this Solution's Update Site.

Learn more...

Details Group Tabs

Where can I report bugs? There is no such feature here, is it?

The Source Attacher plugin doesn't work for me, but keeps hanging. The progress bar stays active forever.

I debugged the problem to the "WebBasedArtifactorySourceCodeFinder....js" file: The assignment of values to the input forms doesn't work.
Since the assignment doesn't work, the script keeps looping forever in the "sleep while loop".

I adapted the script as the following:
ie.document.getElementsByName('groupIdField').item(0).value = groupId
ie.document.getElementsByName('artifactIdField').item(0).value = artifactId
ie.document.getElementsByName('versionField').item(0).value = version
ie.document.getElementsByName('classifierField').item(0).value = 'sources'

It would be great if the JavaScript could be adapted!

I have to add, that I tried to download sources for my commons-logging-1.2.jar.
The website in question was:

Even when I fixed the script and executed it, I saw that the search yields to two results: sources.jar and test-sources.jar.
And I saw, that the latter one is chosen and returned by the script. This doesn't seem to be correct?!

Is there any way to change where the sources are saved?
By default it's saved on C:\Users\xxxxxx\.sourceattacher but I wanted to save them inside the project so that I could share them with the rest of my team.

I tried attaching the sources of SWT and the JDT but neither of them works.
I am using Luna on Linux.

I just installed this plugin in a Kepler Eclipse and asked it to attach the source for one of the core Eclipse plugins so that I could see how it worked. Plugin sources no longer seem to be included in Eclipse releases, and I had been very frustrated trying to find them. But this Attacher found them automatically, downloaded and attached them in a few minutes.

Worked like a charm. I can't speak for other Open Source jars, but for Eclipse plugin sources, it was exactly what I needed.

It didnt work for me when I tried to attach gson-2.2.4-sources.jar to gson-2.2.4.jar
No error message, nothing happened.

I tested with Eclipse 3.8 and your specified jar file at and it worked correctly for me.

Thank you for this lovely tool! However, the option to 'Attach Java source' is grayed out for libraries that are in a different folder like say src/webroot/web-inf/lib. Also this option is grayed out when I try accessing it from the Navigator view, it's available in the Project Explorer view though. It would be nice if it can be activated for arbitrary libraries and in Navigator.

You must have the jar in the Build path of project first, the plugin cannot attach source code for any jar files not in project's Build Path.

You say in the description :

Note for Android developers:
- When programming Android projects using Google ADT plugin, the jar files inside libs folder will be added as libraries automatically but Eclipse will not allow change source code path for these libraries. This plugin can attach source code for Android libraries and will help Android developers in coding / debugging.

Now I installed your pluggin (kepler eclipse release) but I find no way of attaching the source - can I provide a file/folder URL to the my library project in the workspace ?

Please help, if this really solved the (very annoying issue) with ADT I will be sure to advertise !

Eclipse Java EE IDE for Web Developers.
Version: Kepler Release
Build id: 20130614-0229

In Package Explorer view, expand "Referenced Libraries" of your Java project, right click on your jar file(s), choose the menu "Attach java Source". That's it.

I tried installing it to the developer preview 4.3 M6 and it made all right-clicking stop working. I didn't receive any exception.

Tested today with Eclipse SDK Kepler (version 4.3). It works correctly.

Is there a way to correct the database when it attaches the wrong source jar? The plugin keeps trying to attach the jcommander source to the testng library.

Sorry but there is no way to remove wrong links, could you give me the name+version or the md5 of the jar file? I will search and remove it from database

where does this copy the source jar that it downloads?

Source code location for the plugin is /.sourceattacher/

i tried axis.jar and commons-beanutils.jar with eclipe 3.6
I select the "Attach source file" option, and after doing this, I click on a class file but eclipse says "source not found"

There are some libraries which are not easy to find the source code automatically because it is not in our database yet. For these cases, you can help by providing the URL of the source code bundle (in zip or jar format) and the database will save the URL. Next time, you or other users will find the source code automatically.