Package org.apache.archiva.web.xmlrpc.api.beans

Examples of org.apache.archiva.web.xmlrpc.api.beans.Artifact


                    {
                        ArchivaProjectModel model = repoBrowsing.selectVersion( "", observableRepos, resultHit.getGroupId(), resultHit.getArtifactId(), version );
                       
                        String repoId = repoBrowsing.getRepositoryId( "", observableRepos, resultHit.getGroupId(), resultHit.getArtifactId(), version );
                       
                        Artifact artifact = null;
                        if( model == null )
                        {
                           artifact = new Artifact( repoId, resultHit.getGroupId(), resultHit.getArtifactId(), version, "jar" );                          
                        }
                        else
                        {                      
                            artifact = new Artifact( repoId, model.getGroupId(), model.getArtifactId(), version, model.getPackaging() );
                        }
                        artifacts.add( artifact );
                    }
                    catch( ObjectNotFoundException e )
                    {                         
View Full Code Here


        ArtifactsByChecksumConstraint constraint = new ArtifactsByChecksumConstraint( checksum );
        List<ArchivaArtifact> artifacts = artifactDAO.queryArtifacts( constraint );
       
        for( ArchivaArtifact archivaArtifact : artifacts )
        {
            Artifact artifact = new Artifact( archivaArtifact.getModel().getRepositoryId(), archivaArtifact.getModel().getGroupId(),
                          archivaArtifact.getModel().getArtifactId(), archivaArtifact.getModel().getVersion(), archivaArtifact.getType() );
                          //archivaArtifact.getModel().getWhenGathered() );
            results.add( artifact );
        }
       
View Full Code Here

       
        final BrowsingResults results = repoBrowsing.selectArtifactId( "", observableRepos, groupId, artifactId );
       
        for( final String version : results.getVersions() )
        {
            final Artifact artifact = new Artifact( "", groupId, artifactId, version, "pom" );
            //ArchivaArtifact pomArtifact = artifactDAO.getArtifact( groupId, artifactId, version, "", "pom",  );
            //Artifact artifact = new Artifact( "", groupId, artifactId, version, pomArtifact.getType() );
                          //pomArtifact.getModel().getWhenGathered() );
           
            artifacts.add( artifact );
View Full Code Here

        List<String> observableRepos = xmlRpcUserRepositories.getObservableRepositories();
       
        List<ArchivaProjectModel> dependees = repoBrowsing.getUsedBy( "", observableRepos, groupId, artifactId, version );
        for( ArchivaProjectModel model : dependees )
        {
            Artifact artifact =
                new Artifact( "", model.getGroupId(), model.getArtifactId(), model.getVersion(), "" );
                              //model.getWhenIndexed() );
            artifacts.add( artifact );
        }
       
        return artifacts;
View Full Code Here

        archivaDAOControl.verify();
       
        assertNotNull( artifacts );
        assertEquals( 1, artifacts.size() );
         
        Artifact artifact = artifacts.get( 0 );
        assertEquals( ARCHIVA_TEST_GROUP_ID, artifact.getGroupId() );
        assertEquals( "archiva-webapp", artifact.getArtifactId() );
        assertEquals( "1.0", artifact.getVersion() );
        assertEquals( "war", artifact.getType() );
        assertNotNull( "Repository should not be null!", artifact.getRepositoryId() );
        assertEquals( "repo1.mirror", artifact.getRepositoryId() );
    }
View Full Code Here

        archivaDAOControl.verify();
       
        assertNotNull( artifacts );
        assertEquals( 1, artifacts.size() );
         
        Artifact artifact = artifacts.get( 0 );
        assertEquals( ARCHIVA_TEST_GROUP_ID, artifact.getGroupId() );
        assertEquals( ARCHIVA_TEST_ARTIFACT_ID, artifact.getArtifactId() );
        assertEquals( "1.0", artifact.getVersion() );
        assertEquals( "jar", artifact.getType() );
        assertNull( "Repository should be null since the model was not found in the database!", artifact.getRepositoryId() );
    }
View Full Code Here

        repoBrowsingControl.verify();
     
        assertNotNull( artifacts );
        assertEquals( 1, artifacts.size() );
       
        Artifact artifact = artifacts.get( 0 );
        assertEquals( ARCHIVA_TEST_GROUP_ID, artifact.getGroupId() );
        assertEquals( ARCHIVA_TEST_ARTIFACT_ID, artifact.getArtifactId() );
        assertEquals( "1.0", artifact.getVersion() );
        assertEquals( "jar", artifact.getType() );
        assertNotNull( "Repository should not be null!", artifact.getRepositoryId() );
        assertEquals( "repo1.mirror", artifact.getRepositoryId() );
    }
View Full Code Here

                        {
                            ArchivaArtifact pomArtifact = artifactDAO.getArtifact(
                                  hit.getGroupId(), hit.getArtifactId(), version, null, "pom", repo );
                            if( pomArtifact != null )
                            {
                                Artifact artifact = new Artifact( pomArtifact.getModel().getRepositoryId(), pomArtifact.getGroupId(), pomArtifact.getArtifactId(), pomArtifact.getVersion(),
                                                                 pomArtifact.getType() );
                                                                 //pomArtifact.getType(), pomArtifact.getModel().getWhenGathered() );
                                artifacts.add( artifact );
                                break;
                            }
View Full Code Here

        ArtifactsByChecksumConstraint constraint = new ArtifactsByChecksumConstraint( checksum );
        List<ArchivaArtifact> artifacts = artifactDAO.queryArtifacts( constraint );
       
        for( ArchivaArtifact archivaArtifact : artifacts )
        {
            Artifact artifact = new Artifact( archivaArtifact.getModel().getRepositoryId(), archivaArtifact.getModel().getGroupId(),
                          archivaArtifact.getModel().getArtifactId(), archivaArtifact.getModel().getVersion(), archivaArtifact.getType() );
                          //archivaArtifact.getModel().getWhenGathered() );
            results.add( artifact );
        }
       
View Full Code Here

       
        final BrowsingResults results = repoBrowsing.selectArtifactId( "", observableRepos, groupId, artifactId );
       
        for( final String version : results.getVersions() )
        {
            final Artifact artifact = new Artifact( "", groupId, artifactId, version, "pom" );
            //ArchivaArtifact pomArtifact = artifactDAO.getArtifact( groupId, artifactId, version, "", "pom",  );
            //Artifact artifact = new Artifact( "", groupId, artifactId, version, pomArtifact.getType() );
                          //pomArtifact.getModel().getWhenGathered() );
           
            artifacts.add( artifact );
View Full Code Here

TOP

Related Classes of org.apache.archiva.web.xmlrpc.api.beans.Artifact

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.