Examples of ManagedRepositoryContent


Examples of org.apache.archiva.repository.ManagedRepositoryContent

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

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( getManagedRepository() );

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

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

Examples of org.apache.archiva.repository.ManagedRepositoryContent

    {
        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 ),
                                                 repoConfig, 1, 8 );
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent

    {
        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();
        content.setRepository( getManagedRepository() );

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

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

Examples of org.apache.archiva.repository.ManagedRepositoryContent

    {
        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 ),
                                                 repoConfig, 1, 8 );
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent

        }

        RepositorySession repositorySession = repositorySessionFactory.createSession();
        try
        {
            ManagedRepositoryContent repoContent = repoFactory.getManagedRepositoryContent( repoId );
            VersionedReference ref = new VersionedReference();
            ref.setGroupId( groupId );
            ref.setArtifactId( artifactId );
            ref.setVersion( version );

            // delete from file system
            repoContent.deleteVersion( ref );

            MetadataRepository metadataRepository = repositorySession.getRepository();
            Collection<ArtifactMetadata> artifacts =
                metadataRepository.getArtifacts( repoId, groupId, artifactId, version );
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent

        ManagedRepository config = new ManagedRepository();
        config.setId( TEST_REPO );
        config.setLocation( new File( "target/test-repo" ).getAbsolutePath() );

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( config );
        when( factory.getManagedRepositoryContent( TEST_REPO ) ).thenReturn( content );

        ArchivaConfiguration archivaConfig = mock( ArchivaConfiguration.class );

        Configuration configuration = new Configuration();
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent

        repo.setId( id );
        repo.setName( name );
        repo.setLocation( path );
        repo.setLayout( layout );

        ManagedRepositoryContent repoContent =
            applicationContext.getBean( "managedRepositoryContent#" + layout, ManagedRepositoryContent.class );
        repoContent.setRepository( repo );
        return repoContent;
    }
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent

        action.setVersion( VERSION );
        action.setRepositoryId( REPOSITORY_ID );

        Configuration config = createConfiguration();

        ManagedRepositoryContent repoContent = new ManagedDefaultRepositoryContent();
        repoContent.setRepository(
            new BeanReplicator().replicateBean( config.findManagedRepositoryById( REPOSITORY_ID ),
                                                ManagedRepository.class ) );

        configurationControl.expectAndReturn( configuration.getConfiguration(), config );
        repositoryFactoryControl.expectAndReturn( repositoryFactory.getManagedRepositoryContent( REPOSITORY_ID ),
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent

     */
    @Test
    public void testToNativePathArtifactDefaultToDefaultDualExtension()
        throws Exception
    {
        ManagedRepositoryContent repository = createManagedRepo( "default" );

        // Test (artifact) default to default - dual extension
        assertEquals( "org/project/example-presentation/3.2/example-presentation-3.2.xml.zip",
                      repoRequest.toNativePath( "org/project/example-presentation/3.2/example-presentation-3.2.xml.zip",
                                                repository ) );
View Full Code Here

Examples of org.apache.archiva.repository.ManagedRepositoryContent

     */
    @Test
    public void testToNativePathArtifactLegacyToDefaultDualExtension()
        throws Exception
    {
        ManagedRepositoryContent repository = createManagedRepo( "default" );

        // TODO: this is a good test case for maven 1 -> maven 2 link, since m2 doesn't support the distribution-zip type

        // Test (artifact) legacy to default - dual extension
        // NOTE: The detection of a dual extension is flawed.
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.