简体   繁体   English

版本控制忽略谷歌应用引擎Java应用的列表

[英]Version control ignore list for google app engine Java apps

Is there a standard list of files/directories/pattens that can be added to a version control ignore list (eg .hgignore) when version controlling the source of a Google app engine Java app? 当控制Google应用引擎Java应用程序源的版本时,是否有可以添加到版本控制忽略列表(例如.hgignore)的文件/目录/模式的标准列表?

I guess a bunch of people must have worked this out already, any good examples out there? 我想一群人必须已经解决了这个问题,有什么好的例子吗?

Standard list, maybe not, but you have some examples : 标准清单,也许不是,但你有一些 例子

syntax: regexp

\.*py[co]
\.DS_Store
~$
\.coverage
\.egg-info

syntax: glob

nbproject
app.yaml
auth.py
dist
target
WEB-INF/appengine-generated

Basically, at least any directory with generated content should be ignored. 基本上,至少应该忽略具有生成内容的任何目录。


The same principles holds true for Java app projects like this one or that one : 对于像这样那样的 Java应用程序项目,同样的原则也适用:

syntax: glob

*~
*.patch
*.sedbak
*/target/*
*/<project_name>searchindex/*
*/test-output/*

hs_err_pid*.log
tomcat

syntax: regexp
\.jar$

^\.pc/
^.ant-targets-build.xml
\.pages.xml.spdia$
temp-testng-customsuite.xml$

# eclipse and maven stuff
^target

# kde related
\.directory$

#gwt related
^<project_name>-war/war/WEB-INF/classes/
^<project_name>-war/tomcat
\.gwt-tmp$
^<project_name>-war/org.fedorahosted.<project_name>.webtrans.Application
^<project_name>-war/war/org.fedorahosted.<project_name>.webtrans.Application

Off course, I will keep any Eclipse or maven related file under source control , in order to facilitate the build step when anyone will clone the repo. 当然,我将保留任何Eclipse或maven相关文件在源代码管理下 ,以便在任何人克隆repo时促进构建步骤。

This should ignore all of the generated files (Used in a .gitignore) 这应该忽略所有生成的文件(在.gitignore中使用)

gwt-unitCache/
war/<<app-name>>/
war/WEB-INF/classes/
war/WEB-INF/deploy/

Well, with a lack of any obvious answers, I made my own up. 好吧,由于缺乏任何明显的答案,我自己做了。 Here's the .hgignore I went with, replacing [app-name-here] with the name of the app: 这是我使用的.hgignore,用应用程序的名称替换[app-name-here]:

syntax: glob
*.class
war/[app-name-here]
war/WEB-INF/classes

The repo is public if anyone is interested. 如果有人有兴趣, 回购是公开的。

I use the maven-gae-plugin and develop within eclipse. 我使用maven-gae-plugin并在eclipse中开发。 This .hgignore I often copy in new projects: 这个.hgignore我经常在新项目中复制:

\.project
\.classpath
\.settings/
^target$

Besides that, you need to consider something else: When you deploy an appengine application, the appengine sdk runtime sends a relation of files to be published along with their checksums, and only updated files are uploaded. 除此之外,您还需要考虑其他事项:当您部署appengine应用程序时,appengine sdk运行时会发送要与其校验和一起发布的文件关系,并且仅上载更新的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM