[ann] new run (compile) target proposal

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

[ann] new run (compile) target proposal

Postby peterblazejewicz » Mon Feb 25, 2008 2:14 pm

hi,

I have feature request that I want to put into discussion: new compile task;

Background: to compile project in GWT (toolkit) usually new modified ant task (maven, etc) is required which allows to compile sources and then run gwt compiler and produce output without starting hosted mode browser and launching default browser,
GWT designer offers Run/Debug/Test tasks,
How new run task (compile project) could be helpful?
I had at lest 3 different concrete reasons to write ant task (in GWT designer I had to create Ant task from scratch):
- target runtime is not supported either by browser in desktop version or in hosted mode. For example that could be Air runtime or google gadgets. Adobe Air is more obvious to me
- browser used in hosted mode and in design view do not support features required: these could be for example using Safari CSS3 additions. To see them live I can use Safari Windows browser version.
- using generated output in different project, e.g. in server side code. Take as example Grails development. To run in "-noserver" option I had to have 4 already compiled output files that are to be ported to server before "-noserver" mode can be run succesfully,

I real live examples I had 2 different projects: one for GWT Designer and second for Adobe AIR (using Aptana plugin). Air requires compield output, so after making some changes I would smply run compile target and then update other project and run it again, etc,

what do you guys think?

regards,
Peter
Last edited by peterblazejewicz on Thu Mar 20, 2008 3:40 pm, edited 1 time in total.
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: new run (compile) target proposal

Postby Konstantin.Scheglov » Mon Feb 25, 2008 11:38 pm

What is wrong with writing your own ANT script to perform operations that you want?
You can do just anything - compile, copy into other projects, etc.
ANT is very good and easy tool, this is why we use it for deployment.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: new run (compile) target proposal

Postby peterblazejewicz » Tue Feb 26, 2008 3:48 am

Konstantin.Scheglov wrote:What is wrong with writing your own ANT script to perform operations that you want?

hi Konstantin,
ant is cool and as written I've been already using it (becuase there is no other way),
But every IDE usually puts "forget build files" motto and GWT Designer already do the same, with GWT Toolkit Ant can be generated with shell command and i can then simply import project and apply GWT Designer nature to it (though compile target needs to be added),
"Compile" template task would eventually contains the same properties as in current "Run as GWT Application" task without hosted mode options,

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: new run (compile) target proposal

Postby Konstantin.Scheglov » Tue Feb 26, 2008 5:14 am

Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: new run (compile) target proposal

Postby peterblazejewicz » Tue Feb 26, 2008 5:28 am

hi Konstantin,

