Package org.apache.ivy

Examples of org.apache.ivy.Ivy$IvyCallback


        }});
    }

    private Ivy setUpIvyFactory(final IvySettings ivySettingsDummy, DefaultIvyService ivyService) {
        final IvyFactory ivyFactoryStub = context.mock(IvyFactory.class);
        final Ivy ivyStub = context.mock(Ivy.class);
        context.checking(new Expectations() {{
            allowing(ivyFactoryStub).createIvy(ivySettingsDummy);
            will(returnValue(ivyStub));

            allowing(ivyStub).getSettings();
View Full Code Here


    public IvyDependencyPublisher getDependencyPublisher() {
        return dependencyPublisher;
    }

    public ResolvedConfiguration resolve(final Configuration configuration) {
        Ivy ivy = ivyForResolve(resolverProvider.getResolvers(), metaDataProvider.getGradleUserHomeDir(),
                clientModuleRegistry);
        ModuleDescriptor moduleDescriptor = resolveModuleDescriptorConverter.convert(configuration.getAll(),
                metaDataProvider.getModule(), ivy.getSettings());
        return dependencyResolver.resolve(configuration, ivy, moduleDescriptor);
    }
View Full Code Here

        return dependencyResolver.resolve(configuration, ivy, moduleDescriptor);
    }

    public void publish(Set<Configuration> configurationsToPublish, File descriptorDestination,
                        List<DependencyResolver> publishResolvers) {
        Ivy ivy = ivyForPublish(publishResolvers, metaDataProvider.getGradleUserHomeDir());
        Set<String> confs = Configurations.getNames(configurationsToPublish, false);
        writeDescriptorFile(descriptorDestination, configurationsToPublish, ivy.getSettings());
        dependencyPublisher.publish(
                confs,
                publishResolvers,
                publishModuleDescriptorConverter.convert(configurationsToPublish, metaDataProvider.getModule(), ivy.getSettings()),
                descriptorDestination,
                ivy.getPublishEngine());
    }
View Full Code Here

        final Configuration configurationDummy = context.mock(Configuration.class);
        final Set<Configuration> configurations = WrapUtil.toSet(configurationDummy);
        final ResolvedConfiguration resolvedConfiguration = context.mock(ResolvedConfiguration.class);
        final ModuleDescriptor moduleDescriptorDummy = HelperUtil.createModuleDescriptor(WrapUtil.toSet("someConf"));
        final IvyFactory ivyFactoryStub = context.mock(IvyFactory.class);
        final Ivy ivyStub = context.mock(Ivy.class);
        final IvySettings ivySettingsDummy = new IvySettings();

        context.checking(new Expectations() {{
            allowing(ivyFactoryStub).createIvy(ivySettingsDummy);
            will(returnValue(ivyStub));
View Full Code Here

*/
public class DefaultIvyFactoryTest {
    @Test
    public void testCreateIvy() {
        IvySettings ivySettings = new IvySettings();
        Ivy ivy = new DefaultIvyFactory().createIvy(ivySettings);
        assertThat(ivy, notNullValue());
        assertThat(ivy.getSettings(), equalTo(ivySettings));
    }
View Full Code Here

        ModuleDescriptor parseDescriptor(URL projectURL) throws ParseException,
            IOException
        {
            if (defaultSettings == null)
            {
                Ivy ivy = IvyContext.getContext().peekIvy();
                if (ivy == null)
                    throw new IllegalStateException(
                        "can't get default settings - no ivy context.");
                defaultSettings = ivy.getSettings();
            }

            URL ivyURL = new URL(projectURL, ivyFile);
            String cacheKey = ivyURL.toString() + defaultSettings.hashCode();
            DefaultModuleDescriptor dmd = rawCache.get(cacheKey);
View Full Code Here

         */
        private IBldResolver findResolver()
        {
            if (resolver == null)
            {
                Ivy ivy = IvyContext.getContext().peekIvy();
                if (ivy != null)
                {
                    if (resolverName != null)
                    {
                        DependencyResolver r = ivy.getSettings().getResolver(resolverName);
                        if (r == null)
                        {
                            throw new Error("SigilParser: resolver \"" + resolverName
                                + "\" not defined.");
                        }
                        else if (r instanceof IBldResolver)
                        {
                            resolver = (IBldResolver) r;
                        }
                        else
                        {
                            throw new Error("SigilParser: resolver \"" + resolverName
                                + "\" is not a SigilResolver.");
                        }
                    }
                    else
                    {
                        for (Object r : ivy.getSettings().getResolvers())
                        {
                            if (r instanceof IBldResolver)
                            {
                                resolver = (IBldResolver) r;
                                break;
View Full Code Here

    private Ivy ivy;

    private File _cache;

    protected void setUp() throws Exception {
        ivy = new Ivy();
        ivy.configure(RegexpConflictManagerTest.class.getResource("ivysettings-regexp-test.xml"));
        _cache = new File("build/cache");
        _cache.mkdirs();
    }
View Full Code Here

    protected void tearDown() throws Exception {
        fixture.clean();
    }

    public void testInitFromSettings() throws Exception {
        Ivy ivy = new Ivy();
        ivy.configure(LatestCompatibleConflictManagerTest.class
                .getResource("ivysettings-latest-compatible.xml"));
        ConflictManager cm = ivy.getSettings().getDefaultConflictManager();
        assertTrue(cm instanceof LatestCompatibleConflictManager);
    }
View Full Code Here

    private Ivy ivy;

    private File _cache;

    protected void setUp() throws Exception {
        ivy = new Ivy();
        ivy.configure(LatestConflictManagerTest.class.getResource("ivysettings-latest.xml"));
        _cache = new File("build/cache");
        _cache.mkdirs();
    }
View Full Code Here

TOP

Related Classes of org.apache.ivy.Ivy$IvyCallback

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.