Package org.apache.maven.archiva.converter.legacy

Examples of org.apache.maven.archiva.converter.legacy.LegacyRepositoryConverter


    }

    private void doConversion( CommandLine cli, PlexusContainer plexus )
        throws ComponentLookupException
    {
        LegacyRepositoryConverter legacyRepositoryConverter = (LegacyRepositoryConverter) plexus
            .lookup( LegacyRepositoryConverter.ROLE );

        Properties p = new Properties();

        try
        {
            p.load( new FileInputStream( cli.getOptionValue( CONVERT ) ) );
        }
        catch ( IOException e )
        {
            showFatalError( "Cannot find properties file which describes the conversion.", e, true );
        }

        File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

        File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

        System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

        List fileExclusionPatterns = null;

        String s = p.getProperty( BLACKLISTED_PATTERNS );

        if ( s != null )
        {
            fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
        }

        try
        {
            legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
                                                               fileExclusionPatterns );
        }
        catch ( RepositoryConversionException e )
        {
            showFatalError( "Error converting repository.", e, true );
View Full Code Here


    }

    private void doConversion( String properties )
        throws FileNotFoundException, IOException, RepositoryConversionException
    {
        LegacyRepositoryConverter legacyRepositoryConverter =
            (LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.class );

        Properties p = new Properties();

        FileInputStream fis = new FileInputStream( properties );

        try
        {
            p.load( fis );
        }
        finally
        {
            IOUtils.closeQuietly( fis );
        }

        File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

        File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

        System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

        List<String> fileExclusionPatterns = null;

        String s = p.getProperty( BLACKLISTED_PATTERNS );

        if ( s != null )
        {
            fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
        }

        legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
                                                           fileExclusionPatterns );
    }
View Full Code Here

    }

    private void doConversion( String properties )
        throws FileNotFoundException, IOException, RepositoryConversionException
    {
        LegacyRepositoryConverter legacyRepositoryConverter =
            (LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.class );

        Properties p = new Properties();

        p.load( new FileInputStream( properties ) );

        File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

        File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

        System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

        List<String> fileExclusionPatterns = null;

        String s = p.getProperty( BLACKLISTED_PATTERNS );

        if ( s != null )
        {
            fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
        }

        legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, fileExclusionPatterns );
    }
View Full Code Here

    }

    private void doConversion( CommandLine cli, PlexusContainer plexus )
        throws ComponentLookupException
    {
        LegacyRepositoryConverter legacyRepositoryConverter = (LegacyRepositoryConverter) plexus
            .lookup( LegacyRepositoryConverter.ROLE );

        Properties p = new Properties();

        try
        {
            p.load( new FileInputStream( cli.getOptionValue( CONVERT ) ) );
        }
        catch ( IOException e )
        {
            showFatalError( "Cannot find properties file which describes the conversion.", e, true );
        }

        File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

        File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

        System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

        List fileExclusionPatterns = null;

        String s = p.getProperty( BLACKLISTED_PATTERNS );

        if ( s != null )
        {
            fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
        }

        try
        {
            legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
                                                               fileExclusionPatterns );
        }
        catch ( RepositoryConversionException e )
        {
            showFatalError( "Error converting repository.", e, true );
View Full Code Here

    }

    private void doConversion( CommandLine cli, PlexusContainer plexus )
        throws ComponentLookupException
    {
        LegacyRepositoryConverter legacyRepositoryConverter = (LegacyRepositoryConverter) plexus
            .lookup( LegacyRepositoryConverter.ROLE );

        Properties p = new Properties();

        try
        {
            p.load( new FileInputStream( cli.getOptionValue( CONVERT ) ) );
        }
        catch ( IOException e )
        {
            showFatalError( "Cannot find properties file which describes the conversion.", e, true );
        }

        File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

        File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

        System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

        List fileExclusionPatterns = null;

        String s = p.getProperty( BLACKLISTED_PATTERNS );

        if ( s != null )
        {
            fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
        }

        try
        {
            legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
                                                               fileExclusionPatterns );
        }
        catch ( RepositoryConversionException e )
        {
            showFatalError( "Error converting repository.", e, true );
View Full Code Here

    }

    public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
        throws Exception
    {
        LegacyRepositoryConverter legacyRepositoryConverter =
            (LegacyRepositoryConverter) plexus.lookup( LegacyRepositoryConverter.ROLE );

        if ( cli.hasOption( CONVERT ) )
        {
            Properties p = new Properties();

            try
            {
                p.load( new FileInputStream( cli.getOptionValue( CONVERT ) ) );
            }
            catch ( IOException e )
            {
                showFatalError( "Cannot find properties file which describes the conversion.", e, true );
            }

            File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

            File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

            System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

            List fileExclusionPatterns = null;

            String s = p.getProperty( BLACKLISTED_PATTERNS );

            if ( s != null )
            {
                fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
            }

            try
            {
                legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
                                                                   fileExclusionPatterns,
                                                                   true );
            }
            catch ( RepositoryConversionException e )
            {
View Full Code Here

    }

    private void doConversion( String properties )
        throws FileNotFoundException, IOException, RepositoryConversionException
    {
        LegacyRepositoryConverter legacyRepositoryConverter =
            (LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.class );

        Properties p = new Properties();

        FileInputStream fis = new FileInputStream( properties );

        try
        {
            p.load( fis );
        }
        finally
        {
            IOUtils.closeQuietly( fis );
        }

        File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

        File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

        System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

        List<String> fileExclusionPatterns = null;

        String s = p.getProperty( BLACKLISTED_PATTERNS );

        if ( s != null )
        {
            fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
        }

        legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath,
                                                           fileExclusionPatterns );
    }
View Full Code Here

    }

    private void doConversion( String properties )
        throws FileNotFoundException, IOException, RepositoryConversionException
    {
        LegacyRepositoryConverter legacyRepositoryConverter =
            (LegacyRepositoryConverter) lookup( LegacyRepositoryConverter.class );

        Properties p = new Properties();

        p.load( new FileInputStream( properties ) );

        File oldRepositoryPath = new File( p.getProperty( SOURCE_REPO_PATH ) );

        File newRepositoryPath = new File( p.getProperty( TARGET_REPO_PATH ) );

        System.out.println( "Converting " + oldRepositoryPath + " to " + newRepositoryPath );

        List<String> fileExclusionPatterns = null;

        String s = p.getProperty( BLACKLISTED_PATTERNS );

        if ( s != null )
        {
            fileExclusionPatterns = Arrays.asList( StringUtils.split( s, "," ) );
        }

        legacyRepositoryConverter.convertLegacyRepository( oldRepositoryPath, newRepositoryPath, fileExclusionPatterns );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.converter.legacy.LegacyRepositoryConverter

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.