Various fixes to Ant build in archetype.

Some of these are from @bubuntux. Thanks!