Package org.apache.archiva.repository

Examples of org.apache.archiva.repository.ManagedRepositoryContent


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

        // Test bad request path (too short)
        try
        {
            repoRequest.toNativePath( "org/apache/derby/derby/10.2.2.0/license.txt", repository );
View Full Code Here


    @Test
    public void testToNativePathLegacyMetadataDefaultToLegacy()
        throws Exception
    {
        ManagedRepositoryContent repository = createManagedRepo( "legacy" );

        // Test (metadata) default to legacy

        // Special Case: This direction is not supported, should throw a LayoutException.
        try
View Full Code Here

    @Test
    public void testNativePathPomDefaultToLegacy()
        throws Exception
    {
        ManagedRepositoryContent repository = createManagedRepo( "legacy" );

        // Test (pom) default to legacy
        assertEquals( "org.apache.derby/poms/derby-10.2.2.0.pom",
                      repoRequest.toNativePath( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0.pom", repository ) );
    }
View Full Code Here

    @Test
    public void testNativePathSupportFileDefaultToLegacy()
        throws Exception
    {
        ManagedRepositoryContent repository = createManagedRepo( "legacy" );

        // Test (supportfile) default to legacy
        assertEquals( "org.apache.derby/jars/derby-10.2.2.0.jar.sha1",
                      repoRequest.toNativePath( "org/apache/derby/derby/10.2.2.0/derby-10.2.2.0.jar.sha1",
                                                repository ) );
View Full Code Here

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

        ManagedRepositoryContent repoContent =
            applicationContext.getBean( "managedRepositoryContent#" + layout, ManagedRepositoryContent.class );
        repoContent.setRepository( repo );

        return repoContent;
    }
View Full Code Here

    @Override
    public void beginScan( ManagedRepository repository, Date whenGathered )
        throws ConsumerException
    {
        ManagedRepositoryContent repositoryContent;
        try
        {
            repositoryContent = repositoryContentFactory.getManagedRepositoryContent( repository.getId() );
        }
        catch ( RepositoryNotFoundException e )
View Full Code Here

        repoGroups.add( repoGroup );

        config.setRepositoryGroups( repoGroups );

        ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );
        ManagedRepositoryContent localMirrorRepo = createManagedRepositoryContent( LOCAL_MIRROR_REPO );

        try
        {
            archivaConfigurationControl.reset();
View Full Code Here

        // should fetch metadata
        DavResourceLocator locator =
            new ArchivaDavResourceLocator( "", "/repository/" + INTERNAL_REPO + "/eclipse/jdtcore/maven-metadata.xml",
                                           INTERNAL_REPO, new ArchivaDavLocatorFactory() );

        ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );

        // use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
        RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
        resourceFactory.setRepositoryRequest( repoRequest );
View Full Code Here

        // should not fetch metadata
        DavResourceLocator locator =
            new ArchivaDavResourceLocator( "", "/repository/" + INTERNAL_REPO + "/eclipse/maven-metadata.xml",
                                           INTERNAL_REPO, new ArchivaDavLocatorFactory() );

        ManagedRepositoryContent internalRepo = createManagedRepositoryContent( INTERNAL_REPO );

        // use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
        RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
        resourceFactory.setRepositoryRequest( repoRequest );
View Full Code Here

                                     "legacy" ), false, null );
        DavResourceLocator locator =
            new ArchivaDavResourceLocator( "", "/repository/" + LEGACY_REPO + "/eclipse/maven-metadata.xml",
                                           LEGACY_REPO, new ArchivaDavLocatorFactory() );

        ManagedRepositoryContent legacyRepo = createManagedRepositoryContent( LEGACY_REPO );

        // use actual object (this performs the isMetadata, isDefault and isSupportFile check!)
        RepositoryRequest repoRequest = new RepositoryRequest( new LegacyPathParser( this.archivaConfiguration ) );
        resourceFactory.setRepositoryRequest( repoRequest );
View Full Code Here

TOP

Related Classes of org.apache.archiva.repository.ManagedRepositoryContent

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.