nice tip! So i can run that wizard, then modify generated targets (e.g. I left "all" and "gwt-compile"), add clean target to delete previous build ("-out" directory) if exists. (it works well, I've just tested)
Let's assume that is work around for now ;)

However if someone feels that "Compile GWT Application" target task could be usefull addition to GWT Designer please add some comments,

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: new run (compile) target proposal

Postby Eric Clayberg » Wed Feb 27, 2008 10:38 am

peterblazejewicz wrote:So i can run that wizard, then modify generated targets (e.g. I left "all" and "gwt-compile"), add clean target to delete previous build ("-out" directory) if exists.

Yes. The main reason that we generate an Ant script and then run it (as opposed to doing all of the work internally) is so that you can extend/modify the script to match your specific needs.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: new run (compile) target proposal

Postby peterblazejewicz » Tue Mar 11, 2008 6:12 am

hi Eric,

I've found creating Ant builds really counter productive thing. When I want to quickly test something by creating small new project linked to main project but also able to compile separately for quick test in real browser - that's somethign that starts to be time consuming, boring experience. That's my personal point of view because I'm not long-dated Java programmer and I have always used IDE features (NetBeans/Eclipse) to get things running without taking care about build internals.
CypalStudio has that feature built-in for regular use (as clean target/export to war implementation) in addition to standard hosted mode run/compile target:
http://www.cypal.in/studiodocs
having both targets (run in hosted mode and generate output) was usefull for me recently when testing on ipod touch: i could test different versions at the same time using gwt hosted server instance running current project and using Aptana IDE local server to host output (compiled) files on different port. Both are usefull to run on real mobile device.
This would be nice if output folder can be specified the same way as in Run target wizard using either relative or absolute paths that can be outside of project root. That way compiled ouptut can be automatically used in other kind of projects (say with Aptana IDE plugins project opened in different or the same Eclipse workspace),

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: new run (compile) target proposal

Postby Konstantin.Scheglov » Tue Mar 11, 2008 8:00 am

Hm... I don't understand you fully.
What do you mean by saying "(as clean target/export to war implementation)"?
Do you mean this (citation from Cypal) "GWT Compiler will be automatically invoked when you do a Clean build (Project->Clean) or when deploying to an external server (explained below)."?

I just don't understand what exactly you want. Can you describe this very short and precise?

For example.
When I start GWT module in hosted mode I want:
1. start this GWT module;
2. also optionally perform deployment using same parameters as during previous manual deployment;
3. "deployment" option should be in global GWT Designer preferences;
4. or... "deployment" option should be set per launch configuration, with "false" as default.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: new run (compile) target proposal

Postby peterblazejewicz » Tue Mar 11, 2008 12:39 pm

hi Konstantin,

sorry for not being clear with my statements,
here is:
#1
"Compile as GWT application" target (similiar to Run as GWT application)
#2
it should do the same steps as "Run as" targe does: clean previous output folder if any/compile sources/run compiler to produce compiler output into specified "out" directory
#3
Most common options that could be tweaked in config screen are memory argument and output folder location. All others could be the same as implemented in "Run as" dialog,

If designated the same way as current "Run as GWT appliation" target that will be possible to just right-click on project file and choose "Compile as GWT application" context option to run target with all-defaults,

"Compile" definition is little misleading because in Java we are always compiling after project is cleaned in workspace but in GWT compile means running compiler to produce translated sources.

thanks and sorry for confusion that could arise after reading previous post,

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: new run (compile) target proposal

Postby Konstantin.Scheglov » Tue Mar 11, 2008 12:51 pm

Hm...
There is already such right-click operation, in "GWT | Deploy module", or even using same action from Eclipse toolbar.
It will do all required things - compile modules using GWT compiler, build jar's for server side and archive all this as single WAR.
Then it will copy this WAR into specified output folder, from where your application server can deploy it.
All this works smoothly with Tomcat, don't know about Aptana.
Attachments
Screenshot - 11.03.2008 , 23_50_16.png
GWT module deployment
Screenshot - 11.03.2008 , 23_50_16.png (21.29 KiB) Viewed 2140 times
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: new run (compile) target proposal

Postby peterblazejewicz » Tue Mar 11, 2008 2:32 pm

hi Konstantin,
that's discussed already before:
viewtopic.php?f=11&t=1821&p=6646#p6487
yes, I can create that .war and modify created Ant build file. But thinking that way I can run GWT create project/create app commandline utils with ANT option, import into Eclipse, apply GWT Designer nature and have the same without .war with ant file available for modifications.
Konstantin: I wonder about the same option as for .war but without create war routines, just clean/compile into output directory and no ANT generated (target run based on project settings and optional task configuration settings window),

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: new run (compile) target proposal

Postby Konstantin.Scheglov » Tue Mar 11, 2008 11:58 pm

New launch configuration...
Hm...
This is fairly heavyweight...

OK, I think I found reason, how to convince myself.
When you develop generators, it would be nice to debug them in Eclipse, so "Debug as..." also can be useful, so launch configuration required. Or may be you can even profile GWT compiler. :-)

We will add such "compile" launch configuration in near future.
Konstantin.Scheglov
Moderator
 
Posts: 186
Joined: Tue Oct 18, 2005 8:11 pm
Location: Russian Federation, Lipetsk

Re: new run (compile) target proposal

Postby Eric Clayberg » Thu Mar 20, 2008 8:09 am

Give it a try in the latest build...

CompileGWTApp.png
CompileGWTApp.png (75.11 KiB) Viewed 2031 times
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: new run (compile) target proposal

Postby peterblazejewicz » Thu Mar 20, 2008 2:00 pm

thx Eric,
will do :D

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: new run (compile) target proposal

Postby peterblazejewicz » Thu Mar 20, 2008 3:40 pm

Hi Eric & Konstantin,
works a treat (tested on OSX10.5.2 so far),
hint for others: feature requires automatic workspace update feature to be enabled to see project structure updated after task ends (in general Eclipse settings),

regards,
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Next

Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests