Examples of queryArtifacts()


Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

       
        List<Artifact> results = new ArrayList<Artifact>();
        ArtifactDAO artifactDAO = archivaDAO.getArtifactDAO();
       
        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() );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        ArchivaArtifact artifact = adao.getArtifact( "javax.sql", "jdbc", "2.0", null, "jar", repo.getId() );

        assertNotNull( artifact );

        // Test for artifact existance.
        List<ArchivaArtifact> artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for unprocessed artifacts.
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        List<ArchivaArtifact> artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for unprocessed artifacts.
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
        assertNotNull( "Unprocessed Results should not be null.", unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected.", 1, unprocessedResultList.size() );

        // Execute the database task.
        DatabaseTask dataTask = new DatabaseTask();
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        dataTask.setName( "testDataTask" );

        taskExecutor.executeTask( dataTask );
       
        // Test for artifact existance.
        artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for processed artifacts.
        List<ArchivaArtifact> processedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( true ) );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for processed artifacts.
        List<ArchivaArtifact> processedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( true ) );
        assertNotNull( "Processed Results should not be null.", processedResultList );
        assertEquals( "Incorrect number of processed artifacts detected.", 1, processedResultList.size() );
    }
   
    protected ManagedRepositoryConfiguration createRepository( String id, String name, File location )
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        repoTask.setRepositoryId( "testRepo" );
       
        taskExecutor.executeTask( repoTask );

        ArtifactDAO adao = dao.getArtifactDAO();
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
       
        assertNotNull( unprocessedResultList );
        assertEquals("Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
    }
   
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

            repoStatistics.setDateOfScan( repoContentStat.getWhenGathered() );
               
            try
            {
                //TODO use the repo content stats whenGathered date instead of endDate for single repo reports
                List<ArchivaArtifact> types = artifactDao.queryArtifacts(
                         new ArtifactsByRepositoryConstraint( repository, JAR_TYPE, endDate, "whenGathered" ) );
                repoStatistics.setJarCount( types.size() );
               
                types = artifactDao.queryArtifacts(
                        new ArtifactsByRepositoryConstraint( repository, WAR_TYPE, endDate, "whenGathered" ) );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

                //TODO use the repo content stats whenGathered date instead of endDate for single repo reports
                List<ArchivaArtifact> types = artifactDao.queryArtifacts(
                         new ArtifactsByRepositoryConstraint( repository, JAR_TYPE, endDate, "whenGathered" ) );
                repoStatistics.setJarCount( types.size() );
               
                types = artifactDao.queryArtifacts(
                        new ArtifactsByRepositoryConstraint( repository, WAR_TYPE, endDate, "whenGathered" ) );
                repoStatistics.setWarCount( types.size() );
               
                types = artifactDao.queryArtifacts(
                        new ArtifactsByRepositoryConstraint( repository, MAVEN_PLUGIN, endDate, "whenGathered" ) );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

               
                types = artifactDao.queryArtifacts(
                        new ArtifactsByRepositoryConstraint( repository, WAR_TYPE, endDate, "whenGathered" ) );
                repoStatistics.setWarCount( types.size() );
               
                types = artifactDao.queryArtifacts(
                        new ArtifactsByRepositoryConstraint( repository, MAVEN_PLUGIN, endDate, "whenGathered" ) );
                repoStatistics.setPluginCount( types.size() );
               
                // TODO: must need to be able to track archetypes. possible way of identifying an
                //      archetype is by checking if archetype.xml exists in src/main/resources/META-INF/
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        repoTask.setRepositoryId( "testRepo" );
       
        taskExecutor.executeTask( repoTask );

        ArtifactDAO adao = dao.getArtifactDAO();
        List unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
       
        assertNotNull( unprocessedResultList );
        assertEquals("Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
    }
}
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.