Package org.apache.maven.shared.release

Examples of org.apache.maven.shared.release.ReleaseFailureException


                }
            }

            if ( StringUtils.isEmpty( releaseDescriptor.getScmSourceUrl() ) )
            {
                throw new ReleaseFailureException(
                    "Missing required setting: scm connection or developerConnection must be specified." );
            }

            // As long as Scm.getId() does not exist, read it as a property
            releaseDescriptor.setScmId( rootProject.getProperties().getProperty( "project.scm.id" ) );

            try
            {
                scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor, releaseEnvironment.getSettings() );
            }
            catch ( ScmRepositoryException e )
            {
                throw new ReleaseScmRepositoryException( e.getMessage(), e.getValidationMessages() );
            }
            catch ( NoSuchScmProviderException e )
            {
                throw new ReleaseFailureException(
                    "The provider given in the SCM URL could not be found: " + e.getMessage() );
            }
        }

        boolean containsSnapshotProjects = false;

        for ( MavenProject project : reactorProjects )
        {
            if ( ArtifactUtils.isSnapshot( project.getVersion() ) )
            {
                containsSnapshotProjects = true;
            }
        }

        if ( !containsSnapshotProjects && !releaseDescriptor.isBranchCreation() )
        {
            throw new ReleaseFailureException( "You don't have a SNAPSHOT project in the reactor projects list." );
        }

        result.setResultCode( ReleaseResult.SUCCESS );

        return result;
View Full Code Here


                printSnapshotDependencies( snapshotReportDependencies, message );
                printSnapshotDependencies( snapshotExtensionsDependencies, message );
                printSnapshotDependencies( snapshotPluginDependencies, message );
                message.append( "in project '" + project.getName() + "' (" + project.getId() + ")" );

                throw new ReleaseFailureException(
                    "Can't release project due to non released dependencies :\n" + message );
            }
        }
    }
View Full Code Here

            {
                message.append( file.toString() );
                message.append( "\n" );
            }

            throw new ReleaseFailureException( "Cannot prepare the release because you have local modifications : \n"
                + message );
        }

        relResult.setResultCode( ReleaseResult.SUCCESS );
View Full Code Here

    private static void validateConfiguration( ReleaseDescriptor releaseDescriptor )
        throws ReleaseFailureException
    {
        if ( releaseDescriptor.getScmReleaseLabel() == null )
        {
            throw new ReleaseFailureException( "A release label is required for committing" );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.shared.release.ReleaseFailureException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.