Examples of ScmException


Examples of org.apache.maven.scm.ScmException

    }

    protected ChangeLogScmResult executeChangeLogCommand( ChangeLogScmRequest request )
        throws ScmException
    {
        throw new ScmException( "Unsupported method for this provider." );
    }
View Full Code Here

Examples of org.apache.maven.scm.ScmException

    {
        LoginScmResult result = login( repository.getProviderRepository(), fileSet, new CommandParameters() );

        if ( !result.isSuccess() )
        {
            throw new ScmException( "Can't login.\n" + result.getCommandOutput() );
        }
    }
View Full Code Here

Examples of org.apache.maven.scm.ScmException

        {
            String projectSpec =
                SynergyUtil.getWorkingProject( getLogger(), repo.getProjectSpec(), repo.getUser(), ccmAddr );
            if ( projectSpec == null )
            {
                throw new ScmException( "You should checkout a working project first" );
            }
            File waPath = SynergyUtil.getWorkArea( getLogger(), projectSpec, ccmAddr );
            File destPath = new File( waPath, repo.getProjectName() );
            for ( File f : fileSet.getFileList() )
            {
View Full Code Here

Examples of org.apache.maven.scm.ScmException

            int taskNum = SynergyUtil.createTask( getLogger(), message, repo.getProjectRelease(), true, ccmAddr );
            String projectSpec =
                SynergyUtil.getWorkingProject( getLogger(), repo.getProjectSpec(), repo.getUser(), ccmAddr );
            if ( projectSpec == null )
            {
                throw new ScmException( "You should checkout a working project first" );
            }
            File waPath = SynergyUtil.getWorkArea( getLogger(), projectSpec, ccmAddr );
            File destPath = new File( waPath, repo.getProjectName() );
            for ( File source : fileSet.getFileList() )
            {
                File dest = new File( destPath, SynergyUtil.removePrefix( fileSet.getBasedir(), source ) );
                if ( !source.equals( dest ) )
                {
                    if ( getLogger().isDebugEnabled() )
                    {
                        getLogger().debug( "Copy file [" + source + "] to Synergy Work Area [" + dest + "]." );
                    }
                    try
                    {
                        FileUtils.copyFile( source, dest );
                    }
                    catch ( IOException e )
                    {
                        throw new ScmException( "Unable to copy file in Work Area", e );
                    }
                }
                SynergyUtil.create( getLogger(), dest, message, ccmAddr );
            }
            SynergyUtil.checkinTask( getLogger(), taskNum, message, ccmAddr );
View Full Code Here

Examples of org.apache.maven.scm.ScmException

            {
                copyDirectoryStructure( source, fileSet.getBasedir(), modifications );
            }
            catch ( IOException e1 )
            {
                throw new ScmException( "Unable to copy directory structure", e1 );
            }
        }

        return new UpdateScmResult( "ccm reconcile -uwa ...", modifications );
    }
View Full Code Here

Examples of org.apache.maven.scm.ScmException

        {
            String projectSpec =
                SynergyUtil.getWorkingProject( getLogger(), repo.getProjectSpec(), repo.getUser(), ccmAddr );
            if ( projectSpec == null )
            {
                throw new ScmException( "You should checkout a working project first" );
            }
            List<SynergyTask> tasks = SynergyUtil.getCompletedTasks( getLogger(), projectSpec, startDate, endDate, ccmAddr );
            for ( SynergyTask t : tasks )
            {
                ChangeSet cs = new ChangeSet();
View Full Code Here

Examples of org.apache.maven.scm.ScmException

                SynergyUtil.getWorkingProject( getLogger(), repo.getProjectSpec(), repo.getUser(), ccmAddr );
            File waPath = SynergyUtil.getWorkArea( getLogger(), projectSpec, ccmAddr );
            File sourcePath = new File( waPath, repo.getProjectName() );
            if ( projectSpec == null )
            {
                throw new ScmException( "You should checkout project first" );
            }
            int taskNum = SynergyUtil.createTask( getLogger(), "Maven SCM Synergy provider: edit command for project "
                + repo.getProjectSpec(), repo.getProjectRelease(), true, ccmAddr );
            if ( getLogger().isInfoEnabled() )
            {
                getLogger().info( "Task " + taskNum + " was created to perform checkout." );
            }
            for ( File f : fileSet.getFileList() )
            {
                File dest = f;
                File source = new File( sourcePath, SynergyUtil.removePrefix( fileSet.getBasedir(), f ) );
                List<File> list = new LinkedList<File>();
                list.add( source );
                SynergyUtil.checkoutFiles( getLogger(), list, ccmAddr );
                if ( !source.equals( dest ) )
                {
                    if ( getLogger().isDebugEnabled() )
                    {
                        getLogger().debug( "Copy file [" + source + "] to expected folder [" + dest + "]." );
                    }
                    try
                    {
                        FileUtils.copyFile( source, dest );
                    }
                    catch ( IOException e )
                    {
                        throw new ScmException( "Unable to copy file from Work Area", e );
                    }
                }
            }
        }
        finally
View Full Code Here

Examples of org.apache.maven.scm.ScmException

            {
                cl.createArg().setValue( f.getCanonicalPath() );
            }
            catch ( IOException e )
            {
                throw new ScmException( "Invalid file path " + f.toString(), e );
            }
        }

        return cl;
View Full Code Here

Examples of org.apache.maven.scm.ScmException

            {
                cl.createArg().setValue( f.getCanonicalPath() );
            }
            catch ( IOException e )
            {
                throw new ScmException( "Invalid file path " + f.toString(), e );
            }
        }

        return cl;
View Full Code Here

Examples of org.apache.maven.scm.ScmException

    public final void execute()
        throws ScmException, IOException
    {
        if ( cvsRoot == null )
        {
            throw new ScmException( "cvsroot is required" );
        }

        if ( logger.isDebugEnabled() )
        {
            logger.debug( "cvsRoot: " + cvsRoot );
            logger.debug( "passFile: " + passFile );
        }

        BufferedReader reader = null;

        PrintWriter writer = null;
        try
        {
            StringBuilder buf = new StringBuilder();

            if ( passFile.exists() )
            {
                reader = new BufferedReader( new FileReader( passFile ) );

                String line = null;

                while ( ( line = reader.readLine() ) != null )
                {
                    if ( !line.startsWith( cvsRoot ) && !line.startsWith( "/1 " + cvsRoot ) )
                    {
                        buf.append( line ).append( "\n" );
                    }
                    else
                    {
                        if ( logger.isDebugEnabled() )
                        {
                            logger.debug( "cvsroot " + cvsRoot + " already exist in " + passFile.getAbsolutePath()
                                + ". SKIPPED." );
                        }

                        return;
                    }
                }
            }
            else
            {
                passFile.getParentFile().mkdirs();
            }

            if ( password == null )
            {
                throw new ScmException( "password is required. You must run a 'cvs -d " + cvsRoot
                    + " login' first or provide it in the connection url." );
            }

            //logger.debug( "password: " + password );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.