Package org.apache.ivy.core.resolve

Examples of org.apache.ivy.core.resolve.ResolvedModuleRevision


            resolver.setName("packager");

            // Get module descriptor
            ModuleRevisionId mrid = ModuleRevisionId.newInstance("org", "A", "1.0");
            ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(
                    mrid, false), data);

            // Download artifact
            Artifact artifact = new DefaultArtifact(mrid, rmr.getPublicationDate(), "A", "jar",
                    "jar");
            resolver.download(new Artifact[] {artifact}, downloadOptions());

            // assert that the file A.jar is extracted from the archive
            File jar = new File(builddir, "org/A/1.0/artifacts/jars/A.jar");
View Full Code Here


            resolver.setName("packager");

            // Get module descriptor
            ModuleRevisionId mrid = ModuleRevisionId.newInstance("org", "B", "1.0");
            ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(
                    mrid, false), data);

            // Download artifact
            Artifact artifact = new DefaultArtifact(mrid, rmr.getPublicationDate(), "B", "jar",
                    "jar");
            resolver.download(new Artifact[] {artifact}, downloadOptions());

            // assert that the file B.jar is extracted from the archive
            File jar = new File(builddir, "org/B/1.0/artifacts/jars/B.jar");
View Full Code Here

            false, new GregorianCalendar(2005, 1, 20).getTime());
        dual.setIvyResolver(ivyResolver);
        dual.setArtifactResolver(artifactResolver);
        DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("org", "mod", "rev"), false);
        ResolvedModuleRevision rmr = dual.getDependency(dd, _data);

        assertNotNull(rmr);
        assertEquals(dual, rmr.getArtifactResolver());
        assertEquals(Arrays.asList(new DependencyDescriptor[] {dd}), ivyResolver.askedDeps);
        assertTrue(artifactResolver.askedDeps.isEmpty());
    }
View Full Code Here

            new GregorianCalendar(2005, 1, 20).getTime());
        dual.setIvyResolver(ivyResolver);
        dual.setArtifactResolver(artifactResolver);
        DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("org", "mod", "rev"), false);
        ResolvedModuleRevision rmr = dual.getDependency(dd, _data);

        assertNotNull(rmr);
        assertEquals(artifactResolver, rmr.getResolver());
        assertEquals(Arrays.asList(new DependencyDescriptor[] {dd}), ivyResolver.askedDeps);
        assertEquals(Arrays.asList(new DependencyDescriptor[] {dd}), artifactResolver.askedDeps);
    }
View Full Code Here

            false, new GregorianCalendar(2005, 1, 20).getTime());
        dual.setIvyResolver(ivyResolver);
        dual.setArtifactResolver(artifactResolver);
        DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("org", "mod", "rev"), false);
        ResolvedModuleRevision rmr = dual.getDependency(dd, _data);

        assertNull(rmr);
        assertEquals(Arrays.asList(new DependencyDescriptor[] {dd}), ivyResolver.askedDeps);
        assertEquals(Arrays.asList(new DependencyDescriptor[] {dd}), artifactResolver.askedDeps);
    }
View Full Code Here

        assertTrue(resolver instanceof MirroredURLResolver);
        MirroredURLResolver mirrored = (MirroredURLResolver) resolver;

        DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("commons-lang", "commons-lang", "2.4"), false);
        ResolvedModuleRevision rmr = mirrored.getDependency(dd, data);
        assertNotNull(rmr);
    }
View Full Code Here

        assertTrue(resolver instanceof MirroredURLResolver);
        MirroredURLResolver mirrored = (MirroredURLResolver) resolver;

        DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("commons-lang", "commons-lang", "2.4"), false);
        ResolvedModuleRevision rmr = mirrored.getDependency(dd, data);
        assertNotNull(rmr);
    }
View Full Code Here

        assertTrue(resolver instanceof MirroredURLResolver);
        MirroredURLResolver mirrored = (MirroredURLResolver) resolver;

        DefaultDependencyDescriptor dd = new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("commons-lang", "commons-lang", "2.4"), false);
        ResolvedModuleRevision rmr = mirrored.getDependency(dd, data);
        assertNull(rmr);
    }
View Full Code Here

        r.setName(name);
        r.setSettings(settings);
        if (findRevision) {
            DefaultModuleDescriptor md = new DefaultModuleDescriptor(mrid, "integration",
                    publicationDate, isdefault);
            r.rmr = new ResolvedModuleRevision(r, r, md, new MetadataArtifactDownloadReport(
                    md.getMetadataArtifact()));
        }
        return r;
    }
View Full Code Here

    ResolvedModuleRevision rmr;

    public ResolvedModuleRevision getDependency(DependencyDescriptor dd, ResolveData data)
            throws ParseException {
        ResolvedModuleRevision mr = data.getCurrentResolvedModuleRevision();
        if (mr != null) {
            if (shouldReturnResolvedModule(dd, mr)) {
                return mr;
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.ivy.core.resolve.ResolvedModuleRevision

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.