使用SVN和Eclipse正确设置GWT项目 [英] Setup a GWT Project correctly with SVN and Eclipse

查看:115
本文介绍了使用SVN和Eclipse正确设置GWT项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Eclipse和Google Web Toolkit开发一个小型项目。
这是一个(小)组项目,所以我想使用SVN。

I'm trying to develop a small project using Eclipse and the Google Web Toolkit. It's a (small) group project so I want to use SVN.

到目前为止,我已经在Eclipse中创建了一个GWT项目,并将其添加到我的SVN存储库。
问题是当我在项目中使用'compile'时,会破坏SVN的元数据,整个war目录被标记为坏。 (红色感叹号)。

So far I have created a GWT Project in Eclipse and added it to my SVN Repository. The problem is that when I use 'compile' on the project, it breaks SVN's metadata and the whole war-directory is marked as broken. (Red Exclamation mark).

然后我无法提交和/或更新 - 既不能忽略war目录,因为web.xml / appengine-web.xml当Eclipse丢失时,Eclipse投诉的文件...清理也失败。

I then cannot commit and/or update - neither can I just ignore the war directory because of the web.xml / appengine-web.xml files which Eclipse complains about when they are missing... Cleanup also fails.

到目前为止,问题 -
有没有人知道如何正确设置一个新的GWT项目与SVN?
哪些文件需要忽略?可以提交哪些文件? ...

So far the problem - Does anyone of you know how to properly set up a new GWT Project with SVN? Which files need to be ignored? Which files can be committed? ...

一个初学者友好的解决方案会很棒!

A beginner-friendly solution would be great!

提前感谢

推荐答案

在下面的答案中,我假设你没有使用Maven。我试图一般回答一下,所以下面应该适用于任何版本控制系统(我在集市)。

In the answer below I'm assuming you're not using Maven. I tried to answer generically as well so the below should apply to any version control system (I'm on Bazaar).

您要提交构成应用程序源代码(例如* .java文件)和配置元数据(例如* .xml文件)的文件。有些(像我一样)也喜欢提交Eclipse项目配置(.settings,.classpath和.project),尽管这样做有时会对其他团队成员造成一些不便,因为不同的Eclipse设置。我认为不需要猜测该项目具有的Eclipse性质或者类路径中应该是什么的便利性是值得的( Maven 帮助甚至更多,但这是一个单独的讨论)。

You want to commit the files which constitute the application source code (e.g. *.java files) and configuration metadata (e.g. *.xml files). Some (like me) also like to commit Eclipse project configuration (.settings, .classpath and .project), even though doing so might on occasion cause some inconvenience to other team members due to differing Eclipse setups. I think the convenience of not needing to guess which Eclipse natures the project has or what's supposed to be on the classpath is worth it (Maven helps even more, but that's a separate discussion).

您想要忽略构建产品的文件和文件夹(因此是临时性的,可重复性的)。对于在Eclipse中使用 Google Eclipse插件Eclipse 开发的GWT应用程序,通常是 war / WEB-INF / war / / code>, war / WEB-INF / deploy war /< module_name> 其中< module_name> 是GWT用于将GWT模块编译为JavaScript / HTML的文件夹的名称。您可能还想排除在开发模式下工作期间GWT转储日志信息的 .gwt

You want to ignore the files and folders which are build products (and hence are temporary and reproducible by nature). For GWT apps developed in Eclipse using the Google Plugin for Eclipse these are typically war/WEB-INF/classes, war/WEB-INF/deploy and war/<module_name>, where <module_name> is the name GWT uses for the folder where it places your GWT module compiled into JavaScript/HTML. You might also want to exclude .gwt where GWT dumps log information during work in Development Mode.

同样在您的项目目录中一定要忽略gwt-unitCache。这是gwt存储显示哪些单位被编译为可重用的地方。

Also in your project directory be sure to ignore the gwt-unitCache. This is where gwt stores a manifest of what units have been compiled for re-usability.

希望这有帮助。

这篇关于使用SVN和Eclipse正确设置GWT项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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