Read last commit of the git and commit number
<p>In maven project with Git source code, Is it possible whenever I am compiling a build with maven, to read the last commit of the git and commit number.</p>

<p>I want to use that commit number to be able to find the last commit.</p>