Examples of LegacyRepositoryConverter


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

    }

    private void doConversion( String properties )
        throws FileNotFoundException, IOException, RepositoryConversionException, PlexusSisuBridgeException
    {
        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

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

    }

    private void doConversion( String properties )
        throws FileNotFoundException, IOException, RepositoryConversionException, PlexusSisuBridgeException
    {
        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

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

    }

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

        Properties p = new Properties();

        try (InputStream fis = Files.newInputStream( Paths.get(properties)))
        {
            p.load( 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

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

    }

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

        Properties p = new Properties();

        try (InputStream fis = Files.newInputStream( Paths.get(properties)))
        {
            p.load( 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

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

    }

    private void doConversion( String properties )
        throws FileNotFoundException, IOException, RepositoryConversionException, PlexusSisuBridgeException
    {
        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

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

    }

    private void doConversion( String properties )
        throws FileNotFoundException, IOException, RepositoryConversionException, PlexusSisuBridgeException
    {
        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

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

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

    }

    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

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

    }

    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

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