}
}
}
catch ( InvalidDependencyVersionException e )
{
throw new ReleaseExecutionException( "Failed to create dependency artifacts", e );
}
@SuppressWarnings( "unchecked" )
Set<Artifact> pluginArtifacts = project.getPluginArtifacts();
for ( Artifact artifact : pluginArtifacts )
{
if ( checkArtifact( artifact, originalVersions, artifactMap, releaseDescriptor ) )
{
boolean addToFailures;
if ( "org.apache.maven.plugins".equals( artifact.getGroupId() ) && "maven-release-plugin".equals(
artifact.getArtifactId() ) )
{
// It's a snapshot of the release plugin. Maybe just testing - ask
// By default, we fail as for any other plugin
if ( releaseDescriptor.isSnapshotReleasePluginAllowed() )
{
addToFailures = false;
}
else if ( releaseDescriptor.isInteractive() )
{
try
{
String result;
if ( !releaseDescriptor.isSnapshotReleasePluginAllowed() )
{
prompter.showMessage( "This project relies on a SNAPSHOT of the release plugin. "
+ "This may be necessary during testing.\n" );
result = prompter.prompt( "Do you want to continue with the release?",
Arrays.asList( new String[]{ "yes", "no" } ), "no" );
}
else
{
result = "yes";
}
if ( result.toLowerCase( Locale.ENGLISH ).startsWith( "y" ) )
{
addToFailures = false;
releaseDescriptor.setSnapshotReleasePluginAllowed( true );
}
else
{
addToFailures = true;
}
}
catch ( PrompterException e )
{
throw new ReleaseExecutionException( e.getMessage(), e );
}
}
else
{
addToFailures = true;