Examples of BundleInfo


Examples of org.apache.felix.webconsole.bundleinfo.BundleInfo

        String name = localization.getResourceBundle( locale ).getString( "services.info.key" ); //$NON-NLS-1$;
        name = MessageFormat.format( name, new Object[]
            { id, Arrays.asList( classes ).toString() } );
        if ( webConsoleRoot == null )
        {
            return new BundleInfo( name, id, BundleInfoType.VALUE, descr );
        }
        return new BundleInfo( name, webConsoleRoot + "/services/" + id, //$NON-NLS-1$
            BundleInfoType.LINK, descr );
    }
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

    private void genericTestResolve(String jarName, String conf, ModuleRevisionId[] expectedMrids,
            ModuleRevisionId[] expected2Mrids) throws Exception {
        JarInputStream in = new JarInputStream(new FileInputStream("test/test-repo/bundlerepo/"
                + jarName));
        BundleInfo bundleInfo = ManifestParser.parseManifest(in.getManifest());
        bundleInfo.addArtifact(new BundleArtifact(false, new File("test/test-repo/bundlerepo/"
                + jarName).toURI(), null));
        DefaultModuleDescriptor md = BundleInfoAdapter.toModuleDescriptor(
            OSGiManifestParser.getInstance(), null, bundleInfo, profileProvider);
        ResolveReport resolveReport = ivy.resolve(md,
            new ResolveOptions().setConfs(new String[] {conf}).setOutputReport(false));
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

    }

    private void genericTestFailingResolve(String jarName, String conf) throws Exception {
        JarInputStream in = new JarInputStream(new FileInputStream("test/test-repo/bundlerepo/"
                + jarName));
        BundleInfo bundleInfo = ManifestParser.parseManifest(in.getManifest());
        bundleInfo.addArtifact(new BundleArtifact(false, new File("test/test-repo/bundlerepo/"
                + jarName).toURI(), null));
        DefaultModuleDescriptor md = BundleInfoAdapter.toModuleDescriptor(
            OSGiManifestParser.getInstance(), null, bundleInfo, profileProvider);
        ResolveReport resolveReport = ivy.resolve(md,
            new ResolveOptions().setConfs(new String[] {conf}).setOutputReport(false));
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

    private static final String BUNDLE_2 = "org.apache.ivy.test2";

    public void testWriteWithSource() throws Exception {
        List<BundleInfo> bundles = new ArrayList<BundleInfo>();

        BundleInfo bundle = new BundleInfo(BUNDLE_1, BUNDLE_VERSION);
        bundle.addArtifact(new BundleArtifact(false, new URI("file:///test.jar"), null));
        bundle.addArtifact(new BundleArtifact(true, new URI("file:///test-sources.jar"), null));
        bundles.add(bundle);

        bundle = new BundleInfo(BUNDLE_2, BUNDLE_VERSION);
        bundle.addArtifact(new BundleArtifact(false, new URI("file:///test2.jar"), null));
        bundles.add(bundle);

        new File("build/test-files").mkdirs();
        File obrFile = new File("build/test-files/obr-sources.xml");
        FileOutputStream out = new FileOutputStream(obrFile);
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

        AttributesImpl atts = new AttributesImpl();
        handler.startElement("", RepositoryHandler.REPOSITORY, RepositoryHandler.REPOSITORY, atts);
        int nbOk = 0;
        int nbRejected = 0;
        for (ManifestAndLocation manifestAndLocation : manifestAndLocations) {
            BundleInfo bundleInfo;
            try {
                bundleInfo = ManifestParser.parseManifest(manifestAndLocation.getManifest());
                bundleInfo
                        .addArtifact(new BundleArtifact(false, manifestAndLocation.getUri(), null));
                if (manifestAndLocation.getSourceURI() != null) {
                    bundleInfo.addArtifact(new BundleArtifact(true, manifestAndLocation
                            .getSourceURI(), null));
                }
                nbOk++;
            } catch (ParseException e) {
                nbRejected++;
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

                        + symbolicname + " is then ignored.");
                skip();
                return;
            }

            bundleInfo = new BundleInfo(symbolicname, version);
            bundleInfo.setPresentationName(atts.getValue(PRESENTATION_NAME));
            String uri = atts.getValue(URI);
            if (uri != null) {
                try {
                    bundleInfo.addArtifact(new BundleArtifact(false, new URI(uri), null));
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

            throw new BuildException("the manifest file '" + manifest + "' was not found", e);
        } catch (IOException e) {
            throw new BuildException("the manifest file '" + manifest + "' could not be read", e);
        }

        BundleInfo bundleInfo;
        try {
            bundleInfo = ManifestParser.parseManifest(m);
        } catch (ParseException e) {
            throw new BuildException("Incorrect manifest file '" + manifest + "'", e);
        }
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

        File manifest = new File(f, "META-INF/MANIFEST.MF");
        if (!manifest.exists()) {
            path.createPathElement().setLocation(f);
            return;
        }
        BundleInfo bundleInfo = ManifestParser.parseManifest(manifest);
        List/* <String> */cp = bundleInfo.getClasspath();
        if (cp == null) {
            path.createPathElement().setLocation(f);
            return;
        }
        for (int i = 0; i < cp.size(); i++) {
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

                    .getSymbolicNameTarget());
            if (byTargetVersion == null) {
                byTargetVersion = new HashMap<Version, BundleInfo>();
                sourceTargetBundles.put(bundleInfo.getSymbolicNameTarget(), byTargetVersion);
            }
            BundleInfo old = byTargetVersion.put(bundleInfo.getVersionTarget(), bundleInfo);
            if (old != null && !old.equals(bundleInfo)) {
                if (getLogLevel() <= Message.MSG_VERBOSE) {
                    Message.verbose("Duplicate source for the bundle "
                            + bundleInfo.getSymbolicNameTarget() + "@"
                            + bundleInfo.getVersionTarget() + " : " + bundleInfo + " is replacing "
                            + old);
View Full Code Here

Examples of org.apache.ivy.osgi.core.BundleInfo

                String symbolicName = mdw.getBundleInfo().getSymbolicName();
                Map<Version, BundleInfo> byVersion = sourceTargetBundles.get(symbolicName);
                if (byVersion == null) {
                    continue;
                }
                BundleInfo source = byVersion.get(mdw.getBundleInfo().getVersion());
                if (source == null) {
                    continue;
                }
                for (BundleArtifact artifact : source.getArtifacts()) {
                    mdw.getBundleInfo().addArtifact(artifact);
                }
            }
        }
        sourceTargetBundles = null;
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.