Examples of Jar


Examples of aQute.bnd.osgi.Jar

            throw new CoreException(new Status(IStatus.ERROR, Plugin.PLUGIN_ID, 0, "Bnd analysis failed", e));
        }
    }

    static void mergeCapabilities(Map<String,List<ExportPackage>> exports, MultiMap<String,String> usedBy, Map<String,Set<Version>> bundleVersions, Builder builder) throws Exception {
        Jar jar = builder.getJar();
        if (jar == null)
            return;
        Manifest manifest = jar.getManifest();
        if (manifest == null)
            return;

        Attributes attribs = manifest.getMainAttributes();
        String exportPkgStr = attribs.getValue(Constants.EXPORT_PACKAGE);
View Full Code Here

Examples of aQute.bnd.osgi.Jar

        return result;
    }

    static void mergeRequirements(Map<String,List<ImportPackage>> imports, Map<String,List<ExportPackage>> exports, MultiMap<String,String> usedBy, Map<String,List<RequiredBundle>> requiredBundles, Map<String,Set<Version>> bundleVersions,
            Builder builder) throws Exception {
        Jar jar = builder.getJar();
        if (jar == null)
            return;
        Manifest manifest = jar.getManifest();
        if (manifest == null)
            return;
        Attributes attribs = manifest.getMainAttributes();

        // Process imports
View Full Code Here

Examples of aQute.lib.osgi.Jar

        builder.mergeProperties(env, false);

        builder.setClasspath(classpath);
        // builder.setSourcepath(sourcepath);

        Jar jar = builder.build();

        convertErrors("BND: ", builder.getErrors());
        convertWarnings("BND: ", builder.getWarnings());

        Attributes main = jar.getManifest().getMainAttributes();
        String expHeader = main.getValue(Constants.EXPORT_PACKAGE);
        log.verbose("BND exports: " + expHeader);

        augmentImports(builder, jar, bundle);

        if (log != null)
        {
            for (String warn : warnings)
            {
                log.warn(warn);
            }
        }

        if (!errors.isEmpty())
        {
            throw new Exception(errors.toString());
        }

        boolean modified = false;
        File output = new File(dest);

        if (!output.exists() || force || (output.lastModified() <= jar.lastModified())
            || (output.lastModified() <= project.getLastModified()))
        {
            modified = true;
            // jar.write(dest) catches and ignores IOException
            OutputStream out = new FileOutputStream(dest);
            jar.write(out);
            out.close();
            jar.close();
        }

        builder.close();

        return modified;
View Full Code Here

Examples of at.bestsolution.efxclipse.tooling.jdt.ui.internal.editors.model.anttasks.Jar

        T result = caseDeploy(deploy);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case AntTasksPackage.JAR: {
        Jar jar = (Jar)theEObject;
        T result = caseJar(jar);
        if (result == null) result = defaultCase(theEObject);
        return result;
      }
      case AntTasksPackage.SIGN_JAR: {
View Full Code Here

Examples of com.caucho.vfs.Jar

    if (isNullScanPath(path)) {
      return;
    }
   
    ZipFile zipFile = null;
    Jar jar = JarPath.create(path).getJar();

    try {
      zipFile = jar.getZipFile();

      if (zipFile == null)
        return;
     
      boolean isScanMatch = false;

      Enumeration<? extends ZipEntry> e = zipFile.entries();

      while (e.hasMoreElements()) {
        ZipEntry entry = e.nextElement();

        String entryName = entry.getName();
        if (! entryName.endsWith(".class"))
          continue;

        if (packagePath != null && ! entryName.startsWith(packagePath))
          continue;

        matcher.init();

        ReadStream is = Vfs.openRead(zipFile.getInputStream(entry));
        try {
          classScanner.init(entryName, is, matcher);

          if (classScanner.scan())
            isScanMatch = true;
        } finally {
          is.close();
        }
      }
     
      if (! isScanMatch)
        addNullScanPath(path);
    } catch (IOException e) {
      log.log(Level.FINE, e.toString(), e);
    } finally {
      jar.closeZipFile(zipFile);
    }
  }
View Full Code Here

Examples of com.sun.enterprise.module.common_impl.Jar

            // so aborting with diagnostics if we find it. We need to better understand what this
            // means and work accordingly. - KK
            if(a.getFile()==null) {
                throw new AssertionError(a.getId()+" is not resolved. a="+a);
            }
            Jar jar;
            try {
                jar = Jar.create(a.getFile());
            } catch (IOException ioe) {
                // not a jar file, so continue.
                continue;
            }
            Manifest manifest = jar.getManifest();
            String name = null;
            if (manifest!=null) {
                Attributes attributes = manifest.getMainAttributes();

                name = attributes.getValue(ManifestConstants.BUNDLE_NAME);
View Full Code Here

Examples of net.md_5.specialsource.Jar

        RemapperProcessor atProcessor = new RemapperProcessor(null, null, accessMap);
        // make remapper
        JarRemapper remapper = new JarRemapper(srgProcessor, mapping, atProcessor);

        // load jar
        Jar input = Jar.init(inJar);

        // ensure that inheritance provider is used
        JointProvider inheritanceProviders = new JointProvider();
        inheritanceProviders.add(new JarProvider(input));
        mapping.setFallbackInheritanceProvider(inheritanceProviders);
View Full Code Here

Examples of net.rim.tumbler.file.Library.Jar

       
        if (attrs != null) {
          Node pathAttr = attrs.getNamedItem(ATTR_PATH);
         
          if (pathAttr != null) {
            Jar jar = new Jar(pathAttr.getNodeValue());
            _library.addJarDependency(jar);
          }
        }
      }
    }
