GWT 1.6项目战布局-混合源代码编译器生成的工件? [英] GWT 1.6 project war layout- mixing source code & compiler-generated artifacts?

查看:79
本文介绍了GWT 1.6项目战布局-混合源代码编译器生成的工件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚结束了一个基于GWT-1.5的项目,我来看看迁移到1.6所要做的工作.令我惊讶的是,GWT似乎想将其编译后的输出写入war目录,您通常会在该目录中对项目进行源代码控制.

Having just wrapped up a GWT-1.5 based project, I'm taking a look at what we'll have to do to migrate to 1.6. I'm very surprised to see that GWT seems to want to write its compiled output to the war directory, where you would normally have items under source control.

这背后的原因是什么? Google真的认为这是个好主意吗?是否有一种解决方法可将源代码与编译器生成的工件分开?我还有其他原因吗?

What's the reason behind this? Did Google really think this was a good idea? Is there a workaround to keep source code separate from compiler-generated artifacts? Is there some other reason for this that I'm missing?

编辑:

建议我使用-war选项指定输出目录.我写了一些ANT脚本,并且大多数情况下都能正常工作.我必须将静态资源(例如HTML,JSP等)复制到此目录中(我使用的是target/war, maven风格).那是大多数人在做什么吗?还是只是让GWT将其输出写入源代码控制的war目录中,并告诉VCS忽略非版本控制的文件?在我看来,让GWT直接写入此目录可能会有一些好处,因为这样Jetty可以自动注意到对JSP,HTML等的更改,而不必进行复制以使这些更改可见.

It's been suggested that I use the -war option to specify an output directory. I wrote some ANT scripts, and have this mostly working. I've had to copy over my static resources such as HTML, JSPs, etc into this directory (I'm using target/war, maven-style). Is that what most people are doing? Or are you just letting GWT write its output into your source-code-controlled war dir, and telling your VCS to ignore the non-version-controlled files? It occurred to me that there might be some benefit to letting GWT write to this dir directly, since then Jetty could automatically notice changes to JSPs, HTML etc, and avoid having to do a copy to make these changes visible.

推荐答案

Salvador Diaz提供了

Salvador Diaz has provided an excellent solution to this.

这篇关于GWT 1.6项目战布局-混合源代码编译器生成的工件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