Package org.apache.maven.archiva.model

Examples of org.apache.maven.archiva.model.ProjectReference


            {
                // Nothing to do here, not a snapshot, skip it.
                return;
            }

            ProjectReference reference = new ProjectReference();
            reference.setGroupId( artifactRef.getGroupId() );
            reference.setArtifactId( artifactRef.getArtifactId() );
           
            // Gather up all of the versions.
            List<String> allVersions = new ArrayList<String>( repository.getVersions( reference ) );

            List<ManagedRepositoryConfiguration> repos = archivaConfig.getConfiguration().getManagedRepositories();
View Full Code Here


        VersionedReference versionRef = new VersionedReference();
        versionRef.setGroupId( artifact.getGroupId() );
        versionRef.setArtifactId( artifact.getArtifactId() );
        versionRef.setVersion( artifact.getVersion() );

        ProjectReference projectRef = new ProjectReference();
        projectRef.setGroupId( artifact.getGroupId() );
        projectRef.setArtifactId( artifact.getArtifactId() );

        try
        {
            metadataTools.updateMetadata( repository, versionRef );
        }
View Full Code Here

            "1.0-alpha-11-20070316.175232-11" } );
    }

    public void testToMetadataPathFromProjectReference()
    {
        ProjectReference reference = new ProjectReference();
        reference.setGroupId( "com.foo" );
        reference.setArtifactId( "foo-tool" );

        assertEquals( "com/foo/foo-tool/maven-metadata.xml", repoContent.toMetadataPath( reference ) );
    }
View Full Code Here

    }

    private void assertGetVersions( String artifactId, List<String> expectedVersions )
        throws Exception
    {
        ProjectReference reference = new ProjectReference();
        reference.setGroupId( "org.apache.archiva.metadata.tests" );
        reference.setArtifactId( artifactId );

        // Use the test metadata-repository, which is already setup for
        // These kind of version tests.
        File repoDir = getTestFile( "src/test/repositories/metadata-repository" );
        repoContent.getRepository().setLocation( repoDir.getAbsolutePath() );
View Full Code Here

        assertResourceNotFound( requestedResource );
        assertNoRepoMetadata( ID_PROXIED1, requestedResource );

        File expectedFile = new File( managedDefaultDir, requestedResource );

        ProjectReference metadata = createProjectReference( requestedResource );

        File downloadedFile = proxyHandler.fetchMetatadaFromProxies( managedDefaultRepository, managedDefaultRepository.toMetadataPath(metadata) );

        assertNull( "Should not have downloaded a file.", downloadedFile );
        assertNoTempFiles( expectedFile );
View Full Code Here

    private void assertFetchProjectOrGroup( String requestedResource )
        throws Exception
    {
        File expectedFile = new File( managedDefaultDir, requestedResource );

        ProjectReference metadata = createProjectReference( requestedResource );

        File downloadedFile = proxyHandler.fetchMetatadaFromProxies( managedDefaultRepository, managedDefaultRepository.toMetadataPath(metadata) );

        assertNotNull( "Should have downloaded a file.", downloadedFile );
        assertNoTempFiles( expectedFile );
View Full Code Here

     */
    private void assertFetchProjectOrGroupFailed( String requestedResource )
        throws Exception
    {
        File expectedFile = new File( managedDefaultDir, requestedResource );
        ProjectReference metadata = createProjectReference( requestedResource );

        File downloadedFile = proxyHandler.fetchMetatadaFromProxies( managedDefaultRepository, managedDefaultRepository.toMetadataPath(metadata) );

        assertNull( downloadedFile );
        assertNoTempFiles( expectedFile );
View Full Code Here

        throws Exception
    {
        File actualFile = new File( managedDefaultDir, requestedResource );
        assertTrue( "Snapshot Metadata should exist: " + requestedResource, actualFile.exists() );

        ProjectReference actualMetadata = createGroupReference( requestedResource );

        assertGroupMetadata( actualFile, actualMetadata, expectedPlugins );
    }
View Full Code Here

    }

    private ProjectReference createGroupReference( String requestedResource )
        throws RepositoryMetadataException
    {
        ProjectReference projectReference = createProjectReference( requestedResource );
        projectReference.setGroupId( projectReference.getGroupId() + "." + projectReference.getArtifactId() );
        projectReference.setArtifactId( null );
        return projectReference;
    }
View Full Code Here

        String proxiedFile = metadataTools.getRepositorySpecificName( proxiedRepoId, requestedResource );

        File actualFile = new File( managedDefaultDir, proxiedFile );
        assertTrue( "Repo Specific Group Metadata should exist: " + requestedResource, actualFile.exists() );

        ProjectReference actualMetadata = createGroupReference( requestedResource );

        assertGroupMetadata( actualFile, actualMetadata, expectedPlugins );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.model.ProjectReference

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.