views:

42

answers:

3

Is there a standard list of files/directories/pattens that can be added to a version control ignore list (e.g. .hgignore) when version controlling the source of a Google app engine Java app?

I guess a bunch of people must have worked this out already, any good examples out there?

+3  A: 

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:

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.

VonC
Thanks very much for your suggestion, but it appears to be aimed at Python app-engine apps, and indeed both of the examples you link to are in Python. As stated in the question, I'm working on a Java app.
Tom
@Tom: good point. I have updated my answer with some example of Java app `.hgignore` file.
VonC
A: 

I use the maven-gae-plugin and develop within eclipse. This .hgignore I often copy in new projects:

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

aldrinleal
I don't use maven, and nor do I want to. Also, I don't think you should be ignoring the project classpath and .project settings. These are needed to build the project in eclipse, which people who check-out your code will want to do.
Tom
Maven generates those metadata for you. Thats the reason I put to ignore.
aldrinleal
A: 

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:

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

The repo is public if anyone is interested.

Tom