Package org.apache.maven.scm.provider.svn

Examples of org.apache.maven.scm.provider.svn.AbstractSvnScmProvider


    private void checkCreateRemoteSvnPath()
        throws MojoExecutionException
    {
        getLog().debug( "AbstractSvnScmProvider used, so we can check if remote url exists and eventually create it." );
        AbstractSvnScmProvider svnScmProvider = (AbstractSvnScmProvider) scmProvider;

        try
        {
            boolean remoteExists = svnScmProvider.remoteUrlExist( scmRepository.getProviderRepository(), null );

            if ( remoteExists )
            {
                return;
            }
        }
        catch ( ScmException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }

        String remoteUrl = ( (SvnScmProviderRepository) scmRepository.getProviderRepository() ).getUrl();

        if ( !automaticRemotePathCreation )
        {
            // olamy: return ?? that will fail during checkout IMHO :-)
            logWarn( "Remote svn url %s does not exist and automatic remote path creation disabled.",
                     remoteUrl );
            return;
        }

        logInfo( "Remote svn url %s does not exist: creating.", remoteUrl );

        File baseDir = null;
        try
        {

            // create a temporary directory for svnexec
            baseDir = File.createTempFile( "scm", "tmp" );
            baseDir.delete();
            baseDir.mkdirs();
            // to prevent fileSet cannot be empty
            ScmFileSet scmFileSet = new ScmFileSet( baseDir, new File( "" ) );

            CommandParameters commandParameters = new CommandParameters();
            commandParameters.setString( CommandParameter.SCM_MKDIR_CREATE_IN_LOCAL, Boolean.FALSE.toString() );
            commandParameters.setString( CommandParameter.MESSAGE, "Automatic svn path creation: " + remoteUrl );
            svnScmProvider.mkdir( scmRepository.getProviderRepository(), scmFileSet, commandParameters );

            // new remote url so force checkout!
            if ( checkoutDirectory.exists() )
            {
                FileUtils.deleteDirectory( checkoutDirectory );
View Full Code Here


     *       org.apache.maven.scm.provider.svn.SvnScmProvider
     */
    public SvnInfoScmResult info( ScmRepository repository, ScmFileSet fileSet )
        throws ScmException
    {
        AbstractSvnScmProvider abstractSvnScmProvider = (AbstractSvnScmProvider) scmManager.getProviderByType( "svn" );
        return abstractSvnScmProvider.info( repository.getProviderRepository(), fileSet, null );
       
        //org.apache.maven.scm.provider.svn.svnexe.command.info.SvnInfoCommand command =
        //    new org.apache.maven.scm.provider.svn.svnexe.command.info.SvnInfoCommand();

        //command.setLogger( getLogger() );
View Full Code Here

    private void checkCreateRemoteSvnPath()
        throws MojoExecutionException
    {
        getLog().debug( "AbstractSvnScmProvider used, so we can check if remote url exists and eventually create it." );
        AbstractSvnScmProvider svnScmProvider = (AbstractSvnScmProvider) scmProvider;

        try
        {
            boolean remoteExists = svnScmProvider.remoteUrlExist( scmRepository.getProviderRepository(), null );

            if ( remoteExists )
            {
                return;
            }
        }
        catch ( ScmException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }

        String remoteUrl = ( (SvnScmProviderRepository) scmRepository.getProviderRepository() ).getUrl();

        if ( !automaticRemotePathCreation )
        {
            // olamy: return ?? that will fail during checkout IMHO :-)
            logWarn( "Remote svn url %s does not exist and automatic remote path creation disabled.",
                     remoteUrl );
            return;
        }

        logInfo( "Remote svn url %s does not exist: creating.", remoteUrl );

        File baseDir = null;
        try
        {

            // create a temporary directory for svnexec
            baseDir = File.createTempFile( "scm", "tmp" );
            baseDir.delete();
            baseDir.mkdirs();
            // to prevent fileSet cannot be empty
            ScmFileSet scmFileSet = new ScmFileSet( baseDir, new File( "" ) );

            CommandParameters commandParameters = new CommandParameters();
            commandParameters.setString( CommandParameter.SCM_MKDIR_CREATE_IN_LOCAL, Boolean.FALSE.toString() );
            commandParameters.setString( CommandParameter.MESSAGE, "Automatic svn path creation: " + remoteUrl );
            svnScmProvider.mkdir( scmRepository.getProviderRepository(), scmFileSet, commandParameters );

            // new remote url so force checkout!
            if ( checkoutDirectory.exists() )
            {
                FileUtils.deleteDirectory( checkoutDirectory );
View Full Code Here

    private void checkCreateRemoteSvnPath()
        throws MojoExecutionException
    {
        getLog().debug( "AbstractSvnScmProvider used, so we can check if remote url exists and eventually create it." );
        AbstractSvnScmProvider svnScmProvider = (AbstractSvnScmProvider) scmProvider;

        try
        {
            boolean remoteExists = svnScmProvider.remoteUrlExist( scmRepository.getProviderRepository(), null );

            if ( remoteExists )
            {
                return;
            }
        }
        catch ( ScmException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }

        String remoteUrl = ( (SvnScmProviderRepository) scmRepository.getProviderRepository() ).getUrl();

        if ( !automaticRemotePathCreation )
        {
            // olamy: return ?? that will fail during checkout IMHO :-)
            logWarn( "Remote svn url %s does not exist and automatic remote path creation disabled.",
                     remoteUrl );
            return;
        }

        logInfo( "Remote svn url %s does not exist: creating.", remoteUrl );

        File baseDir = null;
        try
        {

            // create a temporary directory for svnexec
            baseDir = File.createTempFile( "scm", "tmp" );
            baseDir.delete();
            baseDir.mkdirs();
            // to prevent fileSet cannot be empty
            ScmFileSet scmFileSet = new ScmFileSet( baseDir, new File( "" ) );

            CommandParameters commandParameters = new CommandParameters();
            commandParameters.setString( CommandParameter.SCM_MKDIR_CREATE_IN_LOCAL, Boolean.FALSE.toString() );
            commandParameters.setString( CommandParameter.MESSAGE, "Automatic svn path creation: " + remoteUrl );
            svnScmProvider.mkdir( scmRepository.getProviderRepository(), scmFileSet, commandParameters );

            // new remote url so force checkout!
            if ( checkoutDirectory.exists() )
            {
                FileUtils.deleteDirectory( checkoutDirectory );
View Full Code Here

    private void checkCreateRemoteSvnPath()
        throws MojoExecutionException
    {
        getLog().debug( "AbstractSvnScmProvider used, so we can check if remote url exists and eventually create it." );
        AbstractSvnScmProvider svnScmProvider = (AbstractSvnScmProvider) scmProvider;

        try
        {
            boolean remoteExists = svnScmProvider.remoteUrlExist( scmRepository.getProviderRepository(), null );

            if ( remoteExists )
            {
                return;
            }
        }
        catch ( ScmException e )
        {
            throw new MojoExecutionException( e.getMessage(), e );
        }

        String remoteUrl = ( (SvnScmProviderRepository) scmRepository.getProviderRepository() ).getUrl();

        if ( !automaticRemotePathCreation )
        {
            // olamy: return ?? that will fail during checkout IMHO :-)
            logWarn( "Remote svn url %s does not exist and automatic remote path creation disabled.",
                     remoteUrl );
            return;
        }

        logInfo( "Remote svn url %s does not exist: creating.", remoteUrl );

        File baseDir = null;
        try
        {

            // create a temporary directory for svnexec
            baseDir = File.createTempFile( "scm", "tmp" );
            baseDir.delete();
            baseDir.mkdirs();
            // to prevent fileSet cannot be empty
            ScmFileSet scmFileSet = new ScmFileSet( baseDir, new File( "" ) );

            CommandParameters commandParameters = new CommandParameters();
            commandParameters.setString( CommandParameter.SCM_MKDIR_CREATE_IN_LOCAL, Boolean.FALSE.toString() );
            commandParameters.setString( CommandParameter.MESSAGE, "Automatic svn path creation: " + remoteUrl );
            svnScmProvider.mkdir( scmRepository.getProviderRepository(), scmFileSet, commandParameters );

            // new remote url so force checkout!
            if ( checkoutDirectory.exists() )
            {
                FileUtils.deleteDirectory( checkoutDirectory );
View Full Code Here

TOP

Related Classes of org.apache.maven.scm.provider.svn.AbstractSvnScmProvider

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.