Eclipse with Glassfish 4 DEBUG source search does not work


I'm running Eclipse Kepler with Glassfish 4. I'm developing a set of bundles/plugins, which get deployed to the glassfish autodeploy folder. Also deployed to that folder are bundles from my target definition.

The problem is when debugging the source lookup for the bundles from the target doesn't work.

  • I have added the bundle pool directory to the source lookup to no avail.
  • I have added the glassfish autodeploy directory to the source lookup to no avail.

The source bundles are in both folders together with the "binary" bundles and they share the same name with the "binary" bundles except for "source", e.g.:

  • com.x.y.z_1.3.jar
  • com.x.y.z.source_1.3.jar

I can get Eclipse to recognize the source bundle correctly if instead of adding the directory I add the individual jar files. But this is cumbersome because then I have to add each jar file and also update the source lookup every time I update the target definition to a newer version.

Is there a way to make Eclipse find the correct source bundles?

If you look in configure build path , you can add a class folder or add jars manually.

You can use this plugin. It will dynamically use jars contained in a folder.