Package org.apache.maven.repository

Examples of org.apache.maven.repository.RepositorySystem


    public Artifact createArtifact( String groupId, String artifactId, String version, String scope, String type )
        throws MavenEmbedderException
    {
        try {
            RepositorySystem repositorySystem = lookup( RepositorySystem.class );
            return repositorySystem.createArtifact( groupId, artifactId, version, scope, type );
        } catch ( ComponentLookupException e ) {
            throw new MavenEmbedderException(e.getMessage(), e);
        }

    }
View Full Code Here


    public Artifact createArtifactWithClassifier( String groupId, String artifactId, String version, String type, String classifier )
        throws MavenEmbedderException
    {
        try {
            RepositorySystem repositorySystem = lookup( RepositorySystem.class );
            return repositorySystem.createArtifactWithClassifier( groupId, artifactId, version, type, classifier );
        } catch ( ComponentLookupException e ) {
            throw new MavenEmbedderException(e.getMessage(), e);
        }
    }
View Full Code Here

    public ArtifactRepository createRepository( String url, String repositoryId ) throws ComponentLookupException {
        String updatePolicyFlag = ArtifactRepositoryPolicy.UPDATE_POLICY_ALWAYS;
        String checksumPolicyFlag = ArtifactRepositoryPolicy.CHECKSUM_POLICY_WARN;
        ArtifactRepositoryPolicy snapshotsPolicy = new ArtifactRepositoryPolicy( true, updatePolicyFlag, checksumPolicyFlag );
        ArtifactRepositoryPolicy releasesPolicy = new ArtifactRepositoryPolicy( true, updatePolicyFlag, checksumPolicyFlag );
        RepositorySystem repositorySystem = lookup( RepositorySystem.class );
        ArtifactRepositoryLayout repositoryLayout = lookup( ArtifactRepositoryLayout.class, "default" );
        return repositorySystem.createArtifactRepository( repositoryId, url, repositoryLayout, snapshotsPolicy, releasesPolicy );
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.repository.RepositorySystem

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.