I\'ve spent far too much time trying to figure this out. This should be the simplest thing and everyone who distributes Java applications in jars must have to deal with it.
Just don't use the manifest. Create a foo.properties.original file, with a content such as version=@VERSION@
And in ther same task you are jaring you can do a copy to copu foo.properties.original and then