Hi Andreas,

It looks like your GEP classpath is ok based on the contents of the
Classpath tab, but it would actually be more useful to look at the exact
launch arguments, to see if there are differences between that and "mvn
gwt:run".  When you launch using GEP, switch to the Debug perspective and
right-click the appropriate java process in the Debug view (it's the one
where stack traces show up while at a breakpoint).  Select Properties from
the context menu, and you should see the full argument list in the dialog
that appears.  Compare that to the command used by "mvn gwt:run".

Also, just to verify, when you are make code changes, are you changing the
source code for client-side code only (code accessible from a GWT module
entrypoint)?  Note that if you change any server-side code or static
resources, you'll have to perform additional configuration unless you're
using a Dynamic Web project in Eclipse for Java EE.

You may want to check out the new FAQ on GEP + Maven (+ Eclipse for Java EE,
optionally):

http://code.google.com/eclipse/docs/faq.html#gwt_with_maven

It contains better instructions for enabling refresh for client-side
code/server-side code/static resources than my previous message.

Keith

On Wed, Mar 17, 2010 at 6:22 AM, andreas <horst.andrea...@googlemail.com>wrote:

> Hi Keith,
>
> I'm looking for the classpath settings now. Here's what "mvn gwt:run"
> uses:
>
> /bin/sh -c /usr/lib/jvm/java-6-sun-1.6.0.15/jre/bin/java -Xmx512m -
> classpath "/home/ahorst/workspace/App/src/main/java":"/home/ahorst/
> workspace/App/src/main/resources":"/home/ahorst/workspace/App/war/WEB-
> INF/classes":"/home/ahorst/.m2/repository/com/google/gwt/gwt-servlet/
> 2.0.3/gwt-servlet-2.0.3.jar":"/home/ahorst/.m2/repository/com/google/
> gwt/gwt-user/2.0.3/gwt-user-2.0.3.jar":"/home/ahorst/.m2/repository/
> com/google/gwt/gwt-dev/2.0.3/gwt-dev-2.0.3.jar"
> com.google.gwt.dev.DevMode -war "/home/ahorst/workspace/App/war" -gen
> "/home/ahorst/workspace/App/target/.generated" -logLevel INFO -port
> 8888 -startupUrl "com.my.example.App.Application/Application.html"
> com.my.example.App.Application
>
> While the run configuration of GEP lists the following entries:
>
> - Bootstrap Entries
>  - JRE System Library [JavaSE-1.6]
> - User Entries
>  - java - /App/src/main/
>  - resources - /App/src/main/
>  - java - /App/src/test/
>  - App (default classpath)
>    - App
>    - Maven Dependencies
>    - GWT SDK [GWT - 2.0.3]
>
> The java source folder is the first entry, but no code changes
> reflected on refresh with the GEP run configuration. "mvn gwt:run"
> though does it. Are the Bootstrap Entries conflicting here?
>
> On 15 Mrz., 21:05, Keith Platfoot <kplatf...@google.com> wrote:
> > @Andreas: Forgot to mention that if you're *not* using Eclipse for Java
> > EE, when you make changes to server-side code, you will also need to
> restart
> > GWT embedded Jetty instance.  For GWT 2.0+, click the Restart Server
> button
> > in the Development Mode view, or for older versions of GWT, the Reload
> > Server button on the Hosted Mode shell toolbar.
> >
> > Keith
> >
> > On Mon, Mar 15, 2010 at 2:27 PM, Keith Platfoot <kplatf...@google.com
> >wrote:
> >
> > > Hi Andreas,
> >
> > > It looks like you're following the correct procedure, and you indicated
> > > that you were able to load the application in devmode, but you're not
> seeing
> > > code changes reflected when you Refresh the browser.  It might help if
> I
> > > explain briefly how changes are *supposed* to be reflected, and suggest
> a
> > > few ideas for things to check if refresh is not working:
> >
> > > - Client-side code changes should *always* be reflected when you click
> > > Refresh in your browser during a devmode session, regardless of your
> source
> > > folders' build output paths.  This is because GWT devmode is actually
> using
> > > your .java source files, not the compiled .class files.  Double-check
> in
> > > your launch configuration's Classpath tab that your source folders
> appear at
> > > the top of the User Entries section.  If your gwt:run goal
> *does*correctly reflect code changes in devmode when you Refresh, it would
> be
> > > useful to compare the devmode process arguments in that case to the
> devmode
> > > process created by the Eclipse launch configuration (you can find the
> > > arguments in Eclipse by right-click > Properties the "java" process in
> the
> > > stacktrace view in the Debug perspective).  Let me know if there are
> > > differences between the two sets of arguments.
> >
> > > - Server-side code changes will only be reflected if the compiled
> .class
> > > files are propagated to your runtime WAR directory's WEB-INF/classes
> > > directory.  As you mentioned, one way to do this is to set your source
> > > folders' build output paths to your runtime WAR directory's
> WEB-INF/classes
> > > directory.  Of course, Eclipse must also be configured to build
> > > automatically (Project > Build Automatically).  If server-side code
> refresh
> > > is still not working, you might try making a change, and then manually
> > > verifying that the runtime WAR directory is getting the new .class file
> in
> > > WEB-INF/classes.
> >
> > > - Changes to your HTML/CSS/other static resources will need to be
> mirrored
> > > in your runtime WAR directory (similar to server-side code changes).
>  I'm
> > > not aware of any out-of-the-box solution for this if you're using a
> standard
> > > Eclipse distribution (Eclipse Classic or Eclipse for Java developers).
> > >  You'll need to stop devmode, do another 'mvn clean package', and then
> > > launch devmode again.  However, if you're using Eclipse for Java EE,
> there
> > > is a way to configure it to automatically push WAR resource changes
> while
> > > devmode is running (this should answer your question in your #3 step).
> >
> > > Basically, you start by converting your project into a Dynamic Web
> Project.
> > >  I don't know if you can automatically  migrate an existing project,
> but it
> > > should be possible to create a new Dynamic Web Project and then simply
> > > import your original project's source folders and build path entries.
>  Next,
> > > you'll need to configure the Eclipse project to use 'src/main/webapp'
> as
> > > your WAR directory instead of 'WebContent' (Eclipse default).  Close
> Eclipse
> > > and edit the file at: <project
> > > root>/.settings/org.eclipse.wst.common.component.  Find the
> <wb-resource>
> > > element with a 'source-path' attribute of '/WebContent'.  Change the
> > > attribute value to '/src/main/webapp', save the file, and re-open
> Eclipse.
> > >  Now, when you start the project's configured server (Tomcat, Jetty,
> etc...
> > > define a server in the Servers view), Eclipse will automatically
> propagate
> > > changes in your source code and static resource files to your runtime
> WAR
> > > directory.  However, in Eclipse for Java EE, this runtime WAR directory
> will
> > > *not* be 'target/<exploded WAR>'.  Eclipse will instead create a
> staging
> > > directory in a temporary location (by default,
> > >
> <workspace>/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/<project>)
> > > and *this* is the WAR directory you'll need to select when launching
> the
> > > Web Application launch configuration.  One more note: Eclipse for Java
> EE
> > > will also automatically push your updated .class files into
> > > <WAR>/WEB-INF/classes, so no need to manually change your source
> folders'
> > > build output paths.
> >
> > > Does that all make sense?  At launch, we'll be adding a couple new FAQ
> > > entries to our documentation to explain the process of using the Google
> > > plugin with Maven, with Eclipse for Java EE, and with both at once.
> > >  Hopefully my instructions here will suffice in the meanwhile.  Let me
> know
> > > if you need any further explanation or assistance.
> >
> > > Keith
> >
> > > On Sun, Mar 14, 2010 at 2:03 PM, andreas <
> horst.andrea...@googlemail.com>wrote:
> >
> > >> Hey Keith,
> >
> > >> thanks for this detailed information. I just went through and followed
> > >> them step by step.
> >
> > >> I started by creating a new maven project using gwt-maven archetype. I
> > >> changed its pom.xml to use current versions of GWT 2.0.3 and Java 6.
> > >> Then I enabled the GEP.
> >
> > >> 1. Set the war directoy as you said. When I first tried, I forgot to
> > >> uncheck the "launch" checkbox but did it this time.
> >
> > >> 2. Did not have to delete old launch configurations since this is a
> > >> new project. Created one by launching it via "Run As.." -> "Web
> > >> Application" from GEP
> >
> > >> 3. I use Eclipse EE. On that first launch, I pointed the runtime WAR
> > >> directory to the folder under "target" you mentioned. One thing I did
> > >> not clearly understand: you said "unless you're also using Eclipse
> > >> EE..."; well I do so where else should or could the runtime WAR
> > >> directory point to? I also did a 'mvn clean package'.
> >
> > >> 4. Yes, yes and yes. The web application is displayed in the browser
> > >> as expected.
> >
> > >> 5. Programm args:
> > >> -remoteUI ${gwt_remote_ui_server_port}:${unique_id} -startupUrl
> > >> index.html -logLevel INFO -port 8888 -war /home/ahorst/workspace/
> > >> GWTEntryApp/target/GWTEntryApp-0.0.1-SNAPSHOT
> > >> de.se.proced.GWTEntryApp.Application
> >
> > >> VM args:
> > >> -Xmx512m
> >
> > >> Working directory:
> > >> /GWTEntryApp/target/GWTEntryApp-0.0.1-SNAPSHOT
> >
> > >> So far it all worked. Unfortunately the "refresh" code changes does
> > >> not work. I set output folders of src/main/java and src/main/resources
> > >> to the WEB-INF/classes inside the working directory. Did this through
> > >> the build path configuration.
> >
> > >> Code changes are not reflected upon refresh; neither in the browser
> > >> (F5) or by restarting the server in the Development view.
> >
> > >> Nevertheless when I launch the gwt:run goal, it works.
> >
> > >> Could it be a gwt-maven property that stops "refresh" code changes?
> > >> Besides the GWT and Java version I did not change anything. I guess I
> > >> have to stick to the gwt-maven docs to find out if the exploded WAR is
> > >> not set properly.
> >
> > >> On 12 Mrz., 18:15, Keith Platfoot <kplatf...@google.com> wrote:
> > >> > Hi Andreas,
> >
> > >> > Hm, not sure why you're seeing that error.  Let me ask a few
> questions
> > >> to
> > >> > see if we can get to the bottom of this.
> >
> > >> > 1. You set the WAR directory to 'src/main/webapp' via the Google >
> Web
> > >> > Application project properties page, right?  Did you also uncheck
> the
> > >> box
> > >> > below that says 'Launch and deploy from this directory'?  This is
> > >> necessary
> > >> > because the 'src/main/webapp' directory is not a complete WAR
> directory
> > >> > (WEB-INF/lib and WEB-INF/classes are empty, etc.).
> >
> > >> > 2. Are you launching the project using the regular Run/Debug As >
> Web
> > >> > Application shortcut?  Did you make sure to first delete any other
> Web
> > >> > Application launch configurations associated with the project?
> >
> > >> > 3. When you launch, you should be prompted to select the runtime WAR
> > >> > directory.  Unless you're also using Eclipse for Java EE, you'll
> > >> probably
> > >> > want to first do a 'mvn clean package' and then select the exploded
> WAR
> > >> in
> > >> > '/target/<AppName>-<version>' as your runtime WAR.
> >
> > >> > 4. When you launch, are you seeing the Development Mode view appear
> at
> > >> the
> > >> > bottom of your workspace, with a URL to open in your browser?  Does
> the
> > >> URL
> > >> > have a ?gwt.codesvr=x.x.x.x:9997 at the end?  Does your web browser
> have
> > >> the
> > >> > GWT Development Mode plugin installed? (the browser should load a
> page
> > >> to
> > >> > prompt you if it's not installed).
> >
> > >> > 5. After you launch, what are the arguments in the generated launch
> > >> > configuration?  One of the features of 1.3 is the ability to
> > >> inspect/tweak
> > >> > the arguments via the regular Arguments tab in the launch
> configuration
> > >> > dialog.  Let me know what your exact argument set is.
> >
> > >> > Also: to see code changes reflected when you hit refresh, you'll
> need to
> > >> get
> > >> > the class files into your runtime WAR directory.  One simple way to
> do
> > >> this
> > >> > is by changing your build output path (probably just for
> src/main/java
> > >> and
> > >> > src/main/resources) to the WEB-INF/classes directory in your runtime
> > >> WAR.
> > >> >  This works, but it is a bit hacky.
> >
> > >> > Alternatively, you can convert your project into a Dynamic Web
> Project
> > >> in
> > >> > Eclipse for Java EE, which provides automatic refresh-on-change
> behavior
> > >> out
> > >> > of the box.  It also creates a staging WAR directory by default so
> you
> > >> don't
> > >> > have to use the exploded WAR under /target.  If you're interested in
> > >> this
> > >> > approach, I can send you detailed instructions (which will also
> appear
> > >> in
> > >> > our FAQs after 1.3 launch).
> >
> > >> > Keith
> >
> > >> > On Fri, Mar 12, 2010 at 8:19 AM, andreas <
> > >> horst.andrea...@googlemail.com>wrote:
> >
> > >> > > Hi Keith,
> >
> > >> > > we are happy to test the preview version.
> >
> > >> > > We are using Maven and the gwt-maven-project layout for our
> projects.
> > >> > > We loved the dependency management and also clear code structure
> > >> > > coming along with Maven but ran in the same problem
> >
> > ...
> >
> > Erfahren Sie mehr ยป
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to