View Full Code Here

Examples of org.apache.tomcat.util.scan.Jar

     *
     * Keep in sync with o.a.c.startup.TldConfig
     */
    private void tldScanJar(JarURLConnection jarConn) throws IOException {

        Jar jar = null;
        InputStream is;
        boolean foundTld = false;
       
        URL resourceURL = jarConn.getJarFileURL();
        String resourcePath = resourceURL.toString();
       
        try {
            jar = JarFactory.newInstance(jarConn.getURL());
           
            jar.nextEntry();
            String entryName = jar.getEntryName();
            while (entryName != null) {
                if (entryName.startsWith("META-INF/") &&
                        entryName.endsWith(".tld")) {
                    is = null;
                    try {
                        is = jar.getEntryInputStream();
                        foundTld = true;
                        tldScanStream(resourcePath, entryName, is);
                    } finally {
                        if (is != null) {
                            try {
                                is.close();
                            } catch (IOException ioe) {
                                // Ignore
                            }
                        }
                    }
                }
                jar.nextEntry();
                entryName = jar.getEntryName();
            }
        } finally {
            if (jar != null) {
                jar.close();
            }
        }

        if (!foundTld) {
            if (log.isDebugEnabled()) {
View Full Code Here

Examples of org.apache.tomcat.util.scan.Jar

        if (tldResourcePath == null) {
            // The URI points to the TLD itself or to a JAR file in which the TLD is stored
            tldResourcePath = generateTldResourcePath(uri, ctxt);
        }

        Jar jar;
        try {
            jar = tldResourcePath.getJar();
        } catch (IOException ioe) {
            throw new JasperException(ioe);
        }

        // Add the dependencies on the TLD to the referencing page
        PageInfo pageInfo = ctxt.createCompiler().getPageInfo();
        if (pageInfo != null) {
            String path = tldResourcePath.getWebappPath();
            // Add TLD (jar==null) / JAR (jar!=null) file to dependency list
            pageInfo.addDependant(path, ctxt.getLastModified(path));
            if (jar != null) {
                // Add TLD within the JAR to the dependency list
                String entryName = tldResourcePath.getEntryName();
                try {
                    pageInfo.addDependant(jar.getURL(entryName),
                            Long.valueOf(jar.getLastModified(entryName)));
                } catch (IOException ioe) {
                    throw new JasperException(ioe);
                }
            }
        }
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.