Package org.apache.ivy.core.module.id

Examples of org.apache.ivy.core.module.id.ModuleRevisionId


            }

            IResolution resolution = resolver.resolve(requirements, false);
            Log.verbose("resolution: " + resolution.getBundles());

            ModuleRevisionId masterMrid = md.getModuleRevisionId();
            DefaultDependencyDescriptor dd;
            ModuleRevisionId mrid;

            for (ISigilBundle bundle : resolution.getBundles())
            {
                IBundleModelElement info = bundle.getBundleInfo();
                String name = info.getSymbolicName();

                if ("system bundle".equals(name))
                {
                    // e.g. SystemProvider with framework=null
                    Log.verbose("Discarding system bundle");
                    continue;
                }

                ModuleDescriptor bmd = (ModuleDescriptor) bundle.getMeta().get(
                    ModuleDescriptor.class);
                if (bmd != null)
                {
                    ModuleRevisionId bmrid = bmd.getModuleRevisionId();
                    String org = bmrid.getOrganisation();
                    if (org == null)
                        org = masterMrid.getOrganisation();
                    String module = bmrid.getName();
                    String rev = "latest." + bmd.getStatus();

                    mrid = ModuleRevisionId.newInstance(org, module, rev);

                    dd = new SigilDependencyDescriptor(md, mrid, force, changing,
View Full Code Here


    }

    public int retrieve(ModuleId moduleId, String[] confs, File cache, String destFilePattern,
            String destIvyPattern, Filter artifactFilter, boolean sync, boolean useOrigin) {
        try {
            return ivy.retrieve(new ModuleRevisionId(moduleId, Ivy.getWorkingRevision()),
                destFilePattern,
                new RetrieveOptions().setConfs(confs).setDestIvyPattern(destIvyPattern)
                        .setArtifactFilter(artifactFilter).setSync(sync).setUseOrigin(useOrigin));
        } catch (IOException e) {
            throw new RuntimeException(e);
View Full Code Here

    }

    public int retrieve(ModuleId moduleId, String[] confs, File cache, String destFilePattern,
            String destIvyPattern, Filter artifactFilter) {
        try {
            return ivy.retrieve(new ModuleRevisionId(moduleId, Ivy.getWorkingRevision()),
                destFilePattern,
                new RetrieveOptions().setConfs(confs).setDestIvyPattern(destIvyPattern)
                        .setArtifactFilter(artifactFilter));
        } catch (IOException e) {
            throw new RuntimeException(e);
View Full Code Here

    }

    public int retrieve(ModuleId moduleId, String[] confs, File cache, String destFilePattern,
            String destIvyPattern) {
        try {
            return ivy.retrieve(new ModuleRevisionId(moduleId, Ivy.getWorkingRevision()),
                destFilePattern,
                new RetrieveOptions().setConfs(confs).setDestIvyPattern(destIvyPattern));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        }
    }

    public int retrieve(ModuleId moduleId, String[] confs, File cache, String destFilePattern) {
        try {
            return ivy.retrieve(new ModuleRevisionId(moduleId, Ivy.getWorkingRevision()),
                destFilePattern, new RetrieveOptions().setConfs(confs));
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

        ResolveReport report = ivy.resolve(
            LatestConflictManagerTest.class.getResource("ivy-383.xml"), getResolveOptions());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        Iterator iter = defaultReport.getModuleRevisionIds().iterator();
        while (iter.hasNext()) {
            ModuleRevisionId mrid = (ModuleRevisionId) iter.next();
            if (mrid.getName().equals("mod1.1")) {
                assertEquals("1.0", mrid.getRevision());
            } else if (mrid.getName().equals("mod1.2")) {
                assertEquals("2.2", mrid.getRevision());
            }
        }
    }
View Full Code Here

            LatestConflictManagerTest.class.getResource("ivy-latest-time-1.xml"),
            getResolveOptions());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        Iterator iter = defaultReport.getModuleRevisionIds().iterator();
        while (iter.hasNext()) {
            ModuleRevisionId mrid = (ModuleRevisionId) iter.next();
            if (mrid.getName().equals("mod1.1")) {
                assertEquals("1.0", mrid.getRevision());
            } else if (mrid.getName().equals("mod1.2")) {
                assertEquals("2.2", mrid.getRevision());
            }
        }
    }
View Full Code Here

            LatestConflictManagerTest.class.getResource("ivy-latest-time-2.xml"),
            getResolveOptions());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        Iterator iter = defaultReport.getModuleRevisionIds().iterator();
        while (iter.hasNext()) {
            ModuleRevisionId mrid = (ModuleRevisionId) iter.next();
            if (mrid.getName().equals("mod1.1")) {
                assertEquals("1.0", mrid.getRevision());
            } else if (mrid.getName().equals("mod1.2")) {
                assertEquals("2.2", mrid.getRevision());
            }
        }
    }
View Full Code Here

            LatestConflictManagerTest.class.getResource("ivy-latest-time-transitivity.xml"),
            getResolveOptions());
        ConfigurationResolveReport defaultReport = report.getConfigurationReport("default");
        Iterator iter = defaultReport.getModuleRevisionIds().iterator();
        while (iter.hasNext()) {
            ModuleRevisionId mrid = (ModuleRevisionId) iter.next();

            if (mrid.getName().equals("A")) {
                assertEquals("A revision should be 1.0.0", "1.0.0", mrid.getRevision());
            } else if (mrid.getName().equals("D")) {
                assertEquals("D revision should be 1.0.0", "1.0.0", mrid.getRevision());
            }
            // by transitivity
            else if (mrid.getName().equals("B")) {
                assertEquals("B revision should be 1.0.0", "1.0.0", mrid.getRevision());
            } else if (mrid.getName().equals("C")) {
                assertEquals("C revision should be 1.0.2", "1.0.2", mrid.getRevision());
            }
        }
    }
View Full Code Here

            getResolveOptions(new String[] {"*"}));
        assertNotNull(report);
        ModuleDescriptor md = report.getModuleDescriptor();
        assertNotNull(md);

        ModuleRevisionId mrid = md.getModuleRevisionId();
        RetrieveOptions options = getRetrieveOptions();
        options.setConfs(new String[] {"A"});
        Map artifactsToCopy = ivy.getRetrieveEngine().determineArtifactsToCopy(mrid,
            "build/test/retrieve/[module]/[conf]/[artifact]-[revision].[ext]", options);
        assertEquals(2, artifactsToCopy.size());
View Full Code Here

TOP

Related Classes of org.apache.ivy.core.module.id.ModuleRevisionId

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.