The Maven plugin inject-maven-plugin lets you inject Maven properties into your compiled code. Typical use case includes build info (version, build time stamp, SCM version etc.).