From user-return-14724-apmail-geronimo-user-archive=geronimo.apache.org@geronimo.apache.org Mon Apr 19 15:57:30 2010 Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 76294 invoked from network); 19 Apr 2010 15:57:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 19 Apr 2010 15:57:30 -0000 Received: (qmail 88188 invoked by uid 500); 19 Apr 2010 15:57:30 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 88120 invoked by uid 500); 19 Apr 2010 15:57:29 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Delivered-To: moderator for user@geronimo.apache.org Received: (qmail 57916 invoked by uid 99); 19 Apr 2010 15:34:51 -0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kenneth.jiang@gmail.com designates 209.85.222.198 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=76e1YHJ4MkprSQM2+oCTC0lMIVu82IQE2pOWVqKSMxk=; b=ajHA/Etvknl/c8rBUp8FnIzWJdVovzKzPvhf1JYRWVL5/WvqPF4SSTNngVqjOathS2 0qGQANQxX913zzLQi7cf8IW1WG3ZNIQDVkQpVYzKK/EFUx5wru9aEwa358ryuIEvf44d I0aAwv/HrWjoJy79K5VaLAFmAPQfgcprXjlzQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kGRB1E2CL2FbQk+ZG1iK0NGmIqCnbqsoUc5brFpeAgHGcoYcr6sH2y5rioC/in4Ecc qgnX7LYIieRhUmK8ivV7KkR6Eh0+dZ+4h0F6rU10tFuu06grXRE95JV/9BQ9XTajXpS1 yykzHKUrJdEiXsL5GuHppIBa6FU8TOcvZQsWE= MIME-Version: 1.0 Date: Mon, 19 Apr 2010 08:34:22 -0700 Message-ID: Subject: [GEP] Source path lookup for web module's depending libraries. From: Tianchen Jiang To: user@geronimo.apache.org Content-Type: multipart/alternative; boundary=001636b2b0e4f94928048498b132 X-Virus-Checked: Checked by ClamAV on apache.org --001636b2b0e4f94928048498b132 Content-Type: text/plain; charset=ISO-8859-1 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 "org.apache.geronimo.st.core/src/main/java/org/apache/geronimo/st/core/GeronimoSourcePathComputerDelegate.java" 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 --001636b2b0e4f94928048498b132 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 co= de 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 &quo= t;Maven" -> "Enable Dependency Management"
3. Add a li= brary (dependency in Maven) to my web project, for example, Freemarker, usi= ng Maven plugin
4. Attach source code by clicking "Maven" -> "Download So= urces"
5. Launch a Geronimo server to debug my web project
6. Ad= d 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 wi= th the way how the class "org.apache.geronimo.st.core/src/main/java/or= g/apache/geronimo/st/core/GeronimoSourcePathComputerDelegate.java" is = implemented. Below is a code snippet from its method "computeSourceCon= tainers"
...
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 // populate list of= java projects and their source folders
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 processModules(modules, javaProjectList, server, monitor);<= br>
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 // create a ProjectRuntim= e classpath entry for each JavaProject
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 IRuntimeClasspathEntry[] proj= ectEntries =3D new IRuntimeClasspathEntry[javaProjectList.size()];
=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 for (int i =3D 0; i < javaPro= jectList.size(); i++) {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 projectEntries[i] =3D JavaRuntime.newProjectRuntimeCl= asspathEntry((IJavaProject) javaProjectList.get(i));
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }
...
=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 IRuntimeClasspathEntry[] resolved =3D JavaRu= ntime.resolveSourceLoo
kupPath(entries, configuration);
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ISourceContainer[] defaultContainers =3D = JavaRuntime.getSourceCont
ainers(resolved);
...

It seems to make Eclipse add only the web p= roject to sourcepath lookup, rather than the libraries it depends on.
I feel it is a useful feature to make source code of all depending librar= ies available to Eclipse when debugging, and it seems to be a very intuitiv= e way to integrate with Maven.

Did I miss anything here? Please let me what your solution was.

= Thanks,
Kenneth
--001636b2b0e4f94928048498b132--