Package org.apache.ivy.plugins.repository.url

Examples of org.apache.ivy.plugins.repository.url.URLResource


            if (name.contains("!"))
            {
                String[] split = name.split("!");
                url = new URL("jar:" + url + "!/" + split[1] + "." + artifact.getExt());
            }
            res = new URLResource(url);
        }
        catch (MalformedURLException e)
        {
            System.out.println("Oops! " + e);
        }
View Full Code Here


    {
        source = encode(source);
        Resource res = resourcesCache.get(source);
        if (res == null)
        {
            res = new URLResource(new URL(source));
            resourcesCache.put(source, res);
        }
        Log.debug(format("SIGIL: getResource(%s) = %d", source, res));
        return res;
    }
View Full Code Here

        @Override
        public ModuleDescriptor parseDescriptor(ParserSettings settings, URL xmlURL,
            boolean validate) throws ParseException, IOException
        {
            return parseDescriptor(settings, xmlURL, new URLResource(xmlURL), validate);
        }
View Full Code Here

            String cacheKey = ivyURL.toString() + defaultSettings.hashCode();
            DefaultModuleDescriptor dmd = rawCache.get(cacheKey);

            if (dmd == null)
            {
                URLResource res = new URLResource(ivyURL);
                // Note: this doesn't contain the augmented dependencies, which is OK,
                // since the ProjectRepository only needs the id and status.
                dmd = delegateParse(defaultSettings, ivyURL, res, false);
                rawCache.put(cacheKey, dmd);
            }
View Full Code Here

import org.xml.sax.helpers.DefaultHandler;

public abstract class AbstractModuleDescriptorParser implements ModuleDescriptorParser {
    public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL descriptorURL,
            boolean validate) throws ParseException, IOException {
        return parseDescriptor(ivySettings, descriptorURL, new URLResource(descriptorURL), validate);
    }
View Full Code Here

        }
    }

    public void testAccept() throws Exception {
        assertTrue(PomModuleDescriptorParser.getInstance().accept(
            new URLResource(getClass().getResource("test-simple.pom"))));
        assertFalse(PomModuleDescriptorParser.getInstance().accept(
            new URLResource(XmlModuleDescriptorParserTest.class.getResource("test.xml"))));
    }
View Full Code Here

        assertEquals(extraAtt, dds[0].getAllDependencyArtifacts()[0].getExtraAttributes());

        // now we verify the conversion to an Ivy file
        PomModuleDescriptorParser.getInstance().toIvyFile(
            getClass().getResource("test-dependencies-with-classifier.pom").openStream(),
            new URLResource(getClass().getResource("test-dependencies-with-classifier.pom")), dest,
            md);

        assertTrue(dest.exists());

        // the converted Ivy file should be parsable with validate=true
View Full Code Here

            EventManager eventManager = getEventManager();
            try {
                if (eventManager != null) {
                    getRepository().addTransferListener(eventManager);
                }
                Resource obrResource = new URLResource(url);
                CacheResourceOptions options = new CacheResourceOptions();
                if (metadataTtl != null) {
                    options.setTtl(metadataTtl.longValue());
                }
                if (forceMetadataUpdate != null) {
View Full Code Here

        }
    }

    public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL descriptorURL,
            boolean validate) throws ParseException, IOException {
        URLResource resource = new URLResource(descriptorURL);
        return parseDescriptor(ivySettings, descriptorURL, resource, validate);
    }
View Full Code Here

        return "pom";
    }

    public ModuleDescriptor parseDescriptor(ParserSettings ivySettings, URL descriptorURL,
            boolean validate) throws ParseException, IOException {
        URLResource resource = new URLResource(descriptorURL);
        return parseDescriptor(ivySettings, descriptorURL, resource, validate);
    }
View Full Code Here

TOP

Related Classes of org.apache.ivy.plugins.repository.url.URLResource

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.