title: Getting name of last folder from maven ${project.basedir}
body: <p>I have the same question for Maven that someone had about Ant (<a href="https://stackoverflow.com/questions/1178462/how-can-i-get-the-name-of-the-last-folder-in-my-basedir-path-in-ant">How can I get the name of the last folder in my basedir path in Ant?</a>).</p>
  
  <p>How do you get just the last directory name from the variable ${project.basedir}?</p>
  
  <p>For example, if my pom.xml is in:</p>
  
  <p>/home/me/project/pom.xml</p>
  
  <p>Then ${project.basedir} = /home/me/project/</p>
  
  <p>I want just the directory name 'project'.</p>
  
  <p>Thanks!</p>