geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tianchen Jiang <>
Subject Re: [GEP] Source path lookup for web module's depending libraries.
Date Thu, 22 Apr 2010 23:42:39 GMT
RE: Eclipse not loading source codeI was able to spend some time and create
a plugin to fix this sourcepath lookup issue. Attached is the archive of my
plugin. After it is installed in your eclipse, eclipse should be able to
automatically locate the source path attached to jars. And this applies to
the jars in Maven dependencies.

You can also get the latest version on the update site:

Let me know if you have issues in using this plugin. Please also drop me a
note if you find it useful. :)

On Mon, Apr 19, 2010 at 8:34 AM, Tianchen Jiang <>wrote:

> Hi Geronimo dev-tool team,
> When I was developing a web module using Geronimo Eclipse Plugin, I was
> unable to have Eclipse to load the source code for the libraries that my web
> module depends on. To outline the steps to reproduce my problem:
> 1. Create a Dynamic Web Project in Eclipse
> 2. Enable Maven by click "Maven" -> "Enable Dependency Management"
> 3. Add a library (dependency in Maven) to my web project, for example,
> Freemarker, using Maven plugin
> 4. Attach source code by clicking "Maven" -> "Download Sources"
> 5. Launch a Geronimo server to debug my web project
> 6. Add a break point in one of Freemarker's class.
> 7. When the breakpoint is hit, Eclipse will complain that Freemarker source
> code is not found.
> When I digged deeper, I found out that my problem seems to be relatd with
> the way how the class
> ""
> is implemented. Below is a code snippet from its method
> "computeSourceContainers"
> ...
>                  // populate list of java projects and their source folders
>                 processModules(modules, javaProjectList, server, monitor);
>                // create a ProjectRuntime classpath entry for each
> JavaProject
>                 IRuntimeClasspathEntry[] projectEntries = new
> IRuntimeClasspathEntry[javaProjectList.size()];
>                 for (int i = 0; i < javaProjectList.size(); i++) {
>                         projectEntries[i] =
> JavaRuntime.newProjectRuntimeClasspathEntry((IJavaProject)
> javaProjectList.get(i));
>                 }
> ...
>                 IRuntimeClasspathEntry[] resolved =
> JavaRuntime.resolveSourceLoo
> kupPath(entries, configuration);
>                 ISourceContainer[] defaultContainers =
> JavaRuntime.getSourceCont
> ainers(resolved);
> ...
> It seems to make Eclipse add only the web project to sourcepath lookup,
> rather than the libraries it depends on.
> I feel it is a useful feature to make source code of all depending
> libraries available to Eclipse when debugging, and it seems to be a very
> intuitive way to integrate with Maven.
> Did I miss anything here? Please let me what your solution was.
> Thanks,
> Kenneth

View raw message