Package org.apache.maven.shared.release

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


            }
            if ( parentVersion == null )
            {
                if ( parent.getVersion().equals( originalVersions.get( key ) ) )
                {
                    throw new ReleaseFailureException( "Version for parent '" + parent.getName() + "' was not mapped" );
                }
            }
            else
            {
                rewriteValue( versionElement, parentVersion );
View Full Code Here


                                    // ignore... we cannot update this expression
                                }
                                else
                                {
                                    // the value of the expression conflicts with what the user wanted to release
                                    throw new ReleaseFailureException( "The artifact (" + key + ") requires a "
                                        + "different version (" + mappedVersion + ") than what is found ("
                                        + propertyValue + ") for the expression (" + expression + ") in the "
                                        + "project (" + projectId + ")." );
                                }
                            }
                        }
                        else
                        {
                            // the expression used to define the version of this artifact may be inherited
                            // TODO needs a better error message, what pom? what dependency?
                            throw new ReleaseFailureException( "The version could not be updated: " + rawVersion );
                        }
                    }
                }
                else
                {
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

            {
                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

                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

    {
        super.validateConfiguration( releaseDescriptor );

        if ( releaseDescriptor.isSuppressCommitBeforeTagOrBranch() && releaseDescriptor.isRemoteTagging() )
        {
            throw new ReleaseFailureException(
                "Cannot perform a remote tag or branch without committing the working copy first." );
        }
    }
View Full Code Here

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

                }
            }

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

            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 ( Iterator<MavenProject> it = reactorProjects.iterator(); it.hasNext(); )
        {
            MavenProject project = it.next();

            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

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.