log.error("Caught an exception getting deployed assemblies", e);
log.error("Caught an exception getting admin commands service", e); throw new BuildException(e); }  catch (Exception e) { log.error("Error listing shared libraries", e);
    public void execute() throws BuildException {        try {            ManagementContextMBean is = getManagementContext();            ObjectName[] objName = is.getSystemServices();            StringBuffer buffer = new StringBuffer();            buffer.append("<?xml version='1.0'?>\n");            buffer.append("<component-info-list xmlns='http://java.sun.com/xml/ns/jbi/component-info-list' version='1.0'>\n");            if (objName != null) {                for (int i = 0; i < objName.length; i++) {                    buffer.append("\t<component-info>");                    buffer.append(" <name>" + objName[i].getKeyProperty("name") + "</name>");                    buffer.append("\t</component-info>\n");                }            }            buffer.append("</component-info-list>");            System.out.println(buffer.toString());        } catch (IOException e) {            log.error("Caught an exception getting deployed assemblies", e);            throw new BuildException(e);        }    }