google plugin/build deletes .svn directory in src/main/webapp

125 views
Skip to first unread message

David Durham

unread,
Apr 27, 2011, 11:21:30 AM4/27/11
to google-web-toolkit
Hi all,

I set my project up so that gwt will build to src/main/webapp, but I
also check in src/main/webapp to subversion. index.html, web.xml,
etc. When I run the project in eclipse, the build process or google
plugin will delete all the .svn directories. I have tried one
suggested solution where I add .svn/ to filtered resources in
preferences -> java/compiler/building and uncheck scrub output
folders.

So far this hasn't worked. Anyone have a suggestion?

Thanks,
Dave

David Durham

unread,
Apr 27, 2011, 11:37:49 AM4/27/11
to google-web-toolkit
On Wed, Apr 27, 2011 at 10:21 AM, David Durham
<david.d...@gmail.com> wrote:
>When I run the project in eclipse, the build process or google
> plugin will delete all the .svn directories.

I should say, it will delete all .svn directories in the
src/main/webapp tree. So it will delete:

src/main/webapp/.svn/
src/main/webapp/WEB-INF/.svn/

and so on.

This is a maven project, and I use m2eclipse. Not sure if this is
related. When I run the maven build from the command line, it leaves
the .svn directories in src/main/webapp intact.

Thanks,
Dave

Wojciech O.

unread,
Apr 27, 2011, 11:56:21 AM4/27/11
to Google Web Toolkit
It might be the javascript validation turned on in eclipse, disable it
under "Validators" in project properties

On 27 Kwi, 17:37, David Durham <david.durham...@gmail.com> wrote:
> On Wed, Apr 27, 2011 at 10:21 AM, David Durham
>

David Durham

unread,
Apr 27, 2011, 12:04:08 PM4/27/11
to google-we...@googlegroups.com
I had already disabled all "Validators" and disabled the Javascript
Validator under "builders".

Actually, I think I found it. I had to make sure project properties
-> google -> web application " launch and deploy from this directory"
was checked.

See attached.

> --
> 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.
>
>

gwt.png

Christien Lomax

unread,
Apr 27, 2011, 12:52:34 PM4/27/11
to google-we...@googlegroups.com
Are you setting the war directory to the web app directory instead of the target/snapshot??  This caused the issue for us.

Eugen Paraschiv

unread,
May 19, 2011, 7:03:10 AM5/19/11
to google-we...@googlegroups.com
Having the same issue. Yes, the war directory is in src/main/webapp instead of in targets. Any know info on this being handled?
Thanks.

Eugen Paraschiv

unread,
Aug 4, 2011, 4:18:21 AM8/4/11
to google-we...@googlegroups.com
This is a critical problem - the plugin simply removes the .svn directories, completely messing up the entire workspace - everything below webapp is now unversioned and shown to be committed. Is there any feedback on this?
Thanks.

Michael Vogt

unread,
Aug 4, 2011, 4:31:34 AM8/4/11
to google-we...@googlegroups.com
Hello

> This is a critical problem - the plugin simply removes the .svn directories,
> completely messing up the entire workspace - everything below webapp is now
> unversioned and shown to be committed. Is there any feedback on this?
>

Do you mean that when you compile your application, everything inside
the module folder is replaced? We solve this with the additional
compiler argument '-war <foldername>'. That way the compiled files are
saved in the specified folder.

Hope I understood you correctly,
Michael

Eugen Paraschiv

unread,
Aug 4, 2011, 4:47:25 AM8/4/11
to google-we...@googlegroups.com
Something like that, yes.
Where should the '-war <foldername>' be specified?
I do indeed have it active on my run configurations, but the actual Eclipse builder that's running in the background is the one that is likely responsible with the removal of the svn dirs. I also have the war directory correctly specified in the properties of the project, under Google - Web Application, but when configuring a new Eclipse workspace, that option may very well be configured minutes later, when the Eclipse builder may already have removed the svn directories (which is what just happened to me). What I'm not clear about is what does the plugin have to do with the svn directories? Why does it touch these directories in the first place?
Thank you for the help and the quick response.
Eugen.

l.denardo

