Update PackageVersion.java.in to implement Versioned.
Refactor shared properties and plugin logic into oss-parent.

Revert changes to .gitignore, now that generated sources are under target/ dir.
Add a unit test.