if ( !"pom".equals( packaging ) )
{
if ( pomFile != null )
{
ArtifactMetadata pomMetadata = new ProjectArtifactMetadata( artifact, pomFile );
artifact.addMetadata( pomMetadata );
}
else
{
generatedPomFile = generatePomFile();
ArtifactMetadata pomMetadata = new ProjectArtifactMetadata( artifact, generatedPomFile );
if ( Boolean.TRUE.equals( generatePom )
|| ( generatePom == null && !getLocalRepoFile( pomMetadata ).exists() ) )
{
getLog().debug( "Installing generated POM" );
artifact.addMetadata( pomMetadata );