Package org.apache.archiva.rest.api.model

Examples of org.apache.archiva.rest.api.model.Artifact


            if ( hit.getVersions().size() > 0 )
            {
                for ( String version : hit.getVersions() )
                {

                    Artifact versionned = new BeanReplicator().replicateBean( hit, Artifact.class );

                    if ( StringUtils.isNotBlank( version ) )
                    {
                        versionned.setVersion( version );
                        versionned.setUrl( getArtifactUrl( versionned ) );

                        artifacts.add( versionned );

                    }
                }
View Full Code Here


    public void deleteArtifactKarmaFailed()
        throws Exception
    {
        try
        {
            Artifact artifact = new Artifact();
            artifact.setGroupId( "commons-logging" );
            artifact.setArtifactId( "commons-logging" );
            artifact.setVersion( "1.0.1" );
            artifact.setPackaging( "jar" );

            RepositoriesService repositoriesService = getRepositoriesService( null );

            repositoriesService.deleteArtifact( artifact, SOURCE_REPO_ID );
        }
View Full Code Here

        try
        {

            RepositoriesService repositoriesService = getRepositoriesService( authorizationHeader );

            Artifact artifact = new Artifact();
            artifact.setGroupId( "commons-logging" );
            artifact.setArtifactId( "commons-logging" );
            artifact.setVersion( "1.0.1" );
            artifact.setPackaging( "jar" );

            repositoriesService.deleteArtifact( artifact, null );
        }
        catch ( ServerWebApplicationException e )
        {
View Full Code Here

            File artifactFile =
                new File( "target/test-origin-repo/commons-logging/commons-logging/1.0.1/commons-logging-1.0.1.jar" );

            assertTrue( "artifact not exists:" + artifactFile.getPath(), artifactFile.exists() );

            Artifact artifact = new Artifact();
            artifact.setGroupId( "commons-logging" );
            artifact.setArtifactId( "commons-logging" );
            artifact.setVersion( "1.0.1" );
            artifact.setPackaging( "jar" );

            RepositoriesService repositoriesService = getRepositoriesService( authorizationHeader );

            repositoriesService.deleteArtifact( artifact, SOURCE_REPO_ID );
View Full Code Here

    {
        // services need a ThreadLocal variable to test karma
        RedbackAuthenticationThreadLocal.set( getRedbackRequestInformation() );
        try
        {
            Artifact artifact = new Artifact();
            artifact.setGroupId( groupId );
            artifact.setArtifactId( artifactId );
            artifact.setVersion( version );
            artifact.setClassifier( classifier );
            artifact.setPackaging( type );

            repositoriesService.deleteArtifact( artifact, repositoryId );
        }
        catch ( ArchivaRestServiceException e )
        {
View Full Code Here

                    // sure ??
                    versionned.setUrl( artifactInfo.remoteUrl );
                    */
                    // FIXME archiva url ??

                    Artifact versionned = new BeanReplicator().replicateBean( hit, Artifact.class );

                    if ( StringUtils.isNotBlank( version ) )
                    {
                        versionned.setVersion( version );
                        versionned.setUrl( getArtifactUrl( httpContext, versionned ) );

                        artifacts.add( versionned );

                    }
                }
View Full Code Here

TOP

Related Classes of org.apache.archiva.rest.api.model.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.