Examples of ArtifactMetadataSource


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

            MavenProject project = (MavenProject) helper.evaluate( "${project}" );
            DependencyTreeBuilder dependencyTreeBuilder =
                (DependencyTreeBuilder) helper.getComponent( DependencyTreeBuilder.class );
            ArtifactRepository repository = (ArtifactRepository) helper.evaluate( "${localRepository}" );
            ArtifactFactory factory = (ArtifactFactory) helper.getComponent( ArtifactFactory.class );
            ArtifactMetadataSource metadataSource =
                (ArtifactMetadataSource) helper.getComponent( ArtifactMetadataSource.class );
            ArtifactCollector collector = (ArtifactCollector) helper.getComponent( ArtifactCollector.class );
            ArtifactFilter filter = null; // we need to evaluate all scopes
            DependencyNode node =
                dependencyTreeBuilder.buildDependencyTree( project, repository, factory, metadataSource, filter,
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 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

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

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

        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

       
        Artifact g3 = createLocalArtifact( "g", "1.0-SNAPSHOT", null );
       
        long incorrectFileLength = g3.getFile().length();
       
        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

        exclusions.add( "stax:stax-api" );
        exclusions.add( "log4j:log4j" );

        ArtifactFilter filter = new ExcludesArtifactFilter( exclusions );

        ArtifactMetadataSource source =
            (ArtifactMetadataSource) container.lookup( ArtifactMetadataSource.ROLE, "maven" );
        ArtifactResolutionResult result = resolver.resolveTransitively( Collections.singleton( artifact ),
                                                                        dummyArtifact, localRepository,
                                                                        remoteRepositories, source, filter );
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.