Package org.apache.felix.sigil.common.bnd

Examples of org.apache.felix.sigil.common.bnd.BundleBuilder


        String destPattern = buildDestPattern(sigil);

        Properties env = new Properties();

        BundleBuilder bb = new BundleBuilder(bld, classpath, destPattern, env);

        for (IBldProject.IBldBundle bundle : bld.getBundles())
        {
            String id = bundle.getId();
            loginfo("creating bundle: " + id);
            int nWarn = 0;
            int nErr = 0;
            String msg = "";

            try
            {
                boolean modified = bb.createBundle(bundle, false, new BundleBuilder.Log()
                {
                    public void warn(String msg)
                    {
                        logwarn(msg);
                    }

                    public void verbose(String msg)
                    {
                        loginfo(msg);
                    }
                });
                nWarn = bb.warnings().size();
                if (!modified)
                {
                    msg = " (not modified)";
                }
            }
            catch (Exception e)
            {
                List<String> errors = bb.errors();
                if (errors != null)
                {
                    nErr = errors.size();
                    for (String err : errors)
                    {
View Full Code Here


            { // avoid props starting with Uppercase - bnd adds them to manifest
                env.setProperty(key, projectProperties.get(key));
            }
        }

        BundleBuilder bb = new BundleBuilder(project, classpath, destPattern, env);
        boolean anyModified = false;

        for (IBldBundle bundle : project.getBundles())
        {
            String id = bundle.getId();
            log("creating bundle: " + id);
            int nWarn = 0;
            int nErr = 0;
            String msg = "";

            try
            {
                boolean modified = (bb.createBundle(bundle, force,
                    new BundleBuilder.Log()
                    {
                        public void warn(String msg)
                        {
                            log(msg, Project.MSG_WARN);
                        }

                        public void verbose(String msg)
                        {
                            log(msg, Project.MSG_VERBOSE);
                        }
                    }));
                nWarn = bb.warnings().size();
                if (modified)
                {
                    anyModified = true;
                }
                else
                {
                    msg = " (not modified)";
                }
            }
            catch (Exception e)
            {
                List<String> errors = bb.errors();
                if (errors != null)
                {
                    nErr = errors.size();
                    for (String err : errors)
                    {
View Full Code Here

TOP

Related Classes of org.apache.felix.sigil.common.bnd.BundleBuilder

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.