Package org.apache.ivy.core.resolve

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


        Message.setDefaultLogger(new IvyLoggingAdaper());
    }

    public ResolvedConfiguration resolve(Configuration configuration, Ivy ivy, ModuleDescriptor moduleDescriptor) {
        Clock clock = new Clock();
        ResolveOptions resolveOptions = createResolveOptions(configuration);
        ResolveReport resolveReport;
        try {
            resolveReport = ivy.resolve(moduleDescriptor, resolveOptions);
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here


        logger.debug("Timing: Ivy resolve took {}", clock.getTime());
        return new ResolvedConfigurationImpl(resolveReport, configuration);
    }

    private ResolveOptions createResolveOptions(Configuration configuration) {
        ResolveOptions resolveOptions = new ResolveOptions();
        resolveOptions.setDownload(false);
        resolveOptions.setConfs(WrapUtil.toArray(configuration.getName()));
        return resolveOptions;
    }
View Full Code Here

    }

    Matcher<ResolveOptions> equaltResolveOptions(final String... confs) {
        return new BaseMatcher<ResolveOptions>() {
            public boolean matches(Object o) {
                ResolveOptions otherOptions = (ResolveOptions) o;
                return Arrays.equals(confs, otherOptions.getConfs());
            }

            public void describeTo(Description description) {
                description.appendText("Checking Resolveoptions");
            }
View Full Code Here

        bundleInfo.addArtifact(new BundleArtifact(false, new File("test/test-repo/bundlerepo/"
                + jarName).toURI(), null));
        DefaultModuleDescriptor md = BundleInfoAdapter.toModuleDescriptor(
            OSGiManifestParser.getInstance(), null, bundleInfo, profileProvider);
        ResolveReport resolveReport = ivy.resolve(md,
            new ResolveOptions().setConfs(new String[] {conf}).setOutputReport(false));
        assertFalse("resolve failed " + resolveReport.getAllProblemMessages(),
            resolveReport.hasError());
        Set<ModuleRevisionId> actual = new HashSet<ModuleRevisionId>();
        List<Artifact> artifacts = resolveReport.getArtifacts();
        for (Artifact artfact : artifacts) {
View Full Code Here

        bundleInfo.addArtifact(new BundleArtifact(false, new File("test/test-repo/bundlerepo/"
                + jarName).toURI(), null));
        DefaultModuleDescriptor md = BundleInfoAdapter.toModuleDescriptor(
            OSGiManifestParser.getInstance(), null, bundleInfo, profileProvider);
        ResolveReport resolveReport = ivy.resolve(md,
            new ResolveOptions().setConfs(new String[] {conf}).setOutputReport(false));
        assertTrue(resolveReport.hasError());
    }
View Full Code Here

        Message.deprecated("using cache and useOrigin when calling download is not supported anymore");
        return ivy.getResolveEngine().download(artifact, new DownloadOptions());
    }

    public ResolvedModuleRevision findModule(ModuleRevisionId id) {
        ResolveOptions options = new ResolveOptions();
        options.setValidate(false);
        return ivy.getResolveEngine().findModule(id, options);
    }
View Full Code Here

            Date date, boolean validate, boolean useCacheOnly, boolean transitive,
            boolean useOrigin, boolean download, boolean outputReport, Filter artifactFilter) {
        if (useOrigin) {
            ivy.getSettings().useDeprecatedUseOrigin();
        }
        return new ResolveOptions().setConfs(confs).setRevision(revision).setValidate(validate)
                .setUseCacheOnly(useCacheOnly).setTransitive(transitive).setDownload(download)
                .setOutputReport(outputReport).setArtifactFilter(artifactFilter);
    }
View Full Code Here

                    "org1#mod1.2;2.1.0:2.1 (needed by [apache#resolve-noconflict;1.0])") != -1);
        }
    }

    private ResolveOptions getResolveOptions() {
        return new ResolveOptions().setValidate(false);
    }
View Full Code Here

    private ResolvedModuleRevision resolveModule(IvySettings settings, FileSystemResolver resolver,
            String module) throws ParseException {
        return resolver.getDependency(
            new DefaultDependencyDescriptor(ModuleRevisionId.parse(module), false),
            new ResolveData(new ResolveEngine(settings, new EventManager(),
                    new SortEngine(settings)), new ResolveOptions()));
    }
View Full Code Here

            }
        }
    }

    private ResolveOptions getResolveOptions() {
        return new ResolveOptions().setValidate(false);
    }
View Full Code Here

TOP

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

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.