protected String getCurrentProjectVersion ( ) throws MojoFailureException { final Model model = readModel ( mavenSession . getCurrentProject ( ) ) ; if ( model . getVersion ( ) == null ) { throw new MojoFailureException ( "Cannot get current project version. This plugin should be executed from the parent project." ) ; } return model . getVersion ( ) ; }
Gets current project version from pom . xml file .