Examples of ArtifactMetadataSource


Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

    {
        Artifact g = createLocalArtifact( "g", "1.0" );

        Artifact h = createLocalArtifact( "h", "1.0" );

        ArtifactMetadataSource mds = new ArtifactMetadataSource()
        {
            public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository,
                                             List remoteRepositories )
                throws ArtifactMetadataRetrievalException
            {
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

        deleteLocalArtifact( i );

        Artifact j = createRemoteArtifact( "j", "1.0" );
        deleteLocalArtifact( j );

        ArtifactMetadataSource mds = new ArtifactMetadataSource()
        {
            public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository,
                                             List remoteRepositories )
                throws ArtifactMetadataRetrievalException
            {
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

            Set<Artifact> dependencyArtifacts = createArtifacts( model, null );

            RepositorySession repositorySession = repositorySessionFactory.createSession();
            try
            {
                ArtifactMetadataSource metadataSource =
                    new MetadataArtifactMetadataSource( repositoryIds, repositorySession );

                // Note that we don't permit going to external repositories. We don't need to pass in a local and remote
                // since our metadata source has control over them
                collector.collect( dependencyArtifacts, projectArtifact, managedVersions, null, null, metadataSource,
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

        else
        {
            listeners = Collections.emptyList();
        }

        ArtifactMetadataSource source =
            (ArtifactMetadataSource) container.lookup( ArtifactMetadataSource.ROLE, "maven" );
        ArtifactResolutionResult result =
            resolver.resolveTransitively( Collections.singleton( artifact ), dummyArtifact, Collections.emptyMap(),
                                          localRepository, remoteRepositories, source, filter, listeners );
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

    {
        Artifact g = createLocalArtifact( "g", "1.0" );

        Artifact h = createLocalArtifact( "h", "1.0" );

        ArtifactMetadataSource mds = new ArtifactMetadataSourceImplementation()
        {
            public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository,
                                             List remoteRepositories )
                throws ArtifactMetadataRetrievalException
            {
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

        deleteLocalArtifact( i );

        Artifact j = createRemoteArtifact( "j", "1.0" );
        deleteLocalArtifact( j );

        ArtifactMetadataSource mds = new ArtifactMetadataSourceImplementation()
        {
            public ResolutionGroup retrieve( Artifact artifact, ArtifactRepository localRepository,
                                             List remoteRepositories )
                throws ArtifactMetadataRetrievalException
            {
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

        Artifact n = createArtifact( "n", "1.0" );
        Artifact o = createArtifact( "o", "1.0" );
   
        try
        {
            ArtifactMetadataSource mds = new ArtifactMetadataSourceImplementation();
            artifactResolver.resolveTransitively( new HashSet( Arrays.asList( new Artifact[] { i, n, o } ) ),
                                                  projectArtifact, remoteRepositories(), localRepository(), mds );
            fail( "Resolution succeeded when it should have failed" );
        }
        catch ( MultipleArtifactsNotFoundException expected )
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

        ArtifactRepository repository = remoteRepository();
        List remoteRepositories = Collections.singletonList( repository );

        Artifact a1 = createArtifact( "testGroup", "artifactId", "1.0", "jar" );

        ArtifactMetadataSource mds = new ArtifactMetadataSourceImplementation();

        DefaultArtifactResolver artifactResolver = (DefaultArtifactResolver) this.artifactResolver;

        MockControl control = MockControl.createControl( WagonManager.class );
        WagonManager wagonManager = (WagonManager) control.getMock();
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

        Artifact a1 = createArtifact( "testGroup", "artifactId", "1.0", "jar" );

        Artifact a2 = createArtifact( "testGroup", "anotherId", "1.0", "jar" );

        ArtifactMetadataSource mds = new ArtifactMetadataSourceImplementation();

        DefaultArtifactResolver artifactResolver = (DefaultArtifactResolver) this.artifactResolver;

        MockControl control = MockControl.createControl( WagonManager.class );
        WagonManager wagonManager = (WagonManager) control.getMock();
View Full Code Here

Examples of org.apache.maven.artifact.metadata.ArtifactMetadataSource

        // exception.
        final Set<Artifact> artifactSet = new LinkedHashSet<Artifact>( artifacts );
        final Artifact pomArtifact = config.project().getArtifact();
        final ArtifactRepository localRepo = config.localRepository();
        final List<ArtifactRepository> remoteRepos = config.project().getRemoteArtifactRepositories();
        final ArtifactMetadataSource metadataSource = config.artifactMetadataSource();

        final ArtifactFilter filter = config.filter();
        ArtifactFilter resolutionFilter = null;
        if ( filter != null )
        {
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.