workDir = System.getProperty( "user.dir" );
}
File pomFile = new File( workDir, pomFileName );
PomFinder pomFinder = new PomFinder( getLogger() );
boolean foundPom = false;
if ( StringUtils.isEmpty( releaseDescriptor.getScmRelativePathProjectDirectory() ) )
{
foundPom = pomFinder.parsePom( pomFile );
}
File workDirectory;
if ( simulate )
{
workDirectory = new File( releaseDescriptor.getWorkingDirectory() );
}
else
{
workDirectory = new File( releaseDescriptor.getCheckoutDirectory() );
}
if ( foundPom )
{
File matchingPom = pomFinder.findMatchingPom( workDirectory );
if ( matchingPom != null )
{
getLogger().info( "Invoking perform goals in directory " + matchingPom.getParent() );
// The directory of the POM in a flat project layout is not
// the same directory as the SCM checkout directory!