6

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?

Tom
  • 4,742
  • 25
  • 32
  • 1
    how about GAE jar files, located in war/WEB-INF/lib,.. they are coming along with GAE SDK, and updated each time SDK is updated :) Seen no answers about them. – tuxSlayer Oct 27 '12 at 19:54

4 Answers4

4

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.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 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 Jul 08 '10 at 12:26
  • @Tom: good point. I have updated my answer with some example of Java app `.hgignore` file. – VonC Jul 08 '10 at 18:30
2

This should ignore all of the generated files (Used in a .gitignore)

gwt-unitCache/
war/<<app-name>>/
war/WEB-INF/classes/
war/WEB-INF/deploy/
gus3001
  • 851
  • 9
  • 19
1

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
  • 4,742
  • 25
  • 32
0

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
  • 3,559
  • 26
  • 33
  • 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 Jul 08 '10 at 12:31
  • 1
    Maven generates those metadata for you. Thats the reason I put to ignore. – aldrinleal Jul 20 '10 at 17:12