Package org.apache.ivy.core.resolve

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


                + "[organisation]/[module]/[type]s/[artifact]-[revision].[type]");

        resolver.setLatestStrategy(new LatestTimeStrategy());

        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org1", "mod1.1", "2.0");
        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("org1", "mod1.1", "latest.integration"), false), data);
        assertNotNull(rmr);

        assertEquals(mrid, rmr.getId());
        Date pubdate = new GregorianCalendar(2005, 1, 15, 11, 0, 0).getTime();
        assertEquals(pubdate, rmr.getPublicationDate());
    }
View Full Code Here


                + "[organisation]/[module]/[type]s/[artifact]-[revision].[type]");

        resolver.setLatestStrategy(new LatestRevisionStrategy());

        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org1", "mod1.1", "2.0");
        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("org1", "mod1.1", "latest.integration"), false), data);
        assertNotNull(rmr);

        assertEquals(mrid, rmr.getId());
        Date pubdate = new GregorianCalendar(2005, 1, 15, 11, 0, 0).getTime();
        assertEquals(pubdate, rmr.getPublicationDate());
    }
View Full Code Here

                + "[organisation]/[module]/[type]s/[artifact]-[revision].[type]");

        resolver.setLatestStrategy(new LatestRevisionStrategy());

        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org1", "mod1.1", "2.0");
        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("org1", "mod1.1", "latest.integration"), false), data);
        assertNotNull(rmr);

        assertEquals(mrid, rmr.getId());
        Date pubdate = new GregorianCalendar(2005, 1, 15, 11, 0, 0).getTime();
        assertEquals(pubdate, rmr.getPublicationDate());
    }
View Full Code Here

                + "[organisation]/[module]/[type]s/[artifact]-[revision].[type]");

        resolver.setLatestStrategy(new LatestTimeStrategy());

        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org1", "mod1.1", "1.1");
        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("org1", "mod1.1", "1+"), false), data);
        assertNotNull(rmr);

        assertEquals(mrid, rmr.getId());
        Date pubdate = new GregorianCalendar(2005, 0, 2, 11, 0, 0).getTime();
        assertEquals(pubdate, rmr.getPublicationDate());
    }
View Full Code Here

                + "[organisation]/[module]/[type]s/[artifact]-[revision].[type]");

        resolver.setLatestStrategy(new LatestRevisionStrategy());

        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org1", "mod1.1", "1.1");
        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(
                ModuleRevisionId.newInstance("org1", "mod1.1", "1+"), false), data);
        assertNotNull(rmr);

        assertEquals(mrid, rmr.getId());
        Date pubdate = new GregorianCalendar(2005, 0, 2, 11, 0, 0).getTime();
        assertEquals(pubdate, rmr.getPublicationDate());
    }
View Full Code Here

        resolver.addIvyPattern(IVY_PATTERN);
        resolver.addArtifactPattern(settings.getBaseDir() + "/test/repositories/1/"
                + "[organisation]/[module]/[type]s/[artifact]-[revision].[type]");

        ModuleRevisionId mrid = ModuleRevisionId.newInstance("org1", "mod1.1", "1.0");
        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid,
                false), data);
        assertNotNull(rmr);

        assertEquals(mrid, rmr.getId());
        Date pubdate = new GregorianCalendar(2004, 10, 1, 11, 0, 0).getTime();
        assertEquals(pubdate, rmr.getPublicationDate());

        // test to ask to download
        DefaultArtifact artifact = new DefaultArtifact(mrid, pubdate, "mod1.1", "jar", "jar");
        DownloadReport report = resolver.download(new Artifact[] {artifact}, getDownloadOptions());
        assertNotNull(report);
View Full Code Here

                options.setDownload(false);
                data = new ResolveData(engine, options);
            }
            DependencyResolver resolver = getSettings().getResolver(parentMrid);
            dd = NameSpaceHelper.toSystem(dd, getSettings().getContextNamespace());
            ResolvedModuleRevision otherModule = resolver.getDependency(dd, data);
            if (otherModule == null) {
                throw new ParseException("Unable to find " + parentMrid.toString(), 0);
            }
            return otherModule.getDescriptor();

        }
View Full Code Here

                    dependencyMrdis[iDep], false);
            ResolveOptions options = new ResolveOptions();
            options.setRefresh(true);
            options.setUseCacheOnly(true);
            IvyDEMessage.debug("Fetching dependency " + dependencyMrdis[iDep]);
            ResolvedModuleRevision dependency = depResolver.getDependency(depDescriptor,
                new ResolveData(ivy.getResolveEngine(), options));
            if (dependency != null) {
                Artifact[] artifacts = dependency.getDescriptor().getAllArtifacts();
                IvyDEMessage.debug("Dependency " + dependencyMrdis[iDep] + " found: "
                        + artifacts.length + " artifact(s) found");
                result.putArtifactsForDep(dependencyMrdis[iDep], artifacts);
            } else {
                IvyDEMessage.debug("Dependency " + dependencyMrdis[iDep] + " not found");
View Full Code Here

                    MetadataArtifactDownloadReport madr = new MetadataArtifactDownloadReport(af);
                    madr.setDownloadStatus(DownloadStatus.SUCCESSFUL);
                    madr.setSearched(true);

                    return new ResolvedModuleRevision(this, this, workspaceMd, madr);
                } else {
                    IvyDEMessage.verbose("\t\treject as version didn't match");
                }
            }
        }
View Full Code Here

                try {
                    DependencyResolver resolver = ivy.getSettings().getResolver(mrid);
                    if (resolver == null) {
                        return null;
                    }
                    ResolvedModuleRevision dep = resolver.getDependency(ddd, data);
                    if (dep == null) {
                        return null;
                    }
                    String[] confs = dep.getDescriptor().getConfigurationsNames();
                    for (int i = 0; i < confs.length; i++) {
                        confs[i] = base + confs[i];
                    }
                    List ret = new ArrayList(Arrays.asList(confs));
                    ret.add("*");
 
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.