unread,
Aug 4, 2011, 5:06:04 AM8/4/11
to Google Web Toolkit
Are you using GWT in an Eclipse Web project?
If so you must *closely* follow the directions here:

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

This means you must:
*Turn off the "deploy from this directory" option
*Point the -war directory for your devmode to the *temporary* server
directory used by eclipse.

Then when you compile Eclipse will ask you where your real war
directory is and compile into it.

If you use your "real" war directory with the plugin in a web project,
any time you start GWT devmode your war directory will be cleared and
gwt plugin will recreate it without hidden directories like the .svn.
I had the same issue and solved it by pointing the devmode war
directory as stated in the faq linked above.

Also be careful that the -war option for devmode will be resetted when
you upgrade your plugin, so you'll have to correct it by hand.

Hope this can be helpful.
Regards
Lorenzo

On Aug 4, 10:47 am, Eugen Paraschiv <hanrisel...@gmail.com> wrote:
> Something like that, yes.
> Where should the '-war <foldername>' be specified?
> I do indeed have it active on my run configurations, but the actual Eclipse
> builder that's running in the background is the one that is likely
> responsible with the removal of the svn dirs. I also have the war directory
> correctly specified in the properties of the project, under Google - Web
> Application, but when configuring a new Eclipse workspace, that option may
> very well be configured minutes later, when the Eclipse builder may already
> have removed the svn directories (which is what just happened to me). What
> I'm not clear about is what does the plugin have to do with the svn
> directories? Why does it touch these directories in the first place?
> Thank you for the help and the quick response.
> Eugen.
>

Michael Vogt

unread,
Aug 4, 2011, 5:12:34 AM8/4/11
to google-we...@googlegroups.com
> Something like that, yes.
> Where should the '-war <foldername>' be specified?
>
When you click the red folder button in the toolbar of eclipse to
compile a project, you find an advanced area in the dialog that is
shown. There you have the additional compiler argument area to add the
-war switch.

> I do indeed have it active on my run configurations, but the actual Eclipse
> builder that's running in the background is the one that is likely
> responsible with the removal of the svn dirs. I also have the war directory
> correctly specified in the properties of the project, under Google - Web
> Application, but when configuring a new Eclipse workspace, that option may
> very well be configured minutes later, when the Eclipse builder may already
> have removed the svn directories (which is what just happened to me). What
> I'm not clear about is what does the plugin have to do with the svn
> directories? Why does it touch these directories in the first place?
>

Sorry, can't help here, since I have not seen this problem in my
projects (which are also store in svn.


> Thank you for the help and the quick response.
>

You're welcome.


Greetings,
Michael

Eugen Paraschiv

unread,
Aug 4, 2011, 6:56:14 AM8/4/11
to google-we...@googlegroups.com
That makes sense, thanks. I will put the suggested best practice into...practice.
However, should the compilation process be a little smarter, perhaps clearing out the directories it knows it created itself, and not the entire war directory? If this were the case, then the module directories would be cleared (which is fine, they don't have .svn anyways) but the rest of the files will be ignored, because they're not generated files in the first place. Also, a complicated setup with 2 war directories wouldn't be necessary.
Again, thanks for the help and the quick response.
Eugen.

Eugen Paraschiv

unread,
Aug 4, 2011, 6:57:05 AM8/4/11
to google-we...@googlegroups.com
About the war option, I am using it, only I was pointing it to my actual war directory and not a temporary one.
Thanks for the help.
Eugen.

Michael

l.denardo

unread,
Aug 4, 2011, 7:04:03 AM8/4/11
to Google Web Toolkit
I'm glad to hear it helped.
I agree having this setup is a bit cumbersome and the whole process
could be smarter.

Anyway it looks like it's just devMode behavior, and I'm happy to have
a complete development environment despite these little quirks.
I think an update to documentation to better explain WHY you should
not point your war directory to the actual war, and a better evidence
of the correct setting in the guide, should be the optimum solution.

Regards
Lorenzo

On Aug 4, 12:57 pm, Eugen Paraschiv <hanrisel...@gmail.com> wrote:
> About the war option, I am using it, only I was pointing it to my actual war
> directory and not a temporary one.
> Thanks for the help.
> Eugen.
>
Reply all
Reply to author
Forward
0 new messages