Mojo's GWT Maven Plugin
  1. Mojo's GWT Maven Plugin
  2. MGWT-249

archetype created project missing classpath entries

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 2.2.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      gwt 2.1
      eclipse helios
      gwt-maven-plugin 2.1.1-SNAPSHOT
    • Number of attachments :
      1

      Description

      (1) Created a project by invoking:
      mvn archetype:generate -DarchetypeRepository=https://nexus.codehaus.org/content/groups/snapshots-group/ -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin -DarchetypeVersion=2.1.1-SNAPSHOT
      (2) Imported as existing project into eclipse.
      (3) Added new spring code and corresponding maven dependency.
      (4) Invoked "Run as / Web Application"

      At this point, the application is invoked in jetty but jetty reports that it finds the spring classes on the system class path, but not the web app classpath.

      So, the issue is that the gwt eclipse plugin isn't picking up jar files in the maven library when running Jetty in the context described above.

      Thanks!

        Activity

        Hide
        Olivier Lamy added a comment -

        I miss you here with " gwt eclipse plugin" : what is that ??
        AFAIK we support only maven builds.
        So if gwt:run failed or anything related to maven I can help you.
        But I cannot help you for eclipse issue

        Show
        Olivier Lamy added a comment - I miss you here with " gwt eclipse plugin" : what is that ?? AFAIK we support only maven builds. So if gwt:run failed or anything related to maven I can help you. But I cannot help you for eclipse issue
        Hide
        Chuck Irvine added a comment -

        On your website at http://mojo.codehaus.org/gwt-maven-plugin/hosted.html, it is stated:

        Google Eclipse plugin automatically handle launching the Hosted mode browser with a simple right click on your module gwt.xml file "run as > web application".

        This is the operation that I have referring to, i.e. the operation generates the classpath related errors described previously.

        Show
        Chuck Irvine added a comment - On your website at http://mojo.codehaus.org/gwt-maven-plugin/hosted.html , it is stated: Google Eclipse plugin automatically handle launching the Hosted mode browser with a simple right click on your module gwt.xml file "run as > web application". This is the operation that I have referring to, i.e. the operation generates the classpath related errors described previously.
        Hide
        Olivier Lamy added a comment -

        something is missing in the documentation : we assume you use m2e which doesn't look to be the case here.
        is it the case ?

        Show
        Olivier Lamy added a comment - something is missing in the documentation : we assume you use m2e which doesn't look to be the case here. is it the case ?
        Hide
        Chuck Irvine added a comment -

        Yes, I am running m2eclipse.

        Show
        Chuck Irvine added a comment - Yes, I am running m2eclipse.
        Hide
        Chuck Irvine added a comment -

        Hello Oliver (or anyone), any ideas on what is causing this problem? Thanks. I've tried everything that I can think of.

        Show
        Chuck Irvine added a comment - Hello Oliver (or anyone), any ideas on what is causing this problem? Thanks. I've tried everything that I can think of.
        Hide
        Chuck Irvine added a comment -

        test.zip is a very small test case. will add a comment that tells how to duplicate the problem.

        Show
        Chuck Irvine added a comment - test.zip is a very small test case. will add a comment that tells how to duplicate the problem.
        Hide
        Chuck Irvine added a comment -

        To duplicate problem:
        (1) Import unzipped project by invoking "Import.../Existing Projects into Workspace.
        (2) If you get any eclipse compile problems, invoke "Project / Clean"
        (3) Start project with "Run as / Web Application"
        (4) In Development Mode window, right click on url and invoke "open"
        (5) When app comes up in browser window, click the "Send" button.
        (6) Click "Close" button on pop up window.
        (7) Look in the eclipse console window. You should see something like:
        [WARN] Server class 'org.apache.commons.lang.StringUtils' could not be found in the web app, but was found on the system classpath

        The problem is that the jar files of the maven dependencies are not getting added to the web app classpath. In the case above the problem isn't serious since the jar is found on the system classpath. However, in other cases where classes are dynamically loaded and only the web app class path is searched, the missing classes will cause serious application, i.e. class not found errors.

        Show
        Chuck Irvine added a comment - To duplicate problem: (1) Import unzipped project by invoking "Import.../Existing Projects into Workspace. (2) If you get any eclipse compile problems, invoke "Project / Clean" (3) Start project with "Run as / Web Application" (4) In Development Mode window, right click on url and invoke "open" (5) When app comes up in browser window, click the "Send" button. (6) Click "Close" button on pop up window. (7) Look in the eclipse console window. You should see something like: [WARN] Server class 'org.apache.commons.lang.StringUtils' could not be found in the web app, but was found on the system classpath The problem is that the jar files of the maven dependencies are not getting added to the web app classpath. In the case above the problem isn't serious since the jar is found on the system classpath. However, in other cases where classes are dynamically loaded and only the web app class path is searched, the missing classes will cause serious application, i.e. class not found errors.
        Hide
        Olivier Lamy added a comment -

        replace 1) with
        1) Import unzipped project by invoking Import -> Maven Existing Maven Projects .

        Will works better with using m2e for Import.
        And again the issue here must concern the Gwt Maven Plugin !
        We try to our best to have some compliants stuff for eclipse (m2e etc) but the main goal is to get things worked when invoking maven tru cli !

        Show
        Olivier Lamy added a comment - replace 1) with 1) Import unzipped project by invoking Import -> Maven Existing Maven Projects . Will works better with using m2e for Import. And again the issue here must concern the Gwt Maven Plugin ! We try to our best to have some compliants stuff for eclipse (m2e etc) but the main goal is to get things worked when invoking maven tru cli !
        Show
        Thomas Broyer added a comment - See https://developers.google.com/eclipse/docs/faq#gwt_with_maven

          People

          • Assignee:
            Unassigned
            Reporter:
            Chuck Irvine
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: