Package org.apache.maven.archiva.configuration

Examples of org.apache.maven.archiva.configuration.FileTypes


   
    public void testDeleteM1ArtifactArtifactExists()
        throws Exception
    {
        MockControl fileTypesControl = MockClassControl.createControl( FileTypes.class );
        FileTypes fileTypes = ( FileTypes ) fileTypesControl.getMock();
       
        MockControl pathParserControl = MockClassControl.createControl( PathParser.class );
        PathParser parser = ( PathParser ) pathParserControl.getMock();
       
        ManagedRepositoryConfiguration managedRepo = createManagedRepo( "legacy", "legacy-repo" );
View Full Code Here


        ArchivaConfiguration archivaConfiguration = (ArchivaConfiguration) lookup( ArchivaConfiguration.ROLE );
        FileType fileType = (FileType) archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get( 0 );
        fileType.addPattern( "**/*.xml" );
        assertEquals( FileTypes.ARTIFACTS, fileType.getId() );

        FileTypes fileTypes = (FileTypes) lookup( FileTypes.class );
        fileTypes.afterConfigurationChange( null, "fileType", null );

        repoContent = (ManagedRepositoryContent) lookup( ManagedRepositoryContent.class, "default" );
        repoContent.setRepository( repository );
    }
View Full Code Here

            (FileType) archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get( 0 );
        assertEquals( FileTypes.ARTIFACTS, fileType.getId() );
        fileType.addPattern( "**/*.xml" );

        // trigger reload
        FileTypes fileTypes = (FileTypes) lookup( FileTypes.class );
        fileTypes.afterConfigurationChange( null, "repositoryScanning.fileTypes", null );

        KnownRepositoryContentConsumer repoPurgeConsumer =
            (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class, "repository-purge" );

        File repoLocation = getTestFile( "target/test-" + getName() + "/test-repo" );
View Full Code Here

   
    public void setUp() throws Exception
    {
        super.setUp();
       
        FileTypes fileTypes = new MockFileTypes();
       
        ManagedRepositoryConfiguration repoConfig = new ManagedRepositoryConfiguration();
        repoConfig.setId( "test-repo" );
        repoConfig.setLocation( new File( getBasedir(), "target/test-classes/test-repo" ).getPath() );
        repoConfig.setName( "Test Repository" );
View Full Code Here

        scheduler = new ArchivaTaskSchedulerStub();

        ArchivaConfiguration configuration = (ArchivaConfiguration) lookup( ArchivaConfiguration.class );
       
        FileTypes filetypes = (FileTypes) lookup( FileTypes.class );

        nexusIndexerConsumer = new NexusIndexerConsumer( scheduler, configuration, filetypes );
       
        // initialize to set the file types to be processed
        ( (Initializable) nexusIndexerConsumer ).initialize();
View Full Code Here

            (FileType) archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get( 0 );
        assertEquals( FileTypes.ARTIFACTS, fileType.getId() );
        fileType.addPattern( "**/*.xml" );

        // trigger reload
        FileTypes fileTypes = (FileTypes) lookup( FileTypes.class );
        fileTypes.afterConfigurationChange( null, "repositoryScanning.fileTypes", null );

        KnownRepositoryContentConsumer repoPurgeConsumer =
            (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class, "repository-purge" );

        File repoLocation = getTestFile( "target/test-" + getName() + "/test-repo" );
View Full Code Here

        ArchivaConfiguration archivaConfiguration = (ArchivaConfiguration) lookup( ArchivaConfiguration.ROLE );
        FileType fileType = (FileType) archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get( 0 );
        fileType.addPattern( "**/*.xml" );
        assertEquals( FileTypes.ARTIFACTS, fileType.getId() );

        FileTypes fileTypes = (FileTypes) lookup( FileTypes.class );
        fileTypes.afterConfigurationChange( null, "fileType", null );

        repoContent = (ManagedRepositoryContent) lookup( ManagedRepositoryContent.class, "default" );
        repoContent.setRepository( repository );
    }
View Full Code Here

   
    public void testDeleteM1ArtifactArtifactExists()
        throws Exception
    {
        MockControl fileTypesControl = MockClassControl.createControl( FileTypes.class );
        FileTypes fileTypes = ( FileTypes ) fileTypesControl.getMock();
       
        MockControl pathParserControl = MockClassControl.createControl( PathParser.class );
        PathParser parser = ( PathParser ) pathParserControl.getMock();
       
        ManagedRepositoryConfiguration managedRepo = createManagedRepo( "legacy", "legacy-repo" );
View Full Code Here

        ArchivaConfiguration archivaConfiguration = (ArchivaConfiguration) lookup( ArchivaConfiguration.ROLE );
        FileType fileType = (FileType) archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get( 0 );
        fileType.addPattern( "**/*.xml" );
        assertEquals( FileTypes.ARTIFACTS, fileType.getId() );

        FileTypes fileTypes = (FileTypes) lookup( FileTypes.class );
        fileTypes.afterConfigurationChange( null, "fileType", null );

        repoContent = (ManagedRepositoryContent) lookup( ManagedRepositoryContent.class, "default" );
        repoContent.setRepository( repository );
    }
View Full Code Here

            (FileType) archivaConfiguration.getConfiguration().getRepositoryScanning().getFileTypes().get( 0 );
        assertEquals( FileTypes.ARTIFACTS, fileType.getId() );
        fileType.addPattern( "**/*.xml" );

        // trigger reload
        FileTypes fileTypes = (FileTypes) lookup( FileTypes.class );
        fileTypes.afterConfigurationChange( null, "repositoryScanning.fileTypes", null );

        KnownRepositoryContentConsumer repoPurgeConsumer =
            (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class, "repository-purge" );

        File repoLocation = getTestFile( "target/test-" + getName() + "/test-repo" );
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.configuration.FileTypes

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.