in src/main/java/org/apache/maven/plugins/changes/ChangesCheckMojo.java [84:117]
public void execute()
throws MojoExecutionException
{
// Run only at the execution root
if ( runOnlyAtExecutionRoot && !isThisTheExecutionRoot() )
{
getLog().info( "Skipping the changes check in this project because it's not the Execution Root" );
}
else
{
if ( this.version.endsWith( "-SNAPSHOT" ) && this.skipSnapshots )
{
getLog().info( "Skipping snapshot version '" + this.version + "'." );
}
else if ( xmlPath.exists() )
{
ChangesXML xml = new ChangesXML( xmlPath, getLog() );
ReleaseUtils releaseUtils = new ReleaseUtils( getLog() );
Release release =
releaseUtils.getLatestRelease( xml.getReleaseList(), version );
if ( !isValidDate( release.getDateRelease(), releaseDateFormat, releaseDateLocale ) )
{
throw new MojoExecutionException( "The file " + xmlPath.getAbsolutePath()
+ " has an invalid release date." );
}
}
else
{
getLog().warn( "The file " + xmlPath.getAbsolutePath() + " does not exist." );
}
}
}