Examples of UrlResource


Examples of aQute.bnd.osgi.URLResource

        // Set the Main-Class
        Manifest manifest = new Manifest();
        manifest.getMainAttributes().putValue("Main-Class", "launch");
        launcherJar.setManifest(manifest);
        launcherJar.putResource("launch.class", new URLResource(ExecutableJarExportWizard.class.getResource("launch.clazz")));

        try {
            launcherJar.write(new File(folder, "launch.jar"));
        } catch (Exception e) {
            status.add(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Error generating launch JAR.", e));
View Full Code Here

Examples of aQute.bnd.osgi.URLResource

        PojoizationPlugin plugin = new PojoizationPlugin();

        Map<String, String> props = new HashMap<String, String>();
        props.put("include-embed-bundles", "true");

        Resource resource = new URLResource(getClass().getResource("/EMBED-MANIFEST.MF"));
        doReturn(dot).when(analyzer).getJar();
        doReturn(resource).when(embed).getResource(eq("META-INF/MANIFEST.MF"));
        analyzer.setClasspath(new Jar[] {embed});

        plugin.setReporter(reporter);
View Full Code Here

Examples of aQute.bnd.osgi.URLResource

    public void testAnalysisWithExcludedEmbedComponents() throws Exception {
        PojoizationPlugin plugin = new PojoizationPlugin();

        Map<String, String> props = new HashMap<String, String>();

        Resource resource = new URLResource(getClass().getResource("/EMBED-MANIFEST.MF"));
        doReturn(dot).when(analyzer).getJar();
        doReturn(resource).when(embed).getResource(eq("META-INF/MANIFEST.MF"));
        analyzer.setClasspath(new Jar[] {embed});

        plugin.setReporter(reporter);
View Full Code Here

Examples of aQute.bnd.osgi.URLResource

        PojoizationPlugin plugin = new PojoizationPlugin();

        Map<String, String> props = new HashMap<String, String>();
        props.put("include-embed-bundles", "true");

        Resource resource = new URLResource(getClass().getResource("/EMBED-MANIFEST.MF"));
        Resource resource2 = new URLResource(getClass().getResource("/metadata-components-only.xml"));
        doReturn(dot).when(analyzer).getJar();
        doReturn(resource).when(embed).getResource(eq("META-INF/MANIFEST.MF"));
        doReturn(resource2).when(dot).getResource(eq("META-INF/metadata.xml"));
        analyzer.setClasspath(new Jar[]{embed});
View Full Code Here

Examples of aQute.bnd.osgi.URLResource

        Map<String, String> props = new HashMap<String, String>();
        props.put("include-embed-bundles", "true");
        String path = EmptyComponent.class.getName().replace('.', '/').concat(".class");

        Resource resource2 = new URLResource(getClass().getResource("/metadata-test-component.xml"));
        doReturn(dot).when(analyzer).getJar();
        doReturn(resource2).when(dot).getResource(eq("META-INF/metadata.xml"));

        Collection<Clazz> classes = new ArrayList<Clazz>();
        Resource typeResource = new URLResource(getClass().getResource("EmptyComponent.class"));
        Clazz clazz = new Clazz(analyzer, path, typeResource);
        clazz.parseClassFile();
        classes.add(clazz);
        doReturn(classes).when(analyzer).getClasses(Matchers.<String[]>anyVararg());

        Resource resource = new URLResource(getClass().getResource("/EMBED-MANIFEST-EMPTY.MF"));
        doReturn(resource).when(embed).getResource(eq("META-INF/MANIFEST.MF"));
        doReturn(typeResource).when(embed).getResource(path);
        doReturn("aaa").when(embed).getBsn();

        analyzer.setClasspath(new Jar[] {embed});
View Full Code Here

Examples of aQute.bnd.osgi.URLResource

    public void testAnalysisWithComponentOnlyMetadataXml() throws Exception {
        PojoizationPlugin plugin = new PojoizationPlugin();

        Map<String, String> props = new HashMap<String, String>();

        Resource resource = new URLResource(getClass().getResource("/metadata-components-only.xml"));
        doReturn(jar).when(analyzer).getJar();
        doReturn(resource).when(jar).getResource(eq("META-INF/metadata.xml"));

        plugin.setReporter(reporter);
        plugin.setProperties(props);
View Full Code Here

Examples of aQute.bnd.osgi.URLResource

    public void testAnalysisWithInstanceOnlyMetadataXml() throws Exception {
        PojoizationPlugin plugin = new PojoizationPlugin();

        Map<String, String> props = new HashMap<String, String>();

        Resource resource = new URLResource(getClass().getResource("/metadata-instances-only.xml"));
        doReturn(jar).when(analyzer).getJar();
        doReturn(resource).when(jar).getResource(eq("META-INF/metadata.xml"));

        plugin.setReporter(reporter);
        plugin.setProperties(props);
View Full Code Here

Examples of aQute.bnd.osgi.URLResource

    public void testAnalysisWithComponentsAndInstancesMetadataXml() throws Exception {
        PojoizationPlugin plugin = new PojoizationPlugin();

        Map<String, String> props = new HashMap<String, String>();

        Resource resource = new URLResource(getClass().getResource("/metadata-components-and-instances.xml"));
        doReturn(jar).when(analyzer).getJar();
        doReturn(resource).when(jar).getResource(eq("META-INF/metadata.xml"));

        plugin.setReporter(reporter);
        plugin.setProperties(props);
View Full Code Here

Examples of com.alibaba.citrus.service.resource.support.URLResource

        }

        Resource resource = null;

        if (resourceURL != null) {
            resource = new URLResource(resourceURL);
        }

        // ����webapp��Դ��������ҵ������Կ϶���Դ���ڣ�����Ҫ�ټ��������ԡ�
        // Ȼ����httpunit�����£�����������ܲ�����ѭ��
        // Ϊ�˱��������ͬʱ���һ���ļ��Ĵ����ԡ�
View Full Code Here

Examples of com.google.gwt.dev.resource.impl.UrlResource

      // If this module.gwt.xml file is one of the target modules that together make up this
      // ModuleDef.
      if (moduleDef.getTargetLibraryCanonicalModuleNames().contains(moduleName)) {
        // Then save a copy of the xml file in the created library file.
        libraryWriter.addBuildResource(new UrlResource(moduleURL, resName, lastModified));
      }
    } catch (UnableToCompleteException e) {
      // The error has already been logged.
      throw  e;
    } catch (Throwable e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.