Package org.apache.archiva.metadata.repository.storage.maven2

Examples of org.apache.archiva.metadata.repository.storage.maven2.MavenArtifactFacet


        ArtifactReference artifact = new ArtifactReference();
        artifact.setGroupId( metadata.getNamespace() );
        artifact.setArtifactId( metadata.getProject() );
        artifact.setVersion( metadata.getVersion() );
        MavenArtifactFacet facet = (MavenArtifactFacet) metadata.getFacet( MavenArtifactFacet.FACET_ID );
        if ( facet != null )
        {
            artifact.setClassifier( facet.getClassifier() );
            artifact.setType( facet.getType() );
        }

        return artifact;
    }
View Full Code Here


                                {
                                    if ( StringUtils.isNotBlank( reference.getClassifier() ) )
                                    {

                                        // cleanup facet which contains classifier information
                                        MavenArtifactFacet mavenArtifactFacet =
                                            (MavenArtifactFacet) artifactMetadata.getFacet(
                                                MavenArtifactFacet.FACET_ID );

                                        if ( StringUtils.equals( reference.getClassifier(),
                                                                 mavenArtifactFacet.getClassifier() ) )
                                        {
                                            artifactMetadata.removeFacet( MavenArtifactFacet.FACET_ID );
                                            String groupId = reference.getGroupId(), artifactId =
                                                reference.getArtifactId(),
                                                version = reference.getVersion();
                                            MavenArtifactFacet mavenArtifactFacetToCompare = new MavenArtifactFacet();
                                            mavenArtifactFacetToCompare.setClassifier( reference.getClassifier() );
                                            metadataRepository.removeArtifact( repository.getId(), groupId, artifactId,
                                                                               version, mavenArtifactFacetToCompare );
                                            metadataRepository.save();
                                        }
View Full Code Here

                        {
                            throw new ArchivaRestServiceException(
                                "You must configure a type/packaging when using classifier", 400, null );
                        }
                        // cleanup facet which contains classifier information
                        MavenArtifactFacet mavenArtifactFacet =
                            (MavenArtifactFacet) artifactMetadata.getFacet( MavenArtifactFacet.FACET_ID );

                        if ( StringUtils.equals( artifact.getClassifier(), mavenArtifactFacet.getClassifier() ) )
                        {
                            artifactMetadata.removeFacet( MavenArtifactFacet.FACET_ID );
                            String groupId = artifact.getGroupId(), artifactId = artifact.getArtifactId(), version =
                                artifact.getVersion();
                            MavenArtifactFacet mavenArtifactFacetToCompare = new MavenArtifactFacet();
                            mavenArtifactFacetToCompare.setClassifier( artifact.getClassifier() );
                            metadataRepository.removeArtifact( repositoryId, groupId, artifactId, version,
                                                               mavenArtifactFacetToCompare );
                            metadataRepository.save();
                        }
View Full Code Here

    private ManagedRepository repository;

    public ManagedDefaultRepositoryContent()
    {
        // default to use if there are none supplied as components
        this.artifactMappingProviders = Collections.singletonList( new DefaultArtifactMappingProvider() );
    }
View Full Code Here

    private ManagedRepository repository;

    public ManagedDefaultRepositoryContent()
    {
        // default to use if there are none supplied as components
        this.artifactMappingProviders = Collections.singletonList( new DefaultArtifactMappingProvider() );
    }
View Full Code Here

    private ManagedRepository repository;

    public ManagedDefaultRepositoryContent()
    {
        // default to use if there are none supplied as components
        this.artifactMappingProviders = Collections.singletonList( new DefaultArtifactMappingProvider() );
    }
View Full Code Here

    private ManagedRepository repository;

    public ManagedDefaultRepositoryContent()
    {
        // default to use if there are none supplied as components
        this.artifactMappingProviders = Collections.singletonList( new DefaultArtifactMappingProvider() );
    }
View Full Code Here

    private ManagedRepository repository;

    public ManagedDefaultRepositoryContent()
    {
        // default to use if there are none supplied as components
        this.artifactMappingProviders = Collections.singletonList( new DefaultArtifactMappingProvider() );
    }
View Full Code Here

        ArtifactReference artifact = new ArtifactReference();
        artifact.setGroupId( metadata.getNamespace() );
        artifact.setArtifactId( metadata.getProject() );
        artifact.setVersion( metadata.getVersion() );
        MavenArtifactFacet facet = (MavenArtifactFacet) metadata.getFacet( MavenArtifactFacet.FACET_ID );
        if ( facet != null )
        {
            artifact.setClassifier( facet.getClassifier() );
            artifact.setType( facet.getType() );
        }

        return artifact;
    }
View Full Code Here

        metadata.setSize( 12345L );
        metadata.setProjectVersion( projectVersion );
        metadata.setVersion( projectVersion );
        metadata.setNamespace( namespace );

        MavenArtifactFacet facet = new MavenArtifactFacet();
        facet.setType( type );
        metadata.addFacet( facet );

        return metadata;
    }
View Full Code Here

TOP

Related Classes of org.apache.archiva.metadata.repository.storage.maven2.MavenArtifactFacet

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.