"noserver" option, maven, and real-time java code compilation

47 views
Skip to first unread message

romant

unread,
Mar 11, 2010, 10:08:13 AM3/11/10
to Google Web Toolkit
Hi,
some of you definitely has some experience with the "noserver" option.
I use GWT 2.0.2, gwt-maven-plugin version 1.2.

I run my GWT application, compiled by maven with the "noserver" option
turned on, in Tomcat. In Tomcat the /webapp directory contains a
symbolic link to the /target/<myapplication> directory which is
located in my project and which is created by maven. The /target/
<myapplication> directory contains the exploded war file, so Tomcat
can easily run it. It works. When I compile it by maven it works.

The problem is that when I make a change in the java code of my
application and when I refresh the browser the changes are not visible
there. I tried to check the class files in the /target/<myapplication>/
web-inf/classes directory and it seems that they were just not
compiled automatically again when I changed the java code. Does the
development mode save the recently compiled class files somewhere
else? Or am I missing something else?

Thnx.

olivier nouguier

unread,
Mar 11, 2010, 10:34:56 AM3/11/10
to google-we...@googlegroups.com
Rather than using sym link you could use the wtp manifest to deploy the GWT stuff.

<wb-resource deploy-path="/search" source-path="war/search"/>

Then then dev mode will work (refresh) ... as long as you provide the magic url parameter :)



--
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
A coward is incapable of exhibiting love; it is the prerogative of the brave.
--
Mohandas Gandhi

romant

unread,
Mar 11, 2010, 12:08:10 PM3/11/10
to Google Web Toolkit
The thing is that I don't use maven in Eclipse, I just use maven
installed in my operating system.
There must be a configuration option available for the gwt-maven-
plugin in the pom.xml file or something like that.

I am sure not everyone uses maven integrated in Eclipse. But thanks
for the hint anyway.

> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>

romant

unread,
Mar 11, 2010, 1:21:59 PM3/11/10
to Google Web Toolkit
Maybe if someone could put here the pom.xml file and the command with
all the parameters which he uses to run maven to compile a GWT app in
the development mode, that could help. Thnx.

> > > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsubs­cr...@googlegroups.com>


> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > A coward is incapable of exhibiting love; it is the prerogative of the
> > brave.
> > --

> > Mohandas Gandhi– Skrýt citovaný text –
>
> – Zobrazit citovaný text –

Rajeev Dayal

unread,
Mar 12, 2010, 4:06:04 PM3/12/10
to google-we...@googlegroups.com
If you make a change to your CLIENT-SIDE Java code, it should be reflected in the browser, even in -noserver mode. What is the URL that you're entering into your browser? Also, when running development mode, do you have your java source folder on the runtime classpath?

The client-side .class files are not important for browser refresh; GWT performs its own compilation of the java source files (which is why the folder needs to be on the runtime classpath).

However, if you make a change in your server-side code, the compiled artifacts will not automatically be pushed to your war/WEB-INF/classes directory - you would either have to have your compilation process dump compiled artifacts in war/WEB-INF/classes, or you'd have to run some sort of maven target to update your deployment directory.

To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.

romant

unread,
Mar 13, 2010, 8:35:56 AM3/13/10
to Google Web Toolkit
Thanks for the answer Rajeev. It works now, the classpath was the
problem.

As you write that "GWT performs its own compilation of the java source


files (which is why the folder needs to be on the runtime classpath)"

I would like to know where GWT stores the compiled up-to-date client-
side classes. I checked the war/WEB-INF/classes directory but when I
modify some client-side code the corresponding class files in the
directory remain still the same, the time of their creation is not
changed. Thus the GWT compiler must store the recently compiled
classes probably somewhere else, but where, somewhere in a temp
directory?

> > > > > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsub...@googlegroups.com>
> > <google-web-toolkit%2Bunsub...@googlegroups.com>


> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > > --
> > > > A coward is incapable of exhibiting love; it is the prerogative of the
> > > > brave.
> > > > --

> > > > Mohandas Gandhi- Skrýt citovaný text -
>
> > > - Zobrazit citovaný text -


>
> > --
> > 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-we...@googlegroups.com.
> > To unsubscribe from this group, send email to

> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsub...@googlegroups.com>


> > .
> > For more options, visit this group at

> >http://groups.google.com/group/google-web-toolkit?hl=en.- Skrýt citovaný text -
>
> - Zobrazit citovaný text -

Rajeev Dayal

unread,
Mar 15, 2010, 11:46:38 AM3/15/10
to google-we...@googlegroups.com
Hi,

I think there is some sort of .tmp directory that you'll see in your war folder (or maybe as a peer of your war folder). I wouldn't necessarily rely on this though; it is an implementation detail, and could change in the future.

Is there a reason as to why you need these .class files?


Rajeev

To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages