We have a git repository which contains source for a few related Java WARs and JARs. It would be nice if the Java code could somehow:
System.err.println(\"I
git rev-parse HEAD will print what you probably want (e.g. id of HEAD commit). You can make ant generate a simple Java class with this id as a static constant.
git rev-parse HEAD
HEAD