Package org.apache.maven.shared.release

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


            Set<Artifact> dependencyArtifacts = project.createArtifacts( artifactFactory, null, null );
            checkDependencies( originalVersions, releaseDescriptor, artifactMap, dependencyArtifacts );
        }
        catch ( InvalidDependencyVersionException e )
        {
            throw new ReleaseExecutionException( "Failed to create dependency artifacts", e );
        }
        //@todo check dependencyManagement

        @SuppressWarnings( "unchecked" )
        Set<Artifact> pluginArtifacts = project.getPluginArtifacts();
View Full Code Here


                                addToFailures = true;
                            }
                        }
                        catch ( PrompterException e )
                        {
                            throw new ReleaseExecutionException( e.getMessage(), e );
                        }
                    }
                    else
                    {
                        addToFailures = true;
View Full Code Here

                releaseDescriptor.getResolvedSnapshotDependencies().putAll( resolvedSnapshots );
            }
        }
        catch ( PrompterException e )
        {
            throw new ReleaseExecutionException( e.getMessage(), e );
        }
        catch ( VersionParseException e )
        {
            throw new ReleaseExecutionException( e.getMessage(), e );
        }
    }
View Full Code Here

                @SuppressWarnings( "unchecked" )
                Map<String, Scm> originalScmInfo = releaseDescriptor.getOriginalScmInfo();
                // check containsKey, not == null, as we store null as a value
                if ( !originalScmInfo.containsKey( projectId ) )
                {
                    throw new ReleaseExecutionException(
                        "Unable to find original SCM info for '" + project.getName() + "'" );
                }

                ScmTranslator translator = getScmTranslators().get( scmRepository.getProvider() );
                if ( translator != null )
View Full Code Here

    {
        File pomBackup = getPomBackup( project );

        if ( !pomBackup.exists() )
        {
            throw new ReleaseExecutionException(
                "Cannot restore from a missing backup POM: " + pomBackup.getAbsolutePath() );
        }

        try
        {
            ScmRepository scmRepository;
            ScmProvider provider;
            try
            {
                scmRepository =
                    scmRepositoryConfigurator.getConfiguredRepository( releaseDescriptor,
                                                                       releaseEnvironment.getSettings() );

                provider = scmRepositoryConfigurator.getRepositoryProvider( scmRepository );
            }
            catch ( ScmRepositoryException e )
            {
                throw new ReleaseScmRepositoryException( e.getMessage(), e.getValidationMessages() );
            }
            catch ( NoSuchScmProviderException e )
            {
                throw new ReleaseExecutionException( "Unable to configure SCM repository: " + e.getMessage(), e );
            }

            if ( releaseDescriptor.isScmUseEditMode() || provider.requiresEditMode() )
            {
                EditScmResult result = provider.edit( scmRepository, new ScmFileSet(
                    new File( releaseDescriptor.getWorkingDirectory() ), project.getFile() ) );

                if ( !result.isSuccess() )
                {
                    throw new ReleaseScmCommandException( "Unable to enable editing on the POM", result );
                }
            }
        }
        catch ( ScmException e )
        {
            throw new ReleaseExecutionException( "An error occurred enabling edit mode: " + e.getMessage(), e );
        }

        try
        {
            FileUtils.copyFile( getPomBackup( project ), ReleaseUtil.getStandardPom( project ) );
        }
        catch ( IOException e )
        {
            throw new ReleaseExecutionException( "Error restoring from backup POM: " + e.getMessage(), e );
        }
    }
View Full Code Here

                {
                    translateScm( project, releaseDescriptor, scmRoot, namespace, scmRepository, result, commonBasedir );
                }
                catch ( IOException e )
                {
                    throw new ReleaseExecutionException( e.getMessage(), e );
                }
            }
            else
            {
                releaseDescriptor.mapOriginalScmInfo( projectId, null );

                MavenProject parent = project.getParent();
                if ( parent != null )
                {
                    // If the SCM element is not present, only add it if the parent was not mapped (ie, it's external to
                    // the release process and so has not been modified, so the values will not be correct on the tag),
                    String parentId = ArtifactUtils.versionlessKey( parent.getGroupId(), parent.getArtifactId() );
                    if ( !releaseDescriptor.getOriginalScmInfo().containsKey( parentId ) )
                    {
                        // we need to add it, since it has changed from the inherited value
                        scmRoot = new Element( "scm" );
                        scmRoot.addContent( "\n  " );

                        try
                        {
                            if ( translateScm( project, releaseDescriptor, scmRoot, namespace, scmRepository, result,
                                               commonBasedir ) )
                            {
                                rootElement.addContent( "\n  " ).addContent( scmRoot ).addContent( "\n" );
                            }
                        }
                        catch ( IOException e )
                        {
                            throw new ReleaseExecutionException( e.getMessage(), e );
                        }
                    }
                }
            }
        }
View Full Code Here

        {
            basedir = getCommonBasedir( reactorProjects );
        }
        catch ( IOException e )
        {
            throw new ReleaseExecutionException( "Exception occurred while calculating common basedir: "
                + e.getMessage(), e );
        }

        int parentLevels =
            getBaseWorkingDirectoryParentCount( basedir, FileUtils.normalize( releaseDescriptor.getWorkingDirectory() ) );
View Full Code Here

            {
                value = interpolator.interpolate( value, new PrefixAwareRecursionInterceptor( pomPrefixes ) );
            }
            catch ( InterpolationException e )
            {
                throw new ReleaseExecutionException(
                                                     "Failed to interpolate " + value + " for project " + model.getId(),
                                                     e );
            }
        }
        return value;
View Full Code Here

                    throw new ReleaseScmCommandException( "Cannot remove release POMs from SCM", scmResult );
                }
            }
            catch ( ScmException exception )
            {
                throw new ReleaseExecutionException( "Cannot remove release POMs from SCM: " + exception.getMessage(),
                                                     exception );
            }
        }
    }
View Full Code Here

        {
            throw new ReleaseScmRepositoryException( e.getMessage(), e.getValidationMessages() );
        }
        catch ( NoSuchScmProviderException e )
        {
            throw new ReleaseExecutionException( "Unable to configure SCM repository: " + e.getMessage(), e );
        }

        if ( releaseDescriptor.isCommitByProject() )
        {
            for ( MavenProject project : reactorProjects )
View Full Code Here

TOP

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

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.