Package org.apache.archiva.admin.model.beans

Examples of org.apache.archiva.admin.model.beans.ManagedRepository


    public void testStruts2ValidationFrameworkWithBlankInputs()
        throws Exception
    {
        // prep
        // 0 is the default value for primitive int
        ManagedRepository managedRepositoryConfiguration =
            createManagedRepository( EMPTY_STRING, EMPTY_STRING, EMPTY_STRING, EMPTY_STRING, 1, 1 );
        action.setRepository( managedRepositoryConfiguration );

        // test
        actionValidatorManager.validate( action, EMPTY_STRING );
View Full Code Here


    public void testStruts2ValidationFrameworkWithInvalidInputs()
        throws Exception
    {
        // prep
        ManagedRepository managedRepositoryConfiguration =
            createManagedRepository( REPOSITORY_ID_INVALID_INPUT, REPOSITORY_NAME_INVALID_INPUT,
                                     REPOSITORY_LOCATION_INVALID_INPUT, REPOSITORY_INDEX_DIR_INVALID_INPUT,
                                     REPOSITORY_DAYS_OLDER_INVALID_INPUT, REPOSITORY_RETENTION_COUNT_INVALID_INPUT );
        action.setRepository( managedRepositoryConfiguration );
View Full Code Here

    public void testStruts2ValidationFrameworkWithValidInputs()
        throws Exception
    {
        // prep
        ManagedRepository managedRepositoryConfiguration =
            createManagedRepository( REPOSITORY_ID_VALID_INPUT, REPOSITORY_NAME_VALID_INPUT,
                                     REPOSITORY_LOCATION_VALID_INPUT, REPOSITORY_INDEX_DIR_VALID_INPUT,
                                     REPOSITORY_DAYS_OLDER_VALID_INPUT, REPOSITORY_RETENTION_COUNT_VALID_INPUT );
        action.setRepository( managedRepositoryConfiguration );
View Full Code Here

    }

    private ManagedRepository createRepository()
        throws IOException
    {
        ManagedRepository r = new ManagedRepository();
        r.setId( REPO_ID );
        populateRepository( r );
        return r;
    }
View Full Code Here

    @Test
    public void testByLastModified()
        throws Exception
    {
        ManagedRepository repoConfiguration = getRepoConfiguration( TEST_REPO_ID, TEST_REPO_NAME );
        repoPurge = new DaysOldRepositoryPurge( getRepository(), repoConfiguration.getDaysOlder(),
                                                repoConfiguration.getRetentionCount(), repositorySession,
                                                Collections.singletonList( listener ) );

        String repoRoot = prepareTestRepos();

        String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-install-plugin";
View Full Code Here

    @Test
    public void testOrderOfDeletion()
        throws Exception
    {
        ManagedRepository repoConfiguration = getRepoConfiguration( TEST_REPO_ID, TEST_REPO_NAME );
        List<RepositoryListener> listeners = Collections.singletonList( listener );
        repoPurge = new DaysOldRepositoryPurge( getRepository(), repoConfiguration.getDaysOlder(),
                                                repoConfiguration.getRetentionCount(), repositorySession, listeners );

        String repoRoot = prepareTestRepos();

        String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-assembly-plugin";
View Full Code Here

    @Test
    public void testMetadataDrivenSnapshots()
        throws Exception
    {
        ManagedRepository repoConfiguration = getRepoConfiguration( TEST_REPO_ID, TEST_REPO_NAME );
        List<RepositoryListener> listeners = Collections.singletonList( listener );
        repoPurge = new DaysOldRepositoryPurge( getRepository(), repoConfiguration.getDaysOlder(),
                                                repoConfiguration.getRetentionCount(), repositorySession, listeners );

        String repoRoot = prepareTestRepos();

        String versionRoot = repoRoot + "/org/codehaus/plexus/plexus-utils/1.4.3-SNAPSHOT";
View Full Code Here

        File testRepo = new File( FileUtil.getBasedir(), "target/test-classes/test-repo" );
        testRepo.mkdirs();

        assertTrue( testRepo.exists() );

        managedRepository = new ManagedRepository();
        managedRepository.setId( REPOSITORY_ID );
        managedRepository.setLayout( "default" );
        managedRepository.setLocation( testRepo.getPath() );
        managedRepository.setName( REPOSITORY_ID );
        managedRepository.setBlockRedeployments( true );
View Full Code Here

        setUploadParameters( "1.0", null, new File( FileUtil.getBasedir(),
                                                    "target/test-classes/upload-artifact-test/artifact-to-be-uploaded.jar" ),
                             null, true );

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        ManagedRepository repoConfig = getManagedRepository();
        repoConfig.setBlockRedeployments( false );
        content.setRepository( repoConfig );

        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content );

        managedRepoAdminControl.expectAndReturn( managedRepositoryAdmin.getManagedRepository( REPOSITORY_ID ),
View Full Code Here

        setUploadParameters( "1.0", null, new File( FileUtil.getBasedir(),
                                                    "target/test-classes/upload-artifact-test/artifact-to-be-uploaded.jar" ),
                             null, true );

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        ManagedRepository repoConfig = getManagedRepository();
        repoConfig.setBlockRedeployments( false );
        content.setRepository( repoConfig );

        repoFactoryControl.expectAndReturn( repoFactory.getManagedRepositoryContent( REPOSITORY_ID ), content, 1, 8 );

        managedRepoAdminControl.expectAndReturn( managedRepositoryAdmin.getManagedRepository( REPOSITORY_ID ),
View Full Code Here

TOP

Related Classes of org.apache.archiva.admin.model.beans.ManagedRepository

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.