Examples of ArchivaArtifact


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

   
    private ArtifactDAO artifactDao;

    public ArchivaArtifact createArtifact( String groupId, String artifactId, String version )
    {
        ArchivaArtifact artifact = artifactDao.createArtifact( groupId, artifactId, version, "", "jar" );
        artifact.getModel().setLastModified( new Date() ); // mandatory field.
        artifact.getModel().setRepositoryId( "central" );
        return artifact;
    }
View Full Code Here

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

    }

    public void saveTestData()
        throws Exception
    {
        ArchivaArtifact artifact;

        // Setup artifacts in fresh DB.
        artifact = createArtifact( "commons-lang", "commons-lang", "2.0" );
        artifactDao.saveArtifact( artifact );
View Full Code Here

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

        ManagedRepositoryConfiguration repo = createRepository( "testRepo", "Test Repository", repoDir );
        assertNotNull( repo );

        ArtifactDAO adao = dao.getArtifactDAO();

        ArchivaArtifact sqlArtifact = adao.createArtifact( "javax.sql", "jdbc", "2.0", "", "jar" );
        sqlArtifact.getModel().setLastModified( new Date() );
        sqlArtifact.getModel().setSize( 1234 );
        sqlArtifact.getModel().setOrigin( "testcase" );
        sqlArtifact.getModel().setWhenProcessed( null );

        adao.saveArtifact( sqlArtifact );

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

        assertNotNull( artifact );

        // Test for artifact existance.
        List artifactList = adao.queryArtifacts( null );
View Full Code Here

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

    }
   
    public void testIfArtifactExists()
        throws Exception
    {     
        ArchivaArtifact artifact = createArtifact(
              "org.apache.maven.archiva", "archiva-lucene-cleanup", "1.0", "jar" );
       
        luceneCleanupRemoveIndexConsumer.processArchivaArtifact( artifact );             
    }
View Full Code Here

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

    }
   
    public void testIfArtifactDoesNotExist()
        throws Exception
    {
        ArchivaArtifact artifact = createArtifact(
              "org.apache.maven.archiva", "deleted-artifact", "1.0", "jar" );
       
        luceneCleanupRemoveIndexConsumer.processArchivaArtifact( artifact );            
    }
View Full Code Here

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

        model.setArtifactId( artifactId );
        model.setVersion( version );
        model.setType( type );
        model.setRepositoryId( "test-repo" );

        return new ArchivaArtifact( model );
    }
View Full Code Here

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

        model.setArtifactId( artifactId );
        model.setVersion( version );
        model.setType( type );
        model.setRepositoryId( TEST_REPO_ID );

        return new ArchivaArtifact( model );
    }
View Full Code Here

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

    }

    public void testIfArtifactWasNotDeleted()
        throws Exception
    {
        ArchivaArtifact artifact = createArtifact( TEST_GROUP_ID, "do-not-cleanup-artifact-test", TEST_VERSION, "pom" );

        projectModelDAOControl.replay();

        dbCleanupRemoveProjectConsumer.processArchivaArtifact( artifact );
View Full Code Here

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

    }

    public void testIfArtifactWasDeleted()
        throws Exception
    {
        ArchivaArtifact artifact = createArtifact( TEST_GROUP_ID, TEST_ARTIFACT_ID, TEST_VERSION, "pom" );

        ArchivaProjectModel projectModel = createProjectModel( TEST_GROUP_ID, TEST_ARTIFACT_ID, TEST_VERSION );

        //this should return a value
        projectModelDAOControl.expectAndReturn(
View Full Code Here

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

    {
        Map<String, HashcodesRecord> records = new HashMap<String, HashcodesRecord>();

        for ( Entry<String, ArchivaArtifact> entry : getObjectMap().entrySet() )
        {
            ArchivaArtifact artifact = entry.getValue();
            File dumpFile = getDumpFile( basedir, artifact );
            HashcodesRecord record = HashcodesRecordLoader.loadRecord( dumpFile, artifact );
            record.setRepositoryId( "test-repo" );
            records.put( entry.getKey(), record );
        }
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.