A: 

it may be complicated but it is worth the initial effort.

i do it the following way: in my project directory i have three major directories,

  • src (my own)
  • lib
  • suppl (sources / javadocs when no sources exist)

i put in suppl one zip file per library, containing the sources. in intellij this gives me not only debugger superpowers, but also javadocs.

you are right, obtaining the sources is a pain. sometimes the sources come deliveded in the .jar file of the lib, sometimes as a seperate download (my favorite) and sometimes i have to create a seperate cvs/svn dir where i can checkout the sources. i usually need to re-package them the way i like them, even if provided in a zip.

i am sceptical about maven. i just don't like to hand over my decisions about choosing libs to a program.

Andreas Petersson
A: 

we do something similar to Andreas. Our lib directory has subdirectories categorizing further. One such sub dir is source or debug which has the source JAR/ZIPs of all the jars that we want to debug. Do it once and you're good. We use an IVY repository for the jars and source jars.

anjanb
+1  A: 

Haven't seen a satisfactory solution myself.

I tend to roll my own repo, without Maven (Maven is fine, but it doesn't click with me). I run something similar to the BSD ports system, that is, one big structured tree that contains little Ant build files. These build files either checkout the source of a project, pull its dependencies from somewhere else in the tree and build it (these are for the projects I want to build- i.e., mine) or pull binaries from somewhere else (which might be an external source or my own binaries repository).

The system could easily be extended to pull src jars, but I do that manually now.

alex
A: 

This is all done automatically if you use M2eclipse (http://m2eclipse.sonatype.org).

Brian Fox
+2  A: 
Rich Seller