Package aQute.lib.osgi

Examples of aQute.lib.osgi.Analyzer


            return new Dependency[0];
        }

        List dependencies = new ArrayList();

        Analyzer analyzer = new Analyzer();

        Map requireBundleHeader = analyzer.parseHeader( requireBundle );

        // now iterates on bundles and extract dependencies
        for ( Iterator iter = requireBundleHeader.entrySet().iterator(); iter.hasNext(); )
        {
            Map.Entry entry = (Map.Entry) iter.next();
View Full Code Here


            {
                getLog().warn( Messages.getString( "EclipseToMavenMojo.plugindoesnothavemanifest", plugin ) ); //$NON-NLS-1$
                return null;
            }

            Analyzer analyzer = new Analyzer();

            Map bundleSymbolicNameHeader =
                analyzer.parseHeader( plugin.getManifestAttribute( Analyzer.BUNDLE_SYMBOLICNAME ) );
            bundleName = (String) bundleSymbolicNameHeader.keySet().iterator().next();
            version = plugin.getManifestAttribute( Analyzer.BUNDLE_VERSION );

            if ( bundleName == null || version == null )
            {
View Full Code Here

            {
                getLog().warn( Messages.getString( "EclipseToMavenMojo.plugindoesnothavemanifest", plugin ) ); //$NON-NLS-1$
                return null;
            }

            Analyzer analyzer = new Analyzer();

            Map bundleSymbolicNameHeader =
                analyzer.parseHeader( plugin.getManifestAttribute( Analyzer.BUNDLE_SYMBOLICNAME ) );
            bundleName = (String) bundleSymbolicNameHeader.keySet().iterator().next();
            version = plugin.getManifestAttribute( Analyzer.BUNDLE_VERSION );

            if ( bundleName == null || version == null )
            {
View Full Code Here

            return new Dependency[0];
        }

        List dependencies = new ArrayList();

        Analyzer analyzer = new Analyzer();

        Map requireBundleHeader = analyzer.parseHeader( requireBundle );

        // now iterates on bundles and extract dependencies
        for ( Iterator iter = requireBundleHeader.entrySet().iterator(); iter.hasNext(); )
        {
            Map.Entry entry = (Map.Entry) iter.next();
View Full Code Here

            if (!plugin.hasManifest()) {
                getLog().warn(Messages.getString("EclipseToMavenMojo.plugindoesnothavemanifest", plugin)); //$NON-NLS-1$
                return null;
            }

            Analyzer analyzer = new Analyzer();

            Map bundleSymbolicNameHeader =
                    analyzer.parseHeader(plugin.getManifestAttribute(Analyzer.BUNDLE_SYMBOLICNAME));
            bundleName = (String) bundleSymbolicNameHeader.keySet().iterator().next();
            version = plugin.getManifestAttribute(Analyzer.BUNDLE_VERSION);

            if (bundleName == null || version == null) {
                getLog().error(Messages.getString("EclipseToMavenMojo.unabletoreadbundlefrommanifest")); //$NON-NLS-1$
View Full Code Here

            return new Dependency[0];
        }

        List dependencies = new ArrayList();

        Analyzer analyzer = new Analyzer();

        Map requireBundleHeader = analyzer.parseHeader(requireBundle);

        // now iterates on bundles and extract dependencies
        for (Iterator iter = requireBundleHeader.entrySet().iterator(); iter.hasNext(); ) {
            Map.Entry entry = (Map.Entry) iter.next();
            String bundleName = (String) entry.getKey();
View Full Code Here

      final Properties properties = new Properties();
      properties.putAll(instructions);

      properties.put("Generated-By-Ops4j-Pax-From", jarInfo);

      final Analyzer analyzer = new Analyzer();
      analyzer.setJar(jar);
      analyzer.setProperties(properties);
      if (manifest != null && OverwriteMode.MERGE == overwriteMode) {
        analyzer.mergeManifest(manifest);
      }
      checkMandatoryProperties(analyzer, jar, jarInfo);
      analyzer.calcManifest();
    }

    return createInputStream(jar);
  }
View Full Code Here

    public static final String SINGLETON = "singleton:=true";
    public static final String TOOL_KEY = "Tool";
    public static final String TOOL = "p2-maven-plugin (reficio.org)";

    public static Analyzer buildAnalyzer(ArtifactBundlerRequest request, ArtifactBundlerInstructions instructions, boolean pedantic) throws Exception {
        Analyzer analyzer = instantiateAnalyzer(request);
        setAnalyzerOptions(analyzer, pedantic);
        setPackageOptions(analyzer);
        setInstructions(analyzer, instructions);
        // they are set later as they may overwrite some instructions
        setBundleOptions(analyzer, instructions);
View Full Code Here

        setManifest(analyzer);
        return analyzer;
    }

    private static Analyzer instantiateAnalyzer(ArtifactBundlerRequest request) throws Exception {
        Analyzer analyzer = new Analyzer();
        analyzer.setJar(getInputJarWithBlankManifest(request));
        return analyzer;
    }
View Full Code Here

            throw new RuntimeException("Cannot create output file " + file);
        }
    }

    private void handleVanillaJarWrap(ArtifactBundlerRequest request, ArtifactBundlerInstructions instructions) throws Exception {
        Analyzer analyzer = AquteHelper.buildAnalyzer(request, instructions, pedantic);
        try {
            analyzer.calcManifest();
            populateJar(analyzer, request.getBinaryOutputFile());
            bundleUtils.reportErrors(analyzer);
            removeSignature(request.getBinaryOutputFile());
        } finally {
            analyzer.close();
        }
    }
View Full Code Here

TOP

Related Classes of aQute.lib.osgi.Analyzer

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.