saiddfhi / gwt-maven

Automatically exported from code.google.com/p/gwt-maven
0 stars 0 forks source link

Improvement : launch GWT Compilation only if one src file was modified #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Compile only if something has changed in src/main directory

Patch is attached

Three parameters are added to AbstractGWTMojo
flagFile : file used to store last compilation timestamp
checkModificationsBeforeCompile : enable or disable this mechanism
(activated by default)
directoryToCheckBeforeRecompiling : directory checked for modification
(default src/main)

Can be improved by
- add a filter to ignore some files (filter actually hardcoded on ".svn")
- give multiple directory to scan
- scan pom.xml

Original issue reported on code.google.com by bertrand...@gmail.com on 24 Oct 2008 at 3:21

Attachments:

GoogleCodeExporter commented 9 years ago
We definitely need something like this.  When I get a chance I will check it 
out and
try to get it added. Thanks for the patch. 

Original comment by charlie....@gmail.com on 28 Oct 2008 at 11:10

GoogleCodeExporter commented 9 years ago
See related issue also, 152. 

Original comment by charlie....@gmail.com on 5 Nov 2008 at 9:22

GoogleCodeExporter commented 9 years ago

Original comment by charlie....@gmail.com on 5 Nov 2008 at 9:23

GoogleCodeExporter commented 9 years ago
Relevant comments from dupe issue:

--------------------------

Comment 3  by blaszczyk.jakub, Sep 24, 2008

It seems to be an issue of GWT compiler. The first time it compiles .java to 
.class,
then it compiles modules. The second time it compiles modules (.class -> 
javascript)
only.

If you take a look on GWTCompiler.distill()
[http://code.google.com/p/google-web-toolkit/source/browse/trunk/dev/core/src/co
m/google/gwt/dev/GWTCompiler.java?r=3647]
you can see the output directory is ALWAYS cleaned:

Util.recursiveDelete(outDir, true);

regardless if .java/.gwt.xml files were recompiled/modified or not.

I think we could :
a) check if this has been discussed on GWT issue tracker, and post it, if it 
wasn't
b) make the plugin track last-modification-time of all .java and .gwt.xml 
files, and
invoke the script only for modules which were modified...

------------------

Comment 4 by jon.strayer, Sep 24, 2008

I added an issue to the GWT tracker.

http://code.google.com/p/google-web-toolkit/issues/detail?id=2915

Original comment by charlie....@gmail.com on 5 Nov 2008 at 9:28

GoogleCodeExporter commented 9 years ago

Original comment by charlie....@gmail.com on 5 Nov 2008 at 9:28

GoogleCodeExporter commented 9 years ago

Original comment by charlie....@gmail.com on 24 Jan 2009 at 11:23

GoogleCodeExporter commented 9 years ago
A good short term workaround would be a system property which indicates whether
compilation should be performed or not (similar to the "maven.test.skip" system
property for Surefire).

Original comment by norbert_...@hotmail.com on 26 Jan 2009 at 10:55

GoogleCodeExporter commented 9 years ago
I believe we already have the compile skip property in the trunk right now. We 
are
debating exactly how that should be used, but good point that it could help with
this.  I will document that once we are set. 

Original comment by charlie....@gmail.com on 30 Mar 2009 at 1:48

GoogleCodeExporter commented 9 years ago
I tested this and -Dgoogle.webtoolkit.compileSkip works great from the trunk 
right
now - will document this as the workaround for next release. 

Setting this to won't fix - the real fix to do this automatically is too much 
work
for this project right now (we are merging to Codehaus, more work might be done 
there
on same tack). 

Original comment by charlie....@gmail.com on 30 Mar 2009 at 3:36