Package org.apache.ivy.core.module.descriptor

Examples of org.apache.ivy.core.module.descriptor.Artifact


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

                    dd = new SigilDependencyDescriptor(md, mrid, force, changing,
                        transitive);

                    Artifact artifact = (Artifact) bundle.getMeta().get(Artifact.class);
                    if (artifact != null)
                    {
                        dd.addDependencyArtifact(mrid.getName(),
                            new DefaultDependencyArtifactDescriptor(dd,
                                artifact.getName(), "jar", "jar", null, null));
                    }
                }
                else
                {
                    // XXX see FELIX-1395
View Full Code Here


        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid,
                false), data);
        assertNotNull(rmr);
        assertEquals(mrid, rmr.getId());

        Artifact artifact = rmr.getDescriptor().getAllArtifacts()[0];
        DownloadReport report = resolver.download(new Artifact[] {artifact}, new DownloadOptions());
        assertNotNull(report);

        assertEquals(1, report.getArtifactsReports().length);
View Full Code Here

        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid,
                false), data);
        assertNotNull(rmr);
        assertEquals(mrid, rmr.getId());

        Artifact artifact = rmr.getDescriptor().getAllArtifacts()[0];
        DownloadReport report = resolver.download(new Artifact[] {artifact}, new DownloadOptions());
        assertNotNull(report);

        assertEquals(1, report.getArtifactsReports().length);
View Full Code Here

        assertEquals("confextravalue", md.getConfiguration("default").getAttribute("confextra"));

        Artifact[] artifacts = md.getArtifacts("default");
        assertEquals(1, artifacts.length);
        Artifact art = artifacts[0];
        assertEquals("art1", art.getName());
        assertEquals("artextravalue", art.getAttribute("artextra"));

        DependencyDescriptor[] dependencies = md.getDependencies();
        assertNotNull(dependencies);
        assertEquals(1, dependencies.length);
View Full Code Here

        assertNotNull("Published artifacts shouldn't be null", artifacts);
        assertEquals("Number of published artifacts incorrect", 4, artifacts.length);

        // test that the correct configuration has been removed
        for (int i = 0; i < artifacts.length; i++) {
            Artifact current = artifacts[i];
            List currentConfs = Arrays.asList(current.getConfigurations());
            assertTrue("myconf2 hasn't been removed for artifact " + current.getName(),
                !currentConfs.contains("myconf2"));
        }
    }
View Full Code Here

                Set artifacts = new HashSet();
                for (int i = 0; i < confs.length; i++) {
                    artifacts.addAll(Arrays.asList(md.getArtifacts(confs[i])));
                }
                for (Iterator iter = artifacts.iterator(); iter.hasNext();) {
                    Artifact art = (Artifact) iter.next();
                    if (!resolver.exists(art)) {
                        Message.info("declared publication not found: " + art);
                        result = false;
                    }
                }
View Full Code Here

        }

        String packaging = options.getArtifactPackaging();
        if (packaging == null) {
            // find artifact to determine the packaging
            Artifact artifact = findArtifact(md, artifactId);
            if (artifact == null) {
                // no suitable artifact found, default to 'pom'
                packaging = "pom";
            } else {
                packaging = artifact.getType();
            }
        }

        variables.setVariable("ivy.pom.artifactId", artifactId, true);
        variables.setVariable("ivy.pom.packaging", packaging, true);
View Full Code Here

                File report = cacheMgr.getConfigurationResolveReportInCache(resolveId, confs[i]);
                parser.parse(report);

                Artifact[] artifacts = parser.getArtifacts();
                for (int j = 0; j < artifacts.length; j++) {
                    Artifact artifact = artifacts[j];
                    String name = IvyPatternHelper.substitute(getSettings().substitute(getName()),
                        artifact, confs[i]);
                    String value = IvyPatternHelper.substitute(
                        getSettings().substitute(getValue()), artifact, confs[i]);
                    setProperty(name, value);
View Full Code Here

        return (DependencyDescriptor) dds.get(parent);
    }

    private boolean isDependencyModuleExcluded(DependencyDescriptor dd, String rootModuleConf,
            ModuleRevisionId dependencyRevisionId, String conf) {
        Artifact a = DefaultArtifact.newIvyArtifact(dependencyRevisionId, null);
        if (isRoot()) {
            // no callers, but maybe some exclude
            Boolean exclude = doesExclude(md, rootModuleConf, new String[] {rootModuleConf}, dd, a,
                new Stack());
            return exclude == null ? false : exclude.booleanValue();
View Full Code Here

            }
        }

        // now excludes artifacts that aren't accepted by any caller
        for (Iterator iter = artifacts.iterator(); iter.hasNext();) {
            Artifact artifact = (Artifact) iter.next();
            boolean excluded = callers.doesCallersExclude(rootModuleConf, artifact);
            if (excluded) {
                Message.debug(this + " in " + rootModuleConf + ": excluding " + artifact);
                iter.remove();
            }
View Full Code Here

TOP

Related Classes of org.apache.ivy.core.module.descriptor.Artifact

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.