Package org.apache.maven.archiva.model

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


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

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

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

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

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

    }

    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

    }

    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

    {
        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

    }

    private ArchivaArtifact createArchivaArtifact( String groupId, String artifactId, String version, String classifier,
                                                   String type )
    {
        ArchivaArtifact artifact = new ArchivaArtifact( groupId, artifactId, version, classifier, type );
        return artifact;
    }
View Full Code Here

            // Test for possible artifact reference syntax.
            try
            {
                ArtifactReference ref = repository.toArtifactReference( path );
                ArchivaArtifact artifact = new ArchivaArtifact( ref );
                record.setArtifact( artifact );
            }
            catch ( LayoutException e )
            {
                // Not an artifact.
View Full Code Here

    public ArchivaProjectModel selectVersion( String principle, List<String> observableRepositoryIds, String groupId,
                                              String artifactId, String version )
        throws ObjectNotFoundException, ArchivaDatabaseException
    {
        ArchivaArtifact pomArtifact = getArtifact( principle, observableRepositoryIds, groupId, artifactId, version );

        ArchivaProjectModel model;
        version = pomArtifact.getVersion();

        if ( !pomArtifact.getModel().isProcessed() )
        {
            // Process it.
            dbUpdater.updateUnprocessed( pomArtifact );
        }
View Full Code Here

TOP

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

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.