Examples of ScmException


Examples of org.apache.maven.scm.ScmException

            {
                boolean success = workingDir.mkdirs();
                if ( !success )
                {
                    String msg = "Working directory did not exist" + " and it couldn't be created: " + workingDir;
                    throw new ScmException( msg );
                }
            }
        }
        return cmd;
    }
View Full Code Here

Examples of org.apache.maven.scm.ScmException

        {
            exitCode = CommandLineUtils.executeCommandLine( cmd, consumer, consumer );
        }
        catch ( CommandLineException ex )
        {
            throw new ScmException( "Command could not be executed: " + cmd, ex );
        }
        return exitCode;
    }
View Full Code Here

Examples of org.apache.maven.scm.ScmException

                                                          String datePattern )
        throws ScmException
    {
        if ( branch != null && StringUtils.isNotEmpty( branch.getName() ) )
        {
            throw new ScmException( "This SCM doesn't support branches." );
        }

        return executeChangeLogCommand( repo, fileSet, startDate, endDate, branch, datePattern, null, null );
    }
View Full Code Here

Examples of org.apache.maven.scm.ScmException

            return exitcode;
        }
        catch ( CommandLineException ex )
        {
            throw new ScmException( "Error while executing command.", ex );
        }
    }
View Full Code Here

Examples of org.apache.maven.scm.ScmException

        {
            cl.setWorkingDirectory( directory.getCanonicalPath() );
        }
        catch ( IOException e )
        {
            throw new ScmException( "Invalid directory", e );
        }

        cl.setExecutable( CCM );
        cl.createArg().setValue( DIR );
        cl.createArg().setValue( "-m" );
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() )
            {
                File source = new File( fileSet.getBasedir(), f.getPath() );
                File dest = new File( destPath, f.getPath() );
                SynergyUtil.delete( getLogger(), dest, ccmAddr, true );
                if ( !source.equals( dest ) )
                {
                    if ( getLogger().isDebugEnabled() )
                    {
                        getLogger().debug( "Copy file [" + dest + "] to [" + source + "]." );
                    }
                    try
                    {
                        FileUtils.copyFile( dest, source );
                    }
                    catch ( IOException e )
                    {
                        throw new ScmException( "Unable to restore file in output folder", 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( directory.getCanonicalPath() );
            }
            catch ( IOException e )
            {
                throw new ScmException( "Invalid directory", e );
            }
        }
        cl.createArg().setValue( "-p" );
        cl.createArg().setValue( projectSpec );
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

                }
            }
        }
        catch ( Exception e1 )
        {
            throw new ScmException( "Fail to add PATH environment variable.", e1 );

        }
        cl.addEnvironment( "CCM_ADDR", ccmAddr );

    }
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.