diff --git a/webconsole-plugins/deppack/LICENSE b/webconsole-plugins/deppack/LICENSE
new file mode 100644
index 0000000..75b5248
--- /dev/null
+++ b/webconsole-plugins/deppack/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/webconsole-plugins/deppack/NOTICE b/webconsole-plugins/deppack/NOTICE
new file mode 100644
index 0000000..3a3923a
--- /dev/null
+++ b/webconsole-plugins/deppack/NOTICE
@@ -0,0 +1,21 @@
+Apache Felix OSGi Web Console Event Plugin
+Copyright 2007-2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2009).
+Licensed under the Apache License 2.0.
+
+
+III. License Summary
+- Apache License 2.0
diff --git a/webconsole-plugins/deppack/pom.xml b/webconsole-plugins/deppack/pom.xml
new file mode 100644
index 0000000..0c764e6
--- /dev/null
+++ b/webconsole-plugins/deppack/pom.xml
@@ -0,0 +1,115 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.felix</groupId>
+		<artifactId>felix-parent</artifactId>
+		<version>1.2.0</version>
+		<relativePath>../../../pom/pom.xml</relativePath>
+	</parent>
+
+	<artifactId>org.apache.felix.webconsole.plugins.deppack</artifactId>
+	<packaging>bundle</packaging>
+	<version>1.0.0-SNAPSHOT</version>
+
+	<name>Apache Felix Web Console Deployment Packages Plugin</name>
+	<description>
+        This is a plugin for the Apache Felix OSGi web console for displaying Deployment Packages.
+    </description>
+
+	<scm>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/deppack</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/deppack</developerConnection>
+		<url>http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/deppack</url>
+	</scm>
+
+	<build>
+		<plugins>
+			<!-- translate UTF-8 encoded properties files to ISO-8859-1 -->
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>native2ascii-maven-plugin</artifactId>
+				<version>1.0-alpha-1</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>native2ascii</goal>
+						</goals>
+						<configuration>
+							<encoding>UTF-8</encoding>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<version>2.0.1</version>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>
+							${artifactId}
+                        </Bundle-SymbolicName>
+						<Bundle-Activator>
+							org.apache.felix.webconsole.plugins.deppack.internal.Activator
+                        </Bundle-Activator>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-fileupload</groupId>
+			<artifactId>commons-fileupload</artifactId>
+			<version>1.1.1</version>
+			<scope>provided</scope>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.core</artifactId>
+			<version>4.0.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.compendium</artifactId>
+			<version>4.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.webconsole</artifactId>
+			<version>3.0.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20070829</version>
+			<scope>compile</scope>
+			<optional>true</optional>
+		</dependency>
+	</dependencies>
+</project>
diff --git a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java
new file mode 100644
index 0000000..5bf71d4
--- /dev/null
+++ b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/Activator.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.plugins.deppack.internal;
+
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.deploymentadmin.DeploymentAdmin;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+/**
+ * Activator is the main starting class.
+ */
+public class Activator implements BundleActivator, ServiceTrackerCustomizer
+{
+
+    private ServiceTracker tracker;
+    private BundleContext context;
+
+    private SimpleWebConsolePlugin plugin;
+
+    /**
+     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+     */
+    public final void start(BundleContext context) throws Exception
+    {
+        this.context = context;
+        this.tracker = new ServiceTracker(context, DeploymentAdmin.class.getName(), this);
+        this.tracker.open();
+    }
+
+    /**
+     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+     */
+    public final void stop(BundleContext context) throws Exception
+    {
+        if (tracker != null)
+        {
+            tracker.close();
+            tracker = null;
+        }
+    }
+
+    // - begin tracker
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void modifiedService(ServiceReference reference, Object service)
+    {/* unused */
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
+     */
+    public final Object addingService(ServiceReference reference)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+        if (plugin == null)
+        {
+            this.plugin = plugin = new WebConsolePlugin(tracker).register(context);
+        }
+
+        return context.getService(reference);
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void removedService(ServiceReference reference, Object service)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+
+        if (tracker.getTrackingCount() == 0 && plugin != null)
+        {
+            plugin.unregister();
+            this.plugin = null;
+        }
+
+    }
+}
diff --git a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
new file mode 100644
index 0000000..b47f071
--- /dev/null
+++ b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
@@ -0,0 +1,248 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.plugins.deppack.internal;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+import org.apache.felix.webconsole.DefaultVariableResolver;
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.apache.felix.webconsole.WebConsoleUtil;
+import org.apache.felix.webconsole.internal.Util;
+import org.json.JSONException;
+import org.json.JSONWriter;
+import org.osgi.service.deploymentadmin.DeploymentAdmin;
+import org.osgi.service.deploymentadmin.DeploymentPackage;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * DepPackServlet provides a plugin for managing deployment admin packages.
+ */
+class WebConsolePlugin extends SimpleWebConsolePlugin
+{
+
+    private static final String LABEL = "deppack"; //$NON-NLS-1$
+    private static final String TITLE = "%deppack.pluginTitle"; //$NON-NLS-1$
+    private static final String CSS[] = { "/" + LABEL + "/res/plugin.css" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+    //
+    private static final String ACTION_DEPLOY = "deploydp"; //$NON-NLS-1$
+    private static final String ACTION_UNINSTALL = "uninstalldp"; //$NON-NLS-1$
+    private static final String PARAMETER_PCK_FILE = "pckfile"; //$NON-NLS-1$
+
+    private static final String DEPL_SERVICE = "org.osgi.service.deploymentadmin.DeploymentAdmin"; //$NON-NLS-1$
+
+    // templates
+    private final String TEMPLATE;
+
+    private final ServiceTracker adminTracker;
+
+    /** Default constructor */
+    WebConsolePlugin(ServiceTracker adminTracker)
+    {
+        super(LABEL, TITLE, CSS);
+
+        // load templates
+        TEMPLATE = readTemplateFile("/res/plugin.html"); //$NON-NLS-1$
+        this.adminTracker = adminTracker;
+    }
+
+    /**
+     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+        throws ServletException, IOException
+    {
+        // get the uploaded data
+        final String action = WebConsoleUtil.getParameter(req, Util.PARAM_ACTION);
+        if (ACTION_DEPLOY.equals(action))
+        {
+            Map params = (Map) req.getAttribute(AbstractWebConsolePlugin.ATTR_FILEUPLOAD);
+            if (params != null)
+            {
+                final FileItem pck = getFileItem(params, PARAMETER_PCK_FILE, false);
+                final DeploymentAdmin admin = (DeploymentAdmin) adminTracker.getService();
+                if (admin != null)
+                {
+                    try
+                    {
+                        admin.installDeploymentPackage(pck.getInputStream());
+
+                        final String uri = req.getRequestURI();
+                        resp.sendRedirect(uri);
+                        return;
+                    }
+                    catch ( /*Deployment*/Exception e)
+                    {
+                        throw new ServletException("Unable to deploy package.", e);
+                    }
+                }
+            }
+            throw new ServletException("Upload file or deployment admin missing.");
+        }
+        else if (ACTION_UNINSTALL.equals(action))
+        {
+            final String pckId = req.getPathInfo().substring(
+                req.getPathInfo().lastIndexOf('/') + 1);
+            if (pckId != null && pckId.length() > 0)
+            {
+                final DeploymentAdmin admin = (DeploymentAdmin) this.getService(DEPL_SERVICE);
+                if (admin != null)
+                {
+                    try
+                    {
+                        final DeploymentPackage pck = admin.getDeploymentPackage(pckId);
+                        if (pck != null)
+                        {
+                            pck.uninstall();
+                        }
+                    }
+                    catch ( /*Deployment*/Exception e)
+                    {
+                        throw new ServletException("Unable to undeploy package.", e);
+                    }
+                }
+
+            }
+
+            final PrintWriter pw = resp.getWriter();
+            pw.println("{ \"reload\":true }");
+            return;
+        }
+        throw new ServletException("Unknown action: " + action);
+    }
+
+    private static final FileItem getFileItem(Map params, String name, boolean isFormField)
+    {
+        FileItem[] items = (FileItem[]) params.get(name);
+        if (items != null)
+        {
+            for (int i = 0; i < items.length; i++)
+            {
+                if (items[i].isFormField() == isFormField)
+                {
+                    return items[i];
+                }
+            }
+        }
+
+        // nothing found, fail
+        return null;
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void renderContent(HttpServletRequest request, HttpServletResponse response)
+        throws ServletException, IOException
+    {
+
+        final DeploymentAdmin admin = (DeploymentAdmin) this.getService(DEPL_SERVICE);
+
+        StringWriter w = new StringWriter();
+        PrintWriter w2 = new PrintWriter(w);
+        JSONWriter jw = new JSONWriter(w2);
+        try
+        {
+            jw.object();
+            if (null == admin)
+            {
+                jw.key("error"); //$NON-NLS-1$
+                jw.value(true);
+            }
+            else
+            {
+                final DeploymentPackage[] packages = admin.listDeploymentPackages();
+                jw.key("data"); //$NON-NLS-1$
+
+                jw.array();
+                for (int i = 0; i < packages.length; i++)
+                {
+                    packageInfoJson(jw, packages[i]);
+                }
+                jw.endArray();
+
+            }
+            jw.endObject();
+
+        }
+        catch (JSONException je)
+        {
+            throw new IOException(je.toString());
+        }
+
+        // prepare variables
+        DefaultVariableResolver vars = ((DefaultVariableResolver) WebConsoleUtil.getVariableResolver(request));
+        vars.put("__data__", w.toString()); //$NON-NLS-1$
+
+        response.getWriter().print(TEMPLATE);
+    }
+
+    private static final void packageInfoJson(JSONWriter jw, DeploymentPackage pack)
+        throws JSONException
+    {
+        jw.object();
+        jw.key("id"); //$NON-NLS-1$
+        jw.value(pack.getName());
+        jw.key("name"); //$NON-NLS-1$
+        jw.value(pack.getName());
+        jw.key("state"); //$NON-NLS-1$
+        jw.value(pack.getVersion());
+
+        jw.key("actions"); //$NON-NLS-1$
+        jw.array();
+
+        jw.object();
+        jw.key("enabled"); //$NON-NLS-1$
+        jw.value(true);
+        jw.key("name"); //$NON-NLS-1$
+        jw.value("Uninstall");
+        jw.key("link"); //$NON-NLS-1$
+        jw.value(ACTION_UNINSTALL);
+        jw.endObject();
+
+        jw.endArray();
+
+        jw.key("props"); //$NON-NLS-1$
+        jw.array();
+        WebConsoleUtil.keyVal(jw, "Package Name", pack.getName());
+        WebConsoleUtil.keyVal(jw, "Version", pack.getVersion());
+
+        final StringBuffer buffer = new StringBuffer();
+        for (int i = 0; i < pack.getBundleInfos().length; i++)
+        {
+            buffer.append(pack.getBundleInfos()[i].getSymbolicName());
+            buffer.append(" - "); //$NON-NLS-1$
+            buffer.append(pack.getBundleInfos()[i].getVersion());
+            buffer.append("<br/>"); //$NON-NLS-1$
+        }
+        WebConsoleUtil.keyVal(jw, "Bundles", buffer.toString());
+
+        jw.endArray();
+
+        jw.endObject();
+    }
+
+}
diff --git a/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties b/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
new file mode 100644
index 0000000..89c20a2
--- /dev/null
+++ b/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
@@ -0,0 +1,40 @@
+﻿#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
+
+# Deployment Admin plugin
+deppack.pluginTitle=Управление на пакети
+deppack.status.no_data=Няма инсталирани пакети!
+deppack.status.no_service=Услугата Deployment Admin не е налична в момента!
+deppack.status.ok=Deployment Admin е наличен и по-долу е показан списъка с пакет
+deppack.details=Детайли
+deppack.actions=Действия
+deppack.install_update=Инсталиране/обновяване
+deppack.package.name=Име на пакет
+deppack.bundles=Бъндъли
+deppack.uninstall=Премахване
diff --git a/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties b/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
new file mode 100644
index 0000000..864181f
--- /dev/null
+++ b/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
@@ -0,0 +1,40 @@
+#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Deployment Admin plugin
+deppack.pluginTitle=Deployment Packages
+deppack.status.no_data=Kein Deployment Package ist installiert!
+deppack.status.no_service=Deployment Admin Dienst ist nicht instaliert/aktiv!
+deppack.status.ok=Deployment Admin Dienst ist aktiv
+deppack.details=Details
+deppack.actions=Aktionen
+deppack.install_update=Installieren oder Aktualisieren
+deppack.package.name=Package Name
+deppack.bundles=Bundles
+deppack.uninstall=Deinstallieren
diff --git a/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties b/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
new file mode 100644
index 0000000..6895031
--- /dev/null
+++ b/webconsole-plugins/deppack/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
@@ -0,0 +1,40 @@
+﻿#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Deployment Admin plugin
+deppack.pluginTitle=Управление пакетами
+deppack.status.no_data=Нет установочных пакетов!
+deppack.status.no_service=Сервис Deployment Admin не установлен или не запущен.
+deppack.status.ok=Сервис Deployment Admin работает
+deppack.details=Подробно
+deppack.actions=Действия
+deppack.install_update=Установить/обновить
+deppack.package.name=Имя пакета
+deppack.bundles=Модули
+deppack.uninstall=Удалить
diff --git a/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..1a0f302
--- /dev/null
+++ b/webconsole-plugins/deppack/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,40 @@
+#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Deployment Admin plugin
+deppack.pluginTitle=Deployment Packages
+deppack.status.no_data=No deployment packages installed!
+deppack.status.no_service=Deployment Admin is not installed/running!
+deppack.status.ok=Deployment Admin service is running
+deppack.details=Details
+deppack.actions=Actions
+deppack.install_update=Install or Update
+deppack.package.name=Package Name
+deppack.bundles=Bundles
+deppack.uninstall=Uninstall
diff --git a/webconsole/src/main/resources/res/ui/deployment.css b/webconsole-plugins/deppack/src/main/resources/res/plugin.css
similarity index 99%
rename from webconsole/src/main/resources/res/ui/deployment.css
rename to webconsole-plugins/deppack/src/main/resources/res/plugin.css
index 5c569c7..c767846 100644
--- a/webconsole/src/main/resources/res/ui/deployment.css
+++ b/webconsole-plugins/deppack/src/main/resources/res/plugin.css
@@ -1,19 +1,19 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-.pkgname { cursor:pointer }
-.pkgname span { float:left }
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+.pkgname { cursor:pointer }
+.pkgname span { float:left }
diff --git a/webconsole-plugins/deppack/src/main/resources/res/plugin.html b/webconsole-plugins/deppack/src/main/resources/res/plugin.html
new file mode 100644
index 0000000..ba16fcd
--- /dev/null
+++ b/webconsole-plugins/deppack/src/main/resources/res/plugin.html
@@ -0,0 +1,55 @@
+﻿<script type="text/javascript" src="${pluginRoot}/res/plugin.js"></script>
+<script type="text/javascript">
+// <![CDATA[
+var i18n = {
+	status_no_data : "${deppack.status.no_data}",
+	status_no_serv : "${deppack.status.no_service}",
+	status_ok      : "${deppack.status.ok}",
+	package_name   : "${deppack.package.name}",
+	version        : "${version}",
+	bundles        : "${deppack.bundles}",
+	uninstall      : "${deppack.uninstall}"
+}
+var packageListData = ${__data__};
+// ]]>
+</script>
+
+<p class="statline">&nbsp;</p>
+
+<div id="dps1"> <!-- will be hidden if no DP service available -->
+<!-- top header -->
+<form method="post" enctype="multipart/form-data" action="${pluginRoot}">
+	<div class="ui-widget-header ui-corner-top buttonGroup" style="text-align: right">
+		<input name="action"  type="hidden" value="deploydp" />
+		<input name="pckfile" type="file" size="50" />
+		<input type="submit" value="${deppack.install_update}" />
+	</div>
+</form>
+
+<div id="dps2"> <!-- will be hidden if no data available -->
+	<table id="plugin_table" class="nicetable">
+	<thead>
+		<tr>
+			<th>${id}</th>
+			<th style="width:100%">${deppack.details}</th>
+			<th>${version}</th>
+			<th colspan="1">${deppack.actions}</th>
+		</tr>
+	</thead>
+	<tbody>
+		<tr>
+			<td colspan="5">&nbsp;</td>
+		</tr>
+	</tbody>
+	</table>
+
+	<!-- bottom header -->
+	<form method="post" enctype="multipart/form-data" action="${pluginRoot}">
+		<div class="ui-widget-header ui-corner-bottom buttonGroup" style="text-align: right">
+			<input name="action"  type="hidden" value="deploydp" />
+			<input name="pckfile" type="file" size="50" />
+			<input type="submit" value="${deppack.install_update}" />
+		</div>
+	</form>
+</div><!--dps2-->
+</div><!--dps1-->
diff --git a/webconsole/src/main/resources/res/ui/deployment.js b/webconsole-plugins/deppack/src/main/resources/res/plugin.js
similarity index 98%
rename from webconsole/src/main/resources/res/ui/deployment.js
rename to webconsole-plugins/deppack/src/main/resources/res/plugin.js
index 7dbe6ec..149590e 100644
--- a/webconsole/src/main/resources/res/ui/deployment.js
+++ b/webconsole-plugins/deppack/src/main/resources/res/plugin.js
@@ -1,171 +1,172 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *	  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-function fixId(id) { return id.replace('.', '_'); }
-
-function data( /* Array of Object */ dataArray ) { // render components
-	if (dataArray.length == 1) {
-		entry( dataArray[0], true );
-	} else {
-		for ( var idx in dataArray ) {
-			entry( dataArray[idx] );
-		}
-	}
-}
-
-function entry( /* Object */ dataEntry, /* boolean */ singleEntry ) {
-	var id = fixId(dataEntry.id);
-	var trElement = tr( 'ui-state-active', { 'id': 'entry' + id });
-
-	// entry brief
-	entryInternal( trElement,  dataEntry, singleEntry );
-	plugin_table.append(trElement);
-
-	// dataEntry detailed properties
-	trElement = tr( 'ui-helper-hidden', { 
-		'id'   : 'entry' + id + '_details'
-	});
-	if (dataEntry.props) {
-		getDataEntryDetails( trElement, dataEntry.props );
-	}
-	plugin_table.append(trElement);
-}
-
-function entryInternal( /* Element */ parent, /* Object */ dataEntry, /* boolean */ singleEntry ) {
-	var id = dataEntry.id;
-	var _id = fixId(id);
-
-	parent.appendChild( td( null, null, [ text( id ) ] ) );
-	parent.appendChild( td( null, 
-			{
-				'onclick': 'toggleDetails("#entry' + _id + '")',
-				'class': 'pkgname'
-			}, 
-			[
-				createElement( 'span', 'ui-icon ui-icon-triangle-1-e', { id: 'entry' + _id + '_icon'} ),
-				text(dataEntry.name)
-			]
-		)
-	);
-	parent.appendChild( td( null, null, [ text( dataEntry.state ) ] ) );
-
-	for ( var aidx in dataEntry.actions ) {
-		var action = dataEntry.actions[aidx];
-		parent.appendChild( actionButton( action.enabled, id, action.link, action.name ) );
-	}
-}
-
-
-/* Element */ function actionButton( /* boolean */ enabled, /* long */ id, /* String */ op, /* String */ opLabel ) {
-	var buttonTd = td( "content", { align: "right" } );
-	if ( op ) {
-		switch (opLabel) {
-			case "Uninstall" : opLabel = i18n.uninstall; break;
-		}
-		var input = createElement( "input", null, {
-				type: 'button',
-				value: opLabel,
-				onclick: 'changeDataEntryState("' + id + '", "' + op + '");'
-			});
-		if (!enabled) {
-			input.setAttribute( "disabled", true );
-			$(input).addClass('ui-state-disabled');
-		}
-		buttonTd.appendChild( input );
-	} else {
-		addText( buttonTd, "\u00a0" );
-	}
-	return buttonTd;
-}
-
-
-function getDataEntryDetails( /* Element */ parent, /* Array of Object */ details )
-{
-	parent.appendChild( addText( td( "content"), "\u00a0" ) );
-	
-	var tdEl = td( null, { colspan: 4 } );
-	parent.appendChild( tdEl );
-	
-	var tableEl = createElement( "table", null, { border: 0 } );
-	tdEl.appendChild( tableEl );
-	
-	var tbody = createElement( "tbody" );
-	tableEl.appendChild( tbody );
-	for (var idx in details) {
-		var prop = details[idx];
-		var trEl = tr();
-		var key = prop.key;
-		switch (key) {
-			case 'Package Name': key = i18n.package_name; break;
-			case 'Version'     : key = i18n.version; break;
-			case 'Bundles'     : key = i18n.bundles; break;
-		}
-		trEl.appendChild( addText( td( null, { noWrap: true } ), key ) );
-
-		var proptd = td();
-		trEl.appendChild( proptd );
-		$(proptd).html( prop.value ? prop.value : "\u00a0");
-
-		tbody.appendChild( trEl );
-	}
- }
-
-
-function changeDataEntryState(/* long */ id, /* String */ action) {
-	var parm = pluginRoot + "/" + id + "?action=" + action;
-	$.post(parm, null, function() { // always reload
-		document.location.reload();
-	}, "text");
-}
-
-
-function toggleDetails(name) {
-	var icon = $(name + '_icon');
-	var details = $(name + '_details');
-	var show = icon.attr('show');
-	if (typeof show == 'undefined') show = '';
-	icon.attr('show', show ? '' : 'true');
-
-	if (show == 'true') {
-		icon.removeClass('ui-icon-triangle-1-s').addClass('ui-icon-triangle-1-e');
-		details.addClass('ui-helper-hidden');
-	} else {
-		icon.removeClass('ui-icon-triangle-1-e').addClass('ui-icon-triangle-1-s');
-		details.removeClass('ui-helper-hidden');
-	}
-}
-
-var plugin_table = false;
-$(document).ready(function() {
-	plugin_table = $('#plugin_table');
-	var /* Array of Data Objects */ bundleData = packageListData;
-	if (bundleData.error) {
-		$('.statline').text(i18n.status_no_serv);
-		$('#dps1').addClass('ui-helper-hidden');
-	} else if (!bundleData.data || bundleData.data.length == 0) {
-		$('.statline').text(i18n.status_no_data);
-		$('#dps1').removeClass('ui-helper-hidden');
-		$('#dps2').addClass('ui-helper-hidden');
-	} else {
-		data( bundleData.data );
-		$('.statline').text(i18n.status_ok);
-		$('#dps1').removeClass('ui-helper-hidden');
-		$('#dps2').removeClass('ui-helper-hidden');
-		initStaticWidgets(plugin_table);
-	}
-});
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *	  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+function fixId(id) { return id.replace('.', '_'); }
+
+function data( /* Array of Object */ dataArray ) { // render components
+	plugin_table.find('tbody').empty();
+	if (dataArray.length == 1) {
+		entry( dataArray[0], true );
+	} else {
+		for ( var idx in dataArray ) {
+			entry( dataArray[idx] );
+		}
+	}
+}
+
+function entry( /* Object */ dataEntry, /* boolean */ singleEntry ) {
+	var id = fixId(dataEntry.id);
+	var trElement = tr( 'ui-state-active', { 'id': 'entry' + id });
+
+	// entry brief
+	entryInternal( trElement,  dataEntry, singleEntry );
+	plugin_table.append(trElement);
+
+	// dataEntry detailed properties
+	trElement = tr( 'ui-helper-hidden', { 
+		'id'   : 'entry' + id + '_details'
+	});
+	if (dataEntry.props) {
+		getDataEntryDetails( trElement, dataEntry.props );
+	}
+	plugin_table.append(trElement);
+}
+
+function entryInternal( /* Element */ parent, /* Object */ dataEntry, /* boolean */ singleEntry ) {
+	var id = dataEntry.id;
+	var _id = fixId(id);
+
+	parent.appendChild( td( null, null, [ text( id ) ] ) );
+	parent.appendChild( td( null, 
+			{
+				'onclick': 'toggleDetails("#entry' + _id + '")',
+				'class': 'pkgname'
+			}, 
+			[
+				createElement( 'span', 'ui-icon ui-icon-triangle-1-e', { id: 'entry' + _id + '_icon'} ),
+				text(dataEntry.name)
+			]
+		)
+	);
+	parent.appendChild( td( null, null, [ text( dataEntry.state ) ] ) );
+
+	for ( var aidx in dataEntry.actions ) {
+		var action = dataEntry.actions[aidx];
+		parent.appendChild( actionButton( action.enabled, id, action.link, action.name ) );
+	}
+}
+
+
+/* Element */ function actionButton( /* boolean */ enabled, /* long */ id, /* String */ op, /* String */ opLabel ) {
+	var buttonTd = td( "content", { align: "right" } );
+	if ( op ) {
+		switch (opLabel) {
+			case "Uninstall" : opLabel = i18n.uninstall; break;
+		}
+		var input = createElement( "input", null, {
+				type: 'button',
+				value: opLabel,
+				onclick: 'changeDataEntryState("' + id + '", "' + op + '");'
+			});
+		if (!enabled) {
+			input.setAttribute( "disabled", true );
+			$(input).addClass('ui-state-disabled');
+		}
+		buttonTd.appendChild( input );
+	} else {
+		addText( buttonTd, "\u00a0" );
+	}
+	return buttonTd;
+}
+
+
+function getDataEntryDetails( /* Element */ parent, /* Array of Object */ details )
+{
+	parent.appendChild( addText( td( "content"), "\u00a0" ) );
+	
+	var tdEl = td( null, { colspan: 4 } );
+	parent.appendChild( tdEl );
+	
+	var tableEl = createElement( "table", null, { border: 0 } );
+	tdEl.appendChild( tableEl );
+	
+	var tbody = createElement( "tbody" );
+	tableEl.appendChild( tbody );
+	for (var idx in details) {
+		var prop = details[idx];
+		var trEl = tr();
+		var key = prop.key;
+		switch (key) {
+			case 'Package Name': key = i18n.package_name; break;
+			case 'Version'     : key = i18n.version; break;
+			case 'Bundles'     : key = i18n.bundles; break;
+		}
+		trEl.appendChild( addText( td( null, { noWrap: true } ), key ) );
+
+		var proptd = td();
+		trEl.appendChild( proptd );
+		$(proptd).html( prop.value ? prop.value : "\u00a0");
+
+		tbody.appendChild( trEl );
+	}
+ }
+
+
+function changeDataEntryState(/* long */ id, /* String */ action) {
+	var parm = pluginRoot + "/" + id + "?action=" + action;
+	$.post(parm, null, function() { // always reload
+		document.location.reload();
+	}, "text");
+}
+
+
+function toggleDetails(name) {
+	var icon = $(name + '_icon');
+	var details = $(name + '_details');
+	var show = icon.attr('show');
+	if (typeof show == 'undefined') show = '';
+	icon.attr('show', show ? '' : 'true');
+
+	if (show == 'true') {
+		icon.removeClass('ui-icon-triangle-1-s').addClass('ui-icon-triangle-1-e');
+		details.addClass('ui-helper-hidden');
+	} else {
+		icon.removeClass('ui-icon-triangle-1-e').addClass('ui-icon-triangle-1-s');
+		details.removeClass('ui-helper-hidden');
+	}
+}
+
+var plugin_table = false;
+$(document).ready(function() {
+	plugin_table = $('#plugin_table');
+	var /* Array of Data Objects */ bundleData = packageListData;
+	if (bundleData.error) {
+		$('.statline').text(i18n.status_no_serv);
+		$('#dps1').addClass('ui-helper-hidden');
+	} else if (!bundleData.data || bundleData.data.length == 0) {
+		$('.statline').text(i18n.status_no_data);
+		$('#dps1').removeClass('ui-helper-hidden');
+		$('#dps2').addClass('ui-helper-hidden');
+	} else {
+		data( bundleData.data );
+		$('.statline').text(i18n.status_ok);
+		$('#dps1').removeClass('ui-helper-hidden');
+		$('#dps2').removeClass('ui-helper-hidden');
+		initStaticWidgets(plugin_table);
+	}
+});
+
diff --git a/webconsole-plugins/ds/LICENSE b/webconsole-plugins/ds/LICENSE
new file mode 100644
index 0000000..75b5248
--- /dev/null
+++ b/webconsole-plugins/ds/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/webconsole-plugins/ds/NOTICE b/webconsole-plugins/ds/NOTICE
new file mode 100644
index 0000000..3a3923a
--- /dev/null
+++ b/webconsole-plugins/ds/NOTICE
@@ -0,0 +1,21 @@
+Apache Felix OSGi Web Console Event Plugin
+Copyright 2007-2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2009).
+Licensed under the Apache License 2.0.
+
+
+III. License Summary
+- Apache License 2.0
diff --git a/webconsole-plugins/ds/pom.xml b/webconsole-plugins/ds/pom.xml
new file mode 100644
index 0000000..f407162
--- /dev/null
+++ b/webconsole-plugins/ds/pom.xml
@@ -0,0 +1,114 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.felix</groupId>
+		<artifactId>felix-parent</artifactId>
+		<version>1.2.0</version>
+		<relativePath>../../../pom/pom.xml</relativePath>
+	</parent>
+
+	<artifactId>org.apache.felix.webconsole.plugins.ds</artifactId>
+	<packaging>bundle</packaging>
+	<version>1.0.0-SNAPSHOT</version>
+
+	<name>Apache Felix Web Console Service Component Runtime/Declarative Services Plugin</name>
+	<description>
+        This is a plugin for the Apache Felix OSGi web console for displaying Service Components/Declarative Services.
+    </description>
+
+	<scm>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/ds</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/ds</developerConnection>
+		<url>http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/ds</url>
+	</scm>
+
+	<build>
+		<plugins>
+			<!-- translate UTF-8 encoded properties files to ISO-8859-1 -->
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>native2ascii-maven-plugin</artifactId>
+				<version>1.0-alpha-1</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>native2ascii</goal>
+						</goals>
+						<configuration>
+							<encoding>UTF-8</encoding>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<version>2.0.1</version>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>
+							${artifactId}
+                        </Bundle-SymbolicName>
+						<Bundle-Activator>
+							org.apache.felix.webconsole.plugins.ds.internal.Activator
+                        </Bundle-Activator>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.core</artifactId>
+			<version>4.0.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.compendium</artifactId>
+			<version>4.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.webconsole</artifactId>
+			<version>3.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20070829</version>
+			<scope>compile</scope>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.scr</artifactId>
+			<version>1.6.0</version>
+			<scope>provided</scope>
+		</dependency>
+	</dependencies>
+</project>
diff --git a/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Activator.java b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Activator.java
new file mode 100644
index 0000000..ae665c9
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Activator.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.plugins.ds.internal;
+
+import org.apache.felix.webconsole.ConfigurationPrinter;
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+/**
+ * Activator is the main starting class.
+ */
+public class Activator implements BundleActivator, ServiceTrackerCustomizer
+{
+
+    private ServiceTracker tracker;
+    private BundleContext context;
+
+    private SimpleWebConsolePlugin plugin;
+    private ServiceRegistration printerRegistration;
+
+    /**
+     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+     */
+    public final void start(BundleContext context) throws Exception
+    {
+        this.context = context;
+        this.tracker = new ServiceTracker(context, WebConsolePlugin.SCR_SERVICE, this);
+        this.tracker.open();
+    }
+
+    /**
+     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+     */
+    public final void stop(BundleContext context) throws Exception
+    {
+        if (tracker != null)
+        {
+            tracker.close();
+            tracker = null;
+        }
+    }
+
+    // - begin tracker
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void modifiedService(ServiceReference reference, Object service)
+    {/* unused */
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
+     */
+    public final Object addingService(ServiceReference reference)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+        if (plugin == null)
+        {
+            this.plugin = plugin = new WebConsolePlugin().register(context);
+            printerRegistration = context.registerService(ConfigurationPrinter.SERVICE,
+                new ComponentConfigurationPrinter(context.getService(reference)), null);
+        }
+
+        return context.getService(reference);
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void removedService(ServiceReference reference, Object service)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+
+        if (tracker.getTrackingCount() == 0 && plugin != null)
+        {
+            // remove service
+            plugin.unregister();
+            this.plugin = null;
+            // unregister configuration printer too
+            ServiceRegistration reg = printerRegistration;
+            if (reg != null)
+            {
+                reg.unregister();
+                printerRegistration = null;
+            }
+        }
+
+    }
+}
diff --git a/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/ComponentConfigurationPrinter.java b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/ComponentConfigurationPrinter.java
new file mode 100644
index 0000000..8c85813
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/ComponentConfigurationPrinter.java
@@ -0,0 +1,245 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.webconsole.plugins.ds.internal;
+
+import java.io.PrintWriter;
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Iterator;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.apache.felix.scr.Component;
+import org.apache.felix.scr.Reference;
+import org.apache.felix.scr.ScrService;
+import org.apache.felix.webconsole.ConfigurationPrinter;
+import org.apache.felix.webconsole.WebConsoleUtil;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.component.ComponentConstants;
+
+/**
+ * ComponentConfigurationPrinter prints the available SCR services. 
+ */
+class ComponentConfigurationPrinter implements ConfigurationPrinter
+{
+
+    private final ScrService scrService;
+
+    ComponentConfigurationPrinter(Object scrService)
+    {
+        this.scrService = (ScrService)scrService;
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.ConfigurationPrinter#getTitle()
+     */
+    public String getTitle()
+    {
+        return "Declarative Services Components";
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.ConfigurationPrinter#printConfiguration(java.io.PrintWriter)
+     */
+    public void printConfiguration(PrintWriter pw)
+    {
+        printComponents(pw, scrService.getComponents());
+    }
+
+    private static final void printComponents(final PrintWriter pw,
+        final Component[] components)
+    {
+        if (components == null || components.length == 0)
+        {
+            pw.println("  No Components Registered");
+        }
+        else
+        {
+            // order components by id
+            TreeMap componentMap = new TreeMap();
+            for (int i = 0; i < components.length; i++)
+            {
+                Component component = components[i];
+                componentMap.put(new Long(component.getId()), component);
+            }
+
+            // render components
+            for (Iterator ci = componentMap.values().iterator(); ci.hasNext();)
+            {
+                Component component = (Component) ci.next();
+                component(pw, component);
+            }
+        }
+    }
+
+    private static final void component(PrintWriter pw, Component component)
+    {
+
+        pw.print(component.getId());
+        pw.print("=[");
+        pw.print(component.getName());
+        pw.println("]");
+
+        pw.println("  Bundle" + component.getBundle().getSymbolicName() + " ("
+            + component.getBundle().getBundleId() + ")");
+        pw.println("  State=" + toStateString(component.getState()));
+        pw.println("  DefaultState="
+            + (component.isDefaultEnabled() ? "enabled" : "disabled"));
+        pw.println("  Activation=" + (component.isImmediate() ? "immediate" : "delayed"));
+
+        listServices(pw, component);
+        listReferences(pw, component);
+        listProperties(pw, component);
+
+        pw.println();
+    }
+
+    private static void listServices(PrintWriter pw, Component component)
+    {
+        String[] services = component.getServices();
+        if (services == null)
+        {
+            return;
+        }
+
+        pw.println("  ServiceType="
+            + (component.isServiceFactory() ? "service factory" : "service"));
+
+        StringBuffer buf = new StringBuffer();
+        for (int i = 0; i < services.length; i++)
+        {
+            if (i > 0)
+            {
+                buf.append(", ");
+            }
+            buf.append(services[i]);
+        }
+
+        pw.println("  Services=" + buf);
+    }
+
+    private static final void listReferences(PrintWriter pw, Component component)
+    {
+        Reference[] refs = component.getReferences();
+        if (refs != null)
+        {
+            for (int i = 0; i < refs.length; i++)
+            {
+
+                pw.println("  Reference=" + refs[i].getName() + ", "
+                    + (refs[i].isSatisfied() ? "Satisfied" : "Unsatisfied"));
+
+                pw.println("    Service Name: " + refs[i].getServiceName());
+
+                if (refs[i].getTarget() != null)
+                {
+                    pw.println("  Target Filter: " + refs[i].getTarget());
+                }
+
+                pw.println("    Multiple: "
+                    + (refs[i].isMultiple() ? "multiple" : "single"));
+                pw.println("    Optional: "
+                    + (refs[i].isOptional() ? "optional" : "mandatory"));
+                pw.println("    Policy: " + (refs[i].isStatic() ? "static" : "dynamic"));
+
+                // list bound services
+                ServiceReference[] boundRefs = refs[i].getServiceReferences();
+                if (boundRefs != null && boundRefs.length > 0)
+                {
+                    for (int j = 0; j < boundRefs.length; j++)
+                    {
+                        pw.print("    Bound Service: ID ");
+                        pw.print(boundRefs[j].getProperty(Constants.SERVICE_ID));
+
+                        String name = (String) boundRefs[j].getProperty(ComponentConstants.COMPONENT_NAME);
+                        if (name == null)
+                        {
+                            name = (String) boundRefs[j].getProperty(Constants.SERVICE_PID);
+                            if (name == null)
+                            {
+                                name = (String) boundRefs[j].getProperty(Constants.SERVICE_DESCRIPTION);
+                            }
+                        }
+                        if (name != null)
+                        {
+                            pw.print(" (");
+                            pw.print(name);
+                            pw.print(")");
+                        }
+                        pw.println();
+                    }
+                }
+                else
+                {
+                    pw.println("    No Services bound");
+                }
+            }
+        }
+    }
+
+    private static final void listProperties(PrintWriter pw, Component component)
+    {
+        Dictionary props = component.getProperties();
+        if (props != null)
+        {
+
+            pw.println("  Properties=");
+            TreeSet keys = new TreeSet(Util.list(props.keys()));
+            for (Iterator ki = keys.iterator(); ki.hasNext();)
+            {
+                String key = (String) ki.next();
+                Object value = props.get(key);
+                value = WebConsoleUtil.toString(value);
+                if (value.getClass().isArray())
+                {
+                    value = Arrays.asList((Object[]) value);
+                }
+                pw.println("    " + key + "=" + value);
+            }
+        }
+    }
+
+    static final String toStateString(int state)
+    {
+        switch (state)
+        {
+            case Component.STATE_DISABLED:
+                return "disabled";
+            case Component.STATE_ENABLED:
+                return "enabled";
+            case Component.STATE_UNSATISFIED:
+                return "unsatisfied";
+            case Component.STATE_ACTIVATING:
+                return "activating";
+            case Component.STATE_ACTIVE:
+                return "active";
+            case Component.STATE_REGISTERED:
+                return "registered";
+            case Component.STATE_FACTORY:
+                return "factory";
+            case Component.STATE_DEACTIVATING:
+                return "deactivating";
+            case Component.STATE_DESTROYED:
+                return "destroyed";
+            default:
+                return String.valueOf(state);
+        }
+    }
+}
diff --git a/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Util.java b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Util.java
new file mode 100644
index 0000000..8e96845
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/Util.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.plugins.ds.internal;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.Enumeration;
+
+import org.apache.felix.scr.Component;
+
+class Util
+{
+
+    static final Comparator COMPONENT_COMPARATOR = new Comparator()
+    {
+        public int compare(Object o0, Object o1)
+        {
+            final Component c0 = (Component) o0;
+            final Component c1 = (Component) o1;
+            final int nameCmp = c0.getName().compareTo(c1.getName());
+            if (nameCmp != 0)
+            {
+                return nameCmp;
+            }
+            return (c0.getId() < c1.getId()) ? -1 : ((c0.getId() > c1.getId()) ? 1 : 0);
+        }
+    };
+
+    private Util()
+    {
+        // prevent instantiation
+    }
+
+    /**
+     * This method is the same as Collections#list(Enumeration). The reason to
+     * duplicate it here, is that it is missing in OSGi/Minimum execution
+     * environment.
+     *
+     * @param e the enumeration which to convert
+     * @return the list containing all enumeration entries.
+     */
+    public static final ArrayList list(Enumeration e)
+    {
+        ArrayList l = new ArrayList();
+        while (e.hasMoreElements())
+        {
+            l.add(e.nextElement());
+        }
+        return l;
+    }
+
+}
diff --git a/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/WebConsolePlugin.java b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/WebConsolePlugin.java
new file mode 100644
index 0000000..4af5c48
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/java/org/apache/felix/webconsole/plugins/ds/internal/WebConsolePlugin.java
@@ -0,0 +1,620 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.plugins.ds.internal;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Arrays;
+import java.util.Dictionary;
+import java.util.Iterator;
+import java.util.TreeSet;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.scr.Component;
+import org.apache.felix.scr.Reference;
+import org.apache.felix.scr.ScrService;
+import org.apache.felix.webconsole.DefaultVariableResolver;
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.apache.felix.webconsole.WebConsoleUtil;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONWriter;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentConstants;
+import org.osgi.service.metatype.MetaTypeInformation;
+import org.osgi.service.metatype.MetaTypeService;
+
+/**
+ * ComponentsServlet provides a plugin for managing Service Components Runtime.
+ */
+class WebConsolePlugin extends SimpleWebConsolePlugin
+{
+
+    private static final long serialVersionUID = 1L;
+
+    private static final String LABEL = "components"; //$NON-NLS-1$
+    private static final String TITLE = "%components.pluginTitle"; //$NON-NLS-1$
+    private static final String CSS[] = { "/res/ui/bundles.css" }; // yes, it's correct! //$NON-NLS-1$
+    private static final String RES = "/" + LABEL + "/res/"; //$NON-NLS-1$ //$NON-NLS-2$
+
+    // actions
+    private static final String OPERATION = "action"; //$NON-NLS-1$
+    private static final String OPERATION_ENABLE = "enable"; //$NON-NLS-1$
+    private static final String OPERATION_DISABLE = "disable"; //$NON-NLS-1$
+    //private static final String OPERATION_CONFIGURE = "configure";
+
+    // needed services
+    static final String SCR_SERVICE = "org.apache.felix.scr.ScrService"; //$NON-NLS-1$
+    private static final String META_TYPE_NAME = "org.osgi.service.metatype.MetaTypeService"; //$NON-NLS-1$
+    private static final String CONFIGURATION_ADMIN_NAME = "org.osgi.service.cm.ConfigurationAdmin"; //$NON-NLS-1$
+
+    // templates
+    private final String TEMPLATE;
+
+    /** Default constructor */
+    WebConsolePlugin()
+    {
+        super(LABEL, TITLE, CSS);
+
+        // load templates
+        TEMPLATE = readTemplateFile("/res/plugin.html"); //$NON-NLS-1$
+    }
+
+    /**
+     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+        throws IOException
+    {
+        final RequestInfo reqInfo = new RequestInfo(request);
+        if (reqInfo.component == null && reqInfo.componentRequested)
+        {
+            response.sendError(404);
+            return;
+        }
+        if (!reqInfo.componentRequested)
+        {
+            response.sendError(500);
+            return;
+        }
+        String op = request.getParameter(OPERATION);
+        if (OPERATION_ENABLE.equals(op))
+        {
+            reqInfo.component.enable();
+        }
+        else if (OPERATION_DISABLE.equals(op))
+        {
+            reqInfo.component.disable();
+        }
+
+        final PrintWriter pw = response.getWriter();
+        response.setContentType("application/json"); //$NON-NLS-1$
+        response.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
+        renderResult(pw, null);
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void doGet(HttpServletRequest request, HttpServletResponse response)
+        throws ServletException, IOException
+    {
+        String path = request.getPathInfo();
+        // don't process if this is request to load a resource
+        if (!path.startsWith(RES))
+        {
+            final RequestInfo reqInfo = new RequestInfo(request);
+            if (reqInfo.component == null && reqInfo.componentRequested)
+            {
+                response.sendError(404);
+                return;
+            }
+            if (reqInfo.extension.equals("json")) //$NON-NLS-1$
+            {
+                response.setContentType("application/json"); //$NON-NLS-1$
+                response.setCharacterEncoding("UTF-8"); //$NON-NLS-1$
+
+                this.renderResult(response.getWriter(), reqInfo.component);
+
+                // nothing more to do
+                return;
+            }
+        }
+        super.doGet(request, response);
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void renderContent(HttpServletRequest request, HttpServletResponse response)
+        throws IOException
+    {
+        // get request info from request attribute
+        final RequestInfo reqInfo = getRequestInfo(request);
+
+        StringWriter w = new StringWriter();
+        PrintWriter w2 = new PrintWriter(w);
+        renderResult(w2, reqInfo.component);
+
+        // prepare variables
+        DefaultVariableResolver vars = ((DefaultVariableResolver) WebConsoleUtil.getVariableResolver(request));
+        vars.put("__drawDetails__", reqInfo.componentRequested ? Boolean.TRUE : Boolean.FALSE); //$NON-NLS-1$
+        vars.put("__data__", w.toString()); //$NON-NLS-1$
+
+        response.getWriter().print(TEMPLATE);
+
+    }
+
+    private void renderResult(final PrintWriter pw, final Component component)
+        throws IOException
+    {
+        final JSONWriter jw = new JSONWriter(pw);
+        try
+        {
+            jw.object();
+
+            final ScrService scrService = getScrService();
+            if (scrService == null)
+            {
+                jw.key("status"); //$NON-NLS-1$
+                jw.value(-1);
+            }
+            else
+            {
+                final Component[] components = scrService.getComponents();
+
+                if (components == null || components.length == 0)
+                {
+                    jw.key("status"); //$NON-NLS-1$
+                    jw.value(0);
+                }
+                else
+                {
+                    // order components by name
+                    sortComponents(components);
+
+                    final StringBuffer buffer = new StringBuffer();
+                    buffer.append(components.length);
+                    buffer.append(" component"); //$NON-NLS-1$
+                    if (components.length != 1)
+                    {
+                        buffer.append('s');
+                    }
+                    buffer.append(" installed."); //$NON-NLS-1$
+                    jw.key("status"); //$NON-NLS-1$
+                    jw.value(components.length);
+
+                    // render components
+                    jw.key("data"); //$NON-NLS-1$
+                    jw.array();
+                    if (component != null)
+                    {
+                        component(jw, component, true);
+                    }
+                    else
+                    {
+                        for (int i = 0; i < components.length; i++)
+                        {
+                            component(jw, components[i], false);
+                        }
+                    }
+                    jw.endArray();
+                }
+            }
+
+            jw.endObject();
+        }
+        catch (JSONException je)
+        {
+            throw new IOException(je.toString());
+        }
+    }
+
+    private void sortComponents(Component[] components)
+    {
+        Arrays.sort(components, Util.COMPONENT_COMPARATOR);
+    }
+
+    private void component(JSONWriter jw, Component component, boolean details)
+        throws JSONException
+    {
+        String id = String.valueOf(component.getId());
+        String name = component.getName();
+        int state = component.getState();
+
+        jw.object();
+
+        // component information
+        jw.key("id"); //$NON-NLS-1$
+        jw.value(id);
+        jw.key("name"); //$NON-NLS-1$
+        jw.value(name);
+        jw.key("state"); //$NON-NLS-1$
+        jw.value(ComponentConfigurationPrinter.toStateString(state));
+        jw.key("stateRaw"); //$NON-NLS-1$
+        jw.value(state);
+
+        final Dictionary props = component.getProperties();
+
+        final String pid = (String) (props != null ? props.get(Constants.SERVICE_PID)
+            : null);
+        if (pid != null)
+        {
+            jw.key("pid"); //$NON-NLS-1$
+            jw.value(pid);
+            if (isConfigurable(component.getBundle(), pid))
+            {
+                jw.key("configurable"); //$NON-NLS-1$
+                jw.value(pid);
+            }
+        }
+
+        // component details
+        if (details)
+        {
+            gatherComponentDetails(jw, component);
+        }
+
+        jw.endObject();
+    }
+
+    private void gatherComponentDetails(JSONWriter jw, Component component)
+        throws JSONException
+    {
+        jw.key("props"); //$NON-NLS-1$
+        jw.array();
+
+        keyVal(jw, "Bundle", component.getBundle().getSymbolicName() + " ("
+            + component.getBundle().getBundleId() + ")");
+        keyVal(jw, "Implementation Class", component.getClassName());
+        if (component.getFactory() != null)
+        {
+            keyVal(jw, "Component Factory Name", component.getFactory());
+        }
+        keyVal(jw, "Default State", component.isDefaultEnabled() ? "enabled" : "disabled");
+        keyVal(jw, "Activation", component.isImmediate() ? "immediate" : "delayed");
+
+        try
+        {
+            keyVal(jw, "Configuration Policy", component.getConfigurationPolicy());
+        }
+        catch (Throwable t)
+        {
+            // missing implementation of said method in the actually bound API
+            // ignore this and just don't display the information
+        }
+
+        listServices(jw, component);
+        listReferences(jw, component);
+        listProperties(jw, component);
+
+        jw.endArray();
+    }
+
+    private void listServices(JSONWriter jw, Component component)
+    {
+        String[] services = component.getServices();
+        if (services == null)
+        {
+            return;
+        }
+
+        keyVal(jw, "Service Type", component.isServiceFactory() ? "service factory"
+            : "service");
+
+        JSONArray buf = new JSONArray();
+        for (int i = 0; i < services.length; i++)
+        {
+            buf.put(services[i]);
+        }
+
+        keyVal(jw, "Services", buf);
+    }
+
+    private void listReferences(JSONWriter jw, Component component)
+    {
+        Reference[] refs = component.getReferences();
+        if (refs != null)
+        {
+            for (int i = 0; i < refs.length; i++)
+            {
+                JSONArray buf = new JSONArray();
+                buf.put(refs[i].isSatisfied() ? "Satisfied" : "Unsatisfied");
+                buf.put("Service Name: " + refs[i].getServiceName());
+                if (refs[i].getTarget() != null)
+                {
+                    buf.put("Target Filter: " + refs[i].getTarget());
+                }
+                buf.put("Multiple: " + (refs[i].isMultiple() ? "multiple" : "single"));
+                buf.put("Optional: " + (refs[i].isOptional() ? "optional" : "mandatory"));
+                buf.put("Policy: " + (refs[i].isStatic() ? "static" : "dynamic"));
+
+                // list bound services
+                ServiceReference[] boundRefs = refs[i].getServiceReferences();
+                if (boundRefs != null && boundRefs.length > 0)
+                {
+                    for (int j = 0; j < boundRefs.length; j++)
+                    {
+                        final StringBuffer b = new StringBuffer();
+                        b.append("Bound Service ID ");
+                        b.append(boundRefs[j].getProperty(Constants.SERVICE_ID));
+
+                        String name = (String) boundRefs[j].getProperty(ComponentConstants.COMPONENT_NAME);
+                        if (name == null)
+                        {
+                            name = (String) boundRefs[j].getProperty(Constants.SERVICE_PID);
+                            if (name == null)
+                            {
+                                name = (String) boundRefs[j].getProperty(Constants.SERVICE_DESCRIPTION);
+                            }
+                        }
+                        if (name != null)
+                        {
+                            b.append(" (");
+                            b.append(name);
+                            b.append(")");
+                        }
+                        buf.put(b.toString());
+                    }
+                }
+                else
+                {
+                    buf.put("No Services bound");
+                }
+
+                keyVal(jw, "Reference " + refs[i].getName(), buf.toString());
+            }
+        }
+    }
+
+    private void listProperties(JSONWriter jw, Component component)
+    {
+        Dictionary props = component.getProperties();
+        if (props != null)
+        {
+            JSONArray buf = new JSONArray();
+            TreeSet keys = new TreeSet(Util.list(props.keys()));
+            for (Iterator ki = keys.iterator(); ki.hasNext();)
+            {
+                final String key = (String) ki.next();
+                final StringBuffer b = new StringBuffer();
+                b.append(key).append(" = ");
+
+                Object prop = props.get(key);
+                prop = WebConsoleUtil.toString(prop);
+                b.append(prop);
+                buf.put(b.toString());
+            }
+
+            keyVal(jw, "Properties", buf);
+        }
+
+    }
+
+    private void keyVal(JSONWriter jw, String key, Object value)
+    {
+        try
+        {
+            WebConsoleUtil.keyVal(jw, key, value);
+        }
+        catch (JSONException je)
+        {
+            // don't care
+        }
+    }
+
+    /**
+     * Check if the component with the specified pid is
+     * configurable
+     * @param providingBundle The Bundle providing the component. This may be
+     *      theoretically be <code>null</code>.
+     * @param pid A non null pid
+     * @return <code>true</code> if the component is configurable.
+     */
+    private boolean isConfigurable(final Bundle providingBundle, final String pid)
+    {
+        // we first check if the config admin has something for this pid
+        final ConfigurationAdmin ca = this.getConfigurationAdmin();
+        if (ca != null)
+        {
+            try
+            {
+                // we use listConfigurations to not create configuration
+                // objects persistently without the user providing actual
+                // configuration
+                String filter = '(' + Constants.SERVICE_PID + '=' + pid + ')';
+                Configuration[] configs = ca.listConfigurations(filter);
+                if (configs != null && configs.length > 0)
+                {
+                    return true;
+                }
+            }
+            catch (InvalidSyntaxException ise)
+            {
+                // should print message
+            }
+            catch (IOException ioe)
+            {
+                // should print message
+            }
+        }
+        // second check is using the meta type service
+        if (providingBundle != null)
+        {
+            final MetaTypeService mts = this.getMetaTypeService();
+            if (mts != null)
+            {
+                final MetaTypeInformation mti = mts.getMetaTypeInformation(providingBundle);
+                if (mti != null)
+                {
+                    return mti.getObjectClassDefinition(pid, null) != null;
+                }
+            }
+        }
+        return false;
+    }
+
+    private final ConfigurationAdmin getConfigurationAdmin()
+    {
+        return (ConfigurationAdmin) getService(CONFIGURATION_ADMIN_NAME);
+    }
+
+    final ScrService getScrService()
+    {
+        return (ScrService) getService(SCR_SERVICE);
+    }
+
+    private final MetaTypeService getMetaTypeService()
+    {
+        return (MetaTypeService) getService(META_TYPE_NAME);
+    }
+
+    private final class RequestInfo
+    {
+        public final String extension;
+        public final Component component;
+        public final boolean componentRequested;
+
+        protected RequestInfo(final HttpServletRequest request)
+        {
+            String info = request.getPathInfo();
+            // remove label and starting slash
+            info = info.substring(getLabel().length() + 1);
+
+            // get extension
+            if (info.endsWith(".json")) //$NON-NLS-1$
+            {
+                extension = "json"; //$NON-NLS-1$
+                info = info.substring(0, info.length() - 5);
+            }
+            else
+            {
+                extension = "html"; //$NON-NLS-1$
+            }
+
+            if (info.length() > 1 && info.startsWith("/")) //$NON-NLS-1$
+            {
+                this.componentRequested = true;
+                info = info.substring(1);
+                Component component = getComponentId(info);
+                if (component == null)
+                {
+                    component = getComponentByName(info);
+                }
+                this.component = component;
+            }
+            else
+            {
+                this.componentRequested = false;
+                this.component = null;
+            }
+
+            request.setAttribute(WebConsolePlugin.this.getClass().getName(), this);
+        }
+
+        protected Component getComponentId(final String componentIdPar)
+        {
+            final ScrService scrService = getScrService();
+            if (scrService != null)
+            {
+                try
+                {
+                    final long componentId = Long.parseLong(componentIdPar);
+                    return scrService.getComponent(componentId);
+                }
+                catch (NumberFormatException nfe)
+                {
+                    // don't care
+                }
+            }
+
+            return null;
+        }
+
+        protected Component getComponentByName(final String names)
+        {
+            if (names.length() > 0)
+            {
+                final ScrService scrService = getScrService();
+                if (scrService != null)
+                {
+
+                    final int slash = names.lastIndexOf('/');
+                    final String componentName;
+                    final String pid;
+                    if (slash > 0)
+                    {
+                        componentName = names.substring(0, slash);
+                        pid = names.substring(slash + 1);
+                    }
+                    else
+                    {
+                        componentName = names;
+                        pid = null;
+                    }
+
+                    Component[] components;
+                    try
+                    {
+                        components = scrService.getComponents(componentName);
+                    }
+                    catch (Throwable t)
+                    {
+                        // not implemented in the used API version
+                        components = null;
+                    }
+
+                    if (components != null)
+                    {
+                        if (pid != null)
+                        {
+                            for (int i = 0; i < components.length; i++)
+                            {
+                                Component component = components[i];
+                                if (pid.equals(component.getProperties().get(
+                                    Constants.SERVICE_PID)))
+                                {
+                                    return component;
+                                }
+                            }
+                        }
+                        else if (components.length > 0)
+                        {
+                            return components[0];
+                        }
+                    }
+                }
+            }
+
+            return null;
+        }
+    }
+
+    static RequestInfo getRequestInfo(final HttpServletRequest request)
+    {
+        return (RequestInfo) request.getAttribute(WebConsolePlugin.class.getName());
+    }
+}
diff --git a/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
new file mode 100644
index 0000000..33732de
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
@@ -0,0 +1,49 @@
+﻿#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
+
+# Components plugin
+components.pluginTitle=Компоненти
+scr.status.no_service=Declarative Service не е наличен!
+scr.status.no_components=Няма инсталирани компонент в момента!
+scr.status.ok=Брой инсталирани компоненти: {0}
+scr.action.enable=Enable
+scr.action.disable=Disable
+scr.action.configure=Конфигуриране
+scr.prop.bundle=Бъндъл
+scr.prop.defstate=Статус по подразбиране
+scr.prop.activation=Активация
+scr.prop.properties=Конфигурации
+scr.prop.class=Implementation Class
+scr.prop.componentfactory=Component Factory име
+scr.prop.configurationpolicy=Конфигурационна политика
+scr.serv.type=Тип на услугата
+scr.serv=Услуги
+scr.title.actions=Действия
+scr.title.status=Статус
+scr.title.name=Име
diff --git a/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
new file mode 100644
index 0000000..4165c7a
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
@@ -0,0 +1,49 @@
+#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Components plugin
+components.pluginTitle=Komponenten
+scr.status.no_service=Declarative Service ist Voraussetzung für diese Funktionalität!
+scr.status.no_components=Zur Zeit sind keine Komponenten installiert!
+scr.status.ok=Anzahl installierter Komponenten: {0}
+scr.action.enable=Aktivieren
+scr.action.disable=Deaktivieren
+scr.action.configure=Konfigurieren
+scr.prop.bundle=Bundle
+scr.prop.defstate=Default Status
+scr.prop.activation=Aktivierung
+scr.prop.properties=Eigenschaften
+scr.prop.class=Implementationsklasse
+scr.prop.componentfactory=Komponenten Factory Name
+scr.prop.configurationpolicy=Konfigurations Policy
+scr.serv.type=Dienst Typ
+scr.serv=Dienste
+scr.title.actions=Aktionen
+scr.title.status=Status
+scr.title.name=Name
diff --git a/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
new file mode 100644
index 0000000..d10d52e
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
@@ -0,0 +1,49 @@
+﻿#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Components plugin
+components.pluginTitle=Компоненты
+scr.status.no_service=Сервис Declarative Service не найден!
+scr.status.no_components=Нет установленных компонентов!
+scr.status.ok=Количество установленных компонентов: {0}
+scr.action.enable=Включить
+scr.action.disable=Выключить
+scr.action.configure=Конфигурировать
+scr.prop.bundle=Модуль
+scr.prop.defstate=Состояние по умолчанию
+scr.prop.activation=Активация
+scr.prop.properties=Конфигурации
+scr.prop.class=Класс реализации
+scr.prop.componentfactory=Имя фабрики компонентов
+scr.prop.configurationpolicy=Политика конфигурирования
+scr.serv.type=Тип сервиса
+scr.serv=Сервисы
+scr.title.actions=Действия
+scr.title.status=Состояние
+scr.title.name=Имя
diff --git a/webconsole-plugins/ds/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole-plugins/ds/src/main/resources/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..d6518c6
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,49 @@
+#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Components plugin
+components.pluginTitle=Components
+scr.status.no_service=Declarative Service required for this function!
+scr.status.no_components=No components installed currently!
+scr.status.ok=Number of installed components: {0}
+scr.action.enable=Enable
+scr.action.disable=Disable
+scr.action.configure=Configure
+scr.prop.bundle=Bundle
+scr.prop.defstate=Default State
+scr.prop.activation=Activation
+scr.prop.properties=Properties
+scr.prop.class=Implementation Class
+scr.prop.componentfactory=Component Factory Name
+scr.prop.configurationpolicy=Configuration Policy
+scr.serv.type=Service Type
+scr.serv=Services
+scr.title.actions=Actions
+scr.title.status=Status
+scr.title.name=Name
diff --git a/webconsole-plugins/ds/src/main/resources/res/plugin.html b/webconsole-plugins/ds/src/main/resources/res/plugin.html
new file mode 100644
index 0000000..fa0f8c1
--- /dev/null
+++ b/webconsole-plugins/ds/src/main/resources/res/plugin.html
@@ -0,0 +1,67 @@
+﻿<script type="text/javascript" src="${pluginRoot}/res/plugin.js"></script>
+<script type="text/javascript">
+// <![CDATA[
+var drawDetails = ${__drawDetails__};
+var scrData = ${__data__};
+// i18n
+var i18n = {
+	'Bundle'                 : '${scr.prop.bundle}',
+	'Default State'          : '${scr.prop.defstate}',
+	'Activation'             : '${scr.prop.activation}',
+	'Service Type'           : '${scr.serv.type}',
+	'Services'               : '${scr.serv}',
+	'Properties'             : '${scr.prop.properties}',
+	'Implementation Class'   : '${scr.prop.class}',
+	'Component Factory Name' : '${scr.prop.componentfactory}',
+	'Configuration Policy'   : '${scr.prop.configurationpolicy}',
+	stat_no_service          : "${scr.status.no_service}",
+	stat_no_components       : "${scr.status.no_components}",
+	stat_ok                  : "${scr.status.ok}"
+}
+// ]]>
+</script>
+<p class="statline">&nbsp;</p>
+
+
+<div id="scr"> <!-- data available -->
+	<!-- top header -->
+	<form method='post' enctype='multipart/form-data' action="${pluginRoot}">
+		<div class="ui-widget-header ui-corner-top buttonGroup">
+			<button class='reloadButton' type='button' name='reload'>${reload}</button>
+		</div>
+	</form>
+	
+	<table id="plugin_table" class="tablesorter nicetable noauto">
+	<thead>
+		<tr>
+			<th class="col_Id">${id}</th>
+			<th class="col_Name">${scr.title.name}</th>
+			<th class="col_Status">${scr.title.status}</th>
+			<th class="col_Actions">${scr.title.actions}</th>
+		</tr>
+	</thead>
+	<tbody>
+		<tr>
+			<td>&nbsp;</td> <!-- id -->
+			<td> <!-- name with arrow -->
+				<div class="bIcon ui-icon ui-icon-triangle-1-e" style="float:left" title="${scr.details.tip}">&nbsp;</div>
+			</td> 
+			<td>&nbsp;</td> <!-- status -->
+			<td>
+				<ul class="icons">
+					<li class="dynhover ui-helper-hidden" title="${scr.action.enable}"><span class="ui-icon ui-icon-play">&nbsp;</span></li>
+					<li class="dynhover ui-helper-hidden" title="${scr.action.disable}"><span class="ui-icon ui-icon-stop">&nbsp;</span></li>
+					<li class="dynhover ui-helper-hidden" title="${scr.action.configure}"><span class="ui-icon ui-icon-wrench">&nbsp;</span></li>
+				</ul>
+			</td>
+		</tr>
+	</tbody>
+	</table>
+</div> <!-- end data available -->
+
+<!-- bottom header -->
+<form method='post' enctype='multipart/form-data' action="${pluginRoot}">
+	<div class="ui-widget-header ui-corner-bottom buttonGroup">
+		<button class='reloadButton' type='button' name='reload'>${reload}</button>
+	</div>
+</form>
diff --git a/webconsole/src/main/resources/res/ui/components.js b/webconsole-plugins/ds/src/main/resources/res/plugin.js
similarity index 67%
rename from webconsole/src/main/resources/res/ui/components.js
rename to webconsole-plugins/ds/src/main/resources/res/plugin.js
index c1432e8..d1fa357 100644
--- a/webconsole/src/main/resources/res/ui/components.js
+++ b/webconsole-plugins/ds/src/main/resources/res/plugin.js
@@ -17,22 +17,21 @@
 function renderData( eventData )  {
 	switch(eventData.status) {
 		case -1: // no event admin
-			$(".statline").html(i18n.stat_no_service);
-			$("#scr").addClass('ui-helper-hidden');
+			$('.statline').html(i18n.stat_no_service);
+			$('#scr').addClass('ui-helper-hidden');
 			break;
 		case  0: // no components
-			$(".statline").html(i18n.stat_no_components);
+			$('.statline').html(i18n.stat_no_components);
 			$('#scr').addClass('ui-helper-hidden');
 			break;
 		default:
-			$(".statline").html(i18n.stat_ok.msgFormat(eventData.status));
+			$('.statline').html(i18n.stat_ok.msgFormat(eventData.status));
 			$('#scr').removeClass('ui-helper-hidden');
-			
+
 			tableBody.empty();
 			for ( var idx in eventData.data ) {
 				entry( eventData.data[idx] );
 			}
-			$("#plugin_table").trigger("update");
 			if ( drawDetails ) renderDetails(eventData);
 			initStaticWidgets();
 	}
@@ -43,7 +42,7 @@
     if (id < 0) {
         id = dataEntry.name;
         if (dataEntry.pid) {
-            id += "/" + dataEntry.pid;
+            id += '/' + dataEntry.pid;
         }
     }
     return id;
@@ -51,7 +50,7 @@
 
 function entry( /* Object */ dataEntry ) {
 	var idPath = getEntryId(dataEntry);
-	var id = idPath.replace(/[./-]/g, "_");
+	var id = idPath.replace(/[./-]/g, '_');
 	var name = dataEntry.name;
 	var _ = tableEntryTemplate.clone().appendTo(tableBody).attr('id', 'entry' + id);
 
@@ -74,47 +73,41 @@
 }
 
 function changeDataEntryState(/* long */ id, /* String */ action) {
-	if ( action == "configure") {
-		window.location = appRoot + "/configMgr/" + id;
+	if ( action == 'configure') {
+		window.location = appRoot + '/configMgr/' + id;
 		return;
 	}
-	$.post(pluginRoot + "/" + id, {"action":action}, function(data) {
+	$.post(pluginRoot + '/' + id, {'action':action}, function(data) {
 		renderData(data);
-	}, "json");	
+	}, 'json');	
 }
 
 function showDetails( id ) {
-	$.get(pluginRoot + "/" + id + ".json", null, function(data) {
+	$.get(pluginRoot + '/' + id + '.json', null, function(data) {
 		renderDetails(data);
-	}, "json");
-}
-
-function loadData() {
-	$.get(pluginRoot + "/.json", null, function(data) {
-		renderData(data);
-	}, "json");	
+	}, 'json');
 }
 
 function hideDetails( id ) {
-	var __test__ = $("#img" + id);
-	$("#img" + id).each(function() {
-		$("#pluginInlineDetails").remove();
+	var __test__ = $('#img' + id);
+	$('#img' + id).each(function() {
+		$('#pluginInlineDetails').remove();
 		$(this).
 			removeClass('ui-icon-triangle-1-w').//left
 			removeClass('ui-icon-triangle-1-s').//down
 			addClass('ui-icon-triangle-1-e').//right
-		    attr("title", "Details").
+		    attr('title', 'Details').
 			unbind('click').click(function() {showDetails(id)});
 	});
 }
 
 function renderDetails( data ) {
 	data = data.data[0];
-	var id = getEntryId(data).replace(/[./-]/g, "_");
-	$("#pluginInlineDetails").remove();
-	var __test__ = $("#entry" + id);
-	$("#entry" + id + " > td").eq(1).append("<div id='pluginInlineDetails'/>");
-	$("#img" + id).each(function() {
+	var id = getEntryId(data).replace(/[./-]/g, '_');
+	$('#pluginInlineDetails').remove();
+	var __test__ = $('#entry' + id);
+	$('#entry' + id + ' > td').eq(1).append('<div id="pluginInlineDetails"/>');
+	$('#img' + id).each(function() {
 		if ( drawDetails ) {
 			var ref = window.location.pathname;
 			ref = ref.substring(0, ref.lastIndexOf('/'));
@@ -122,33 +115,33 @@
 				removeClass('ui-icon-triangle-1-e').//right
 				removeClass('ui-icon-triangle-1-s').//down
 				addClass('ui-icon-triangle-1-w').//left
-				attr("title", "Back").
+				attr('title', 'Back').
 				unbind('click').click(function() {window.location = ref});
 		} else {
 			$(this).
 				removeClass('ui-icon-triangle-1-w').//left
 				removeClass('ui-icon-triangle-1-e').//right
 				addClass('ui-icon-triangle-1-s').//down
-				attr("title", "Hide Details").
+				attr('title', 'Hide Details').
 				unbind('click').click(function() {hideDetails(id)});
 		}
 	});
-	$("#pluginInlineDetails").append("<table border='0'><tbody></tbody></table>");
+	$('#pluginInlineDetails').append('<table border="0"><tbody></tbody></table>');
 	var details = data.props;
 	for (var idx in details) {
 		var prop = details[idx];
 		var key = i18n[prop.key] ? i18n[prop.key] : prop.key; // i18n
 
-		var txt = "<tr><td class='aligntop' noWrap='true' style='border:0px none'>" + key + "</td><td class='aligntop' style='border:0px none'>";	
+		var txt = '<tr><td class="aligntop" noWrap="true" style="border:0px none">' + key + '</td><td class="aligntop" style="border:0px none">';
 		if (prop.value) {
 			if ( $.isArray(prop.value) ) {
 				var i = 0;
 				for(var pi in prop.value) {
 					var value = prop.value[pi];
-					if (i > 0) { txt = txt + "<br/>"; }
+					if (i > 0) { txt = txt + '<br/>'; }
 					var span;
-					if (value.substring(0, 2) == "!!") {
-						txt = txt + "<span style='color: red;'>" + value + "</span>";
+					if (value.substring(0, 2) == '!!') {
+						txt = txt + '<span style="color: red;'> + value + '</span>';
 					} else {
 						txt = txt + value;
 					}
@@ -158,38 +151,33 @@
 				txt = txt + prop.value;
 			}
 		} else {
-			txt = txt + "\u00a0";
+			txt = txt + '\u00a0';
 		}
-		txt = txt + "</td></tr>";
-		$("#pluginInlineDetails > table > tbody").append(txt);
+		txt = txt + '</td></tr>';
+		$('#pluginInlineDetails > table > tbody').append(txt);
 	}
 }
 
 var tableBody = false;
 var tableEntryTemplate = false;
+var pluginTable = false;
 
 $(document).ready(function(){
-	tableBody = $('#plugin_table tbody');
+	pluginTable = $('#plugin_table');
+	tableBody = pluginTable.find('tbody');
 	tableEntryTemplate = tableBody.find('tr').clone();
 
 	renderData(scrData);
 
-	$(".reloadButton").click(loadData);
+	$('.reloadButton').click(document.location.reload);
 
-	var extractMethod = function(node) {
-		var link = node.getElementsByTagName("a");
-		if ( link && link.length == 1 ) {
-			return link[0].innerHTML;
-		}
-		return node.innerHTML;
-	};
-	$("#plugin_table").tablesorter({
+	pluginTable.tablesorter({
 		headers: {
-			0: { sorter:"digit"},
+			0: { sorter:'digit'},
 			3: { sorter: false }
 		},
 		sortList: [[1,0]],
-		textExtraction:extractMethod
+		textExtraction:mixedLinksExtraction
 	});
 });
 
diff --git a/webconsole-plugins/obr/LICENSE b/webconsole-plugins/obr/LICENSE
new file mode 100644
index 0000000..75b5248
--- /dev/null
+++ b/webconsole-plugins/obr/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/webconsole-plugins/obr/NOTICE b/webconsole-plugins/obr/NOTICE
new file mode 100644
index 0000000..3a3923a
--- /dev/null
+++ b/webconsole-plugins/obr/NOTICE
@@ -0,0 +1,21 @@
+Apache Felix OSGi Web Console Event Plugin
+Copyright 2007-2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2009).
+Licensed under the Apache License 2.0.
+
+
+III. License Summary
+- Apache License 2.0
diff --git a/webconsole-plugins/obr/pom.xml b/webconsole-plugins/obr/pom.xml
new file mode 100644
index 0000000..c4a88f2
--- /dev/null
+++ b/webconsole-plugins/obr/pom.xml
@@ -0,0 +1,127 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.felix</groupId>
+		<artifactId>felix-parent</artifactId>
+		<version>1.2.0</version>
+		<relativePath>../../../pom/pom.xml</relativePath>
+	</parent>
+
+	<artifactId>org.apache.felix.webconsole.plugins.obr</artifactId>
+	<packaging>bundle</packaging>
+	<version>1.0.0-SNAPSHOT</version>
+
+	<name>Apache Felix Web Console OBR Plugin</name>
+	<description>
+        This Apache Felix OSGi web console plugin provides method to install bundles from a bundle repository.
+    </description>
+
+	<scm>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/obr</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/obr</developerConnection>
+		<url>http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/obr</url>
+	</scm>
+
+	<build>
+		<plugins>
+			<!-- translate UTF-8 encoded properties files to ISO-8859-1 -->
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>native2ascii-maven-plugin</artifactId>
+				<version>1.0-alpha-1</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>native2ascii</goal>
+						</goals>
+						<configuration>
+							<encoding>UTF-8</encoding>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<version>2.0.1</version>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>
+							${artifactId}
+                        </Bundle-SymbolicName>
+						<Bundle-Activator>
+							org.apache.felix.webconsole.plugins.obr.internal.Activator
+                        </Bundle-Activator>
+						<DynamicImport-Package>
+                            org.apache.felix.bundlerepository,
+                            org.osgi.service.obr
+                        </DynamicImport-Package>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.core</artifactId>
+			<version>4.0.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.compendium</artifactId>
+			<version>4.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20070829</version>
+			<scope>compile</scope>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.webconsole</artifactId>
+			<version>3.0.0</version>
+			<scope>provided</scope>
+		</dependency>
+
+        <!-- OSGi and Apache Felix OBR API -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.service.obr</artifactId>
+            <version>1.0.2</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.bundlerepository</artifactId>
+            <version>1.6.0</version>
+            <scope>provided</scope>
+            <optional>true</optional>
+        </dependency>
+	</dependencies>
+</project>
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/AbstractBundleRepositoryRenderHelper.java b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/AbstractBundleRepositoryRenderHelper.java
similarity index 96%
rename from webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/AbstractBundleRepositoryRenderHelper.java
rename to webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/AbstractBundleRepositoryRenderHelper.java
index af686cd..9e0b5f2 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/AbstractBundleRepositoryRenderHelper.java
+++ b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/AbstractBundleRepositoryRenderHelper.java
@@ -1,74 +1,74 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.webconsole.internal.obr;
-
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import org.apache.felix.webconsole.AbstractWebConsolePlugin;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-
-abstract class AbstractBundleRepositoryRenderHelper
-{
-
-    protected final AbstractWebConsolePlugin logger;
-
-    private final ServiceTracker repositoryAdmin;
-
-
-    protected AbstractBundleRepositoryRenderHelper( final AbstractWebConsolePlugin logger,
-        final BundleContext bundleContext, final String serviceName )
-    {
-        this.logger = logger;
-        this.repositoryAdmin = new ServiceTracker( bundleContext, serviceName, null );
-        this.repositoryAdmin.open();
-    }
-
-
-    void dispose()
-    {
-        repositoryAdmin.close();
-    }
-
-
-    boolean hasRepositoryAdmin()
-    {
-        return getRepositoryAdmin() != null;
-    }
-
-
-    protected final Object getRepositoryAdmin()
-    {
-        return repositoryAdmin.getService();
-    }
-
-
-    abstract void doDeploy( String[] bundles, boolean start, boolean optional );
-
-
-    abstract void doAction( String action, String urlParam ) throws IOException, ServletException;
-
-
-    abstract String getData( final String filter, final boolean details, final Bundle[] bundles );
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.webconsole.plugins.obr.internal;
+
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+
+abstract class AbstractBundleRepositoryRenderHelper
+{
+
+    protected final AbstractWebConsolePlugin logger;
+
+    private final ServiceTracker repositoryAdmin;
+
+
+    protected AbstractBundleRepositoryRenderHelper( final AbstractWebConsolePlugin logger,
+        final BundleContext bundleContext, final String serviceName )
+    {
+        this.logger = logger;
+        this.repositoryAdmin = new ServiceTracker( bundleContext, serviceName, null );
+        this.repositoryAdmin.open();
+    }
+
+
+    void dispose()
+    {
+        repositoryAdmin.close();
+    }
+
+
+    boolean hasRepositoryAdmin()
+    {
+        return getRepositoryAdmin() != null;
+    }
+
+
+    protected final Object getRepositoryAdmin()
+    {
+        return repositoryAdmin.getService();
+    }
+
+
+    abstract void doDeploy( String[] bundles, boolean start, boolean optional );
+
+
+    abstract void doAction( String action, String urlParam ) throws IOException, ServletException;
+
+
+    abstract String getData( final String filter, final boolean details, final Bundle[] bundles );
+
 }
\ No newline at end of file
diff --git a/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/Activator.java b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/Activator.java
new file mode 100644
index 0000000..0a53380
--- /dev/null
+++ b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/Activator.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.plugins.obr.internal;
+
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.Filter;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+/**
+ * Activator is the main starting class.
+ */
+public class Activator implements BundleActivator, ServiceTrackerCustomizer, Constants
+{
+
+    private ServiceTracker tracker;
+    private BundleContext context;
+
+    private SimpleWebConsolePlugin plugin;
+
+    /**
+     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+     */
+    public final void start(BundleContext context) throws Exception
+    {
+        this.context = context;
+        Filter filter = context.createFilter("(|" //$NON-NLS-1$
+            + '(' + OBJECTCLASS + "=org.osgi.service.obr.RepositoryAdmin)" //$NON-NLS-1$
+            + '(' + OBJECTCLASS + "=org.apache.felix.bundlerepository.RepositoryAdmin)" //$NON-NLS-1$
+            + ')');
+        this.tracker = new ServiceTracker(context, filter, this);
+        this.tracker.open();
+    }
+
+    /**
+     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+     */
+    public final void stop(BundleContext context) throws Exception
+    {
+        if (tracker != null)
+        {
+            tracker.close();
+            tracker = null;
+        }
+    }
+
+    // - begin tracker
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void modifiedService(ServiceReference reference, Object service)
+    {/* unused */
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
+     */
+    public final Object addingService(ServiceReference reference)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+        if (plugin == null)
+        {
+            this.plugin = plugin = new WebConsolePlugin().register(context);
+        }
+
+        return context.getService(reference);
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void removedService(ServiceReference reference, Object service)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+
+        if (tracker.getTrackingCount() == 0 && plugin != null)
+        {
+            plugin.unregister();
+            this.plugin = null;
+        }
+
+    }
+}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/FelixBundleRepositoryRenderHelper.java b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/FelixBundleRepositoryRenderHelper.java
similarity index 78%
rename from webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/FelixBundleRepositoryRenderHelper.java
rename to webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/FelixBundleRepositoryRenderHelper.java
index 16d101d..9858577 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/FelixBundleRepositoryRenderHelper.java
+++ b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/FelixBundleRepositoryRenderHelper.java
@@ -1,271 +1,276 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.webconsole.internal.obr;
-
-
-import java.io.IOException;
-import javax.servlet.ServletException;
-import org.apache.felix.bundlerepository.Capability;
-import org.apache.felix.bundlerepository.Property;
-import org.apache.felix.bundlerepository.Reason;
-import org.apache.felix.bundlerepository.Repository;
-import org.apache.felix.bundlerepository.RepositoryAdmin;
-import org.apache.felix.bundlerepository.Requirement;
-import org.apache.felix.bundlerepository.Resolver;
-import org.apache.felix.bundlerepository.Resource;
-import org.apache.felix.webconsole.AbstractWebConsolePlugin;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.framework.InvalidSyntaxException;
-
-
-/**
- * This class provides a plugin for rendering the available OSGi Bundle Repositories
- * and the resources they provide.
- */
-public class FelixBundleRepositoryRenderHelper extends AbstractBundleRepositoryRenderHelper
-{
-
-    public FelixBundleRepositoryRenderHelper( AbstractWebConsolePlugin logger, BundleContext bundleContext )
-    {
-        super( logger, bundleContext, RepositoryAdmin.class.getName() );
-    }
-
-
-    String getData( final String filter, final boolean details, Bundle[] bundles )
-    {
-        RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
-        if ( admin != null )
-        {
-            JSONObject json = new JSONObject();
-            try
-            {
-                json.put( "status", admin != null );
-                json.put( "details", details );
-
-                final Repository repositories[] = admin.listRepositories();
-                for ( int i = 0; repositories != null && i < repositories.length; i++ )
-                {
-                    json.append( "repositories", new JSONObject().put( "lastModified",
-                        repositories[i].getLastModified() ).put( "name", repositories[i].getName() ).put( "url",
-                        repositories[i].getURI() ) );
-                }
-
-                Resource[] resources = admin.discoverResources( filter );
-                for ( int i = 0; resources != null && i < resources.length; i++ )
-                {
-                    json.append( "resources", toJSON( resources[i], bundles, details ) );
-                }
-
-            }
-            catch ( JSONException e )
-            {
-                logger.log( "Failed to serialize repository to JSON object.", e );
-            }
-            catch ( Exception e )
-            {
-                logger.log( "Failed to parse filter '" + filter + "'", e );
-                try
-                {
-                    String reason = "filter=" + filter;
-                    if ( e.getMessage() != null )
-                    {
-                        reason = e.getMessage() + "(" + reason + ")";
-                    }
-                    json.put( "error", reason );
-                }
-                catch ( JSONException je )
-                {
-                    // ignore
-                }
-            }
-            return json.toString();
-        }
-
-        // fall back to no data
-        return "{}";
-    }
-
-
-    final void doAction( String action, String urlParam ) throws IOException, ServletException
-    {
-        RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
-        Repository[] repos = admin.listRepositories();
-        Repository repo = getRepository( repos, urlParam );
-
-        String uri = repo != null ? repo.getURI() : urlParam;
-
-        if ( "delete".equals( action ) )
-        {
-            if ( !admin.removeRepository( uri ) )
-            {
-                throw new ServletException( "Failed to remove repository with URL " + uri );
-            }
-        }
-        else if ( "add".equals( action ) || "refresh".equals( action ) )
-        {
-            try
-            {
-                admin.addRepository( uri );
-            }
-            catch ( IOException e )
-            {
-                throw e;
-            }
-            catch ( Exception e )
-            {
-                throw new ServletException( "Failed to " + action + " repository " + uri + ": " + e.toString() );
-            }
-
-        }
-    }
-
-
-    final void doDeploy( String[] bundles, boolean start, boolean optional )
-    {
-        try
-        {
-            // check whether we have to do something
-            if ( bundles == null || bundles.length == 0 )
-            {
-                logger.log( "No resources to deploy" );
-                return;
-            }
-
-            RepositoryAdmin repoAdmin = ( RepositoryAdmin ) getRepositoryAdmin();
-            Resolver resolver = repoAdmin.resolver();
-
-            // prepare the deployment
-            for ( int i = 0; i < bundles.length; i++ )
-            {
-                String bundle = bundles[i];
-                if ( bundle == null || bundle.equals( "-" ) )
-                {
-                    continue;
-                }
-
-                String filter = "(id=" + bundle + ")";
-                Resource[] resources = repoAdmin.discoverResources( filter );
-                if ( resources != null && resources.length > 0 )
-                {
-                    resolver.add( resources[0] );
-                }
-            }
-
-            FelixDeployer.deploy( resolver, logger, start, optional );
-        }
-        catch ( InvalidSyntaxException e )
-        {
-            throw new IllegalStateException( e );
-        }
-    }
-
-
-    private final Repository getRepository( Repository[] repos, String repositoryUrl )
-    {
-        if ( repositoryUrl == null || repositoryUrl.length() == 0 )
-        {
-            return null;
-        }
-
-        for ( int i = 0; i < repos.length; i++ )
-        {
-            if ( repositoryUrl.equals( repos[i].getURI() ) )
-            {
-                return repos[i];
-            }
-        }
-
-        return null;
-    }
-
-
-    private final JSONObject toJSON( Resource resource, Bundle[] bundles, boolean details ) throws JSONException
-    {
-        final String symbolicName = resource.getSymbolicName();
-        final String version = resource.getVersion().toString();
-        boolean installed = false;
-        for ( int i = 0; symbolicName != null && !installed && bundles != null && i < bundles.length; i++ )
-        {
-            final String ver = ( String ) bundles[i].getHeaders( "" ).get( Constants.BUNDLE_VERSION );
-            installed = symbolicName.equals( bundles[i].getSymbolicName() ) && version.equals( ver );
-        }
-        JSONObject json = new JSONObject( resource.getProperties() ) //
-            .put( "id", resource.getId() ) //
-            .put( "presentationname", resource.getPresentationName() ) //
-            .put( "symbolicname", symbolicName ) //
-            .put( "url", resource.getURI() ) //
-            .put( "version", version ) //
-            .put( "categories", resource.getCategories() ) //
-            .put( "installed", installed );
-
-        if ( details )
-        {
-            Capability[] caps = resource.getCapabilities();
-            for ( int i = 0; caps != null && i < caps.length; i++ )
-            {
-                json.append( "capabilities", new JSONObject().put( "name", caps[i].getName() ).put( "properties",
-                    toJSON( caps[i].getProperties() ) ) );
-            }
-            Requirement[] reqs = resource.getRequirements();
-            for ( int i = 0; reqs != null && i < reqs.length; i++ )
-            {
-                json.append( "requirements", new JSONObject().put( "name", reqs[i].getName() ).put( "filter",
-                    reqs[i].getFilter() ).put( "optional", reqs[i].isOptional() ) );
-            }
-
-            final RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
-            Resolver resolver = admin.resolver();
-            resolver.add( resource );
-            resolver.resolve( Resolver.NO_OPTIONAL_RESOURCES );
-            Resource[] required = resolver.getRequiredResources();
-            for ( int i = 0; required != null && i < required.length; i++ )
-            {
-                json.append( "required", toJSON( required[i], bundles, false ) );
-            }
-            Resource[] optional = resolver.getOptionalResources();
-            for ( int i = 0; optional != null && i < optional.length; i++ )
-            {
-                json.append( "optional", toJSON( optional[i], bundles, false ) );
-            }
-            Reason[] unsatisfied = resolver.getUnsatisfiedRequirements();
-            for ( int i = 0; unsatisfied != null && i < unsatisfied.length; i++ )
-            {
-                json.append( "unsatisfied", new JSONObject().put( "name", unsatisfied[i].getRequirement().getName() )
-                    .put( "filter", unsatisfied[i].getRequirement().getFilter() ).put( "optional",
-                        unsatisfied[i].getRequirement().isOptional() ) );
-            }
-        }
-        return json;
-    }
-
-
-    private JSONObject toJSON( final Property[] props ) throws JSONException
-    {
-        JSONObject json = new JSONObject();
-        for ( int i = 0; props != null && i < props.length; i++ )
-        {
-            json.put( props[i].getName(), props[i].getValue() );
-        }
-        return json;
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.webconsole.plugins.obr.internal;
+
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import org.apache.felix.bundlerepository.Capability;
+import org.apache.felix.bundlerepository.Property;
+import org.apache.felix.bundlerepository.Reason;
+import org.apache.felix.bundlerepository.Repository;
+import org.apache.felix.bundlerepository.RepositoryAdmin;
+import org.apache.felix.bundlerepository.Requirement;
+import org.apache.felix.bundlerepository.Resolver;
+import org.apache.felix.bundlerepository.Resource;
+import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.InvalidSyntaxException;
+
+
+/**
+ * This class provides a plugin for rendering the available OSGi Bundle Repositories
+ * and the resources they provide.
+ */
+class FelixBundleRepositoryRenderHelper extends AbstractBundleRepositoryRenderHelper
+{
+
+    FelixBundleRepositoryRenderHelper( AbstractWebConsolePlugin logger, BundleContext bundleContext )
+    {
+        super( logger, bundleContext, RepositoryAdmin.class.getName() );
+    }
+
+
+    String getData( final String filter, final boolean details, Bundle[] bundles )
+    {
+        RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
+        if ( admin != null )
+        {
+            JSONObject json = new JSONObject();
+            try
+            {
+                json.put( "status", true ); //$NON-NLS-1$
+                json.put( "details", details ); //$NON-NLS-1$
+
+                final Repository repositories[] = admin.listRepositories();
+                for ( int i = 0; repositories != null && i < repositories.length; i++ )
+                {
+                    json.append( "repositories", new JSONObject() //$NON-NLS-1$
+                        .put( "lastModified", repositories[i].getLastModified() ) //$NON-NLS-1$
+                        .put( "name", repositories[i].getName() ) //$NON-NLS-1$
+                        .put( "url", repositories[i].getURI() ) ); //$NON-NLS-1$
+                }
+
+                Resource[] resources = admin.discoverResources( filter );
+                for ( int i = 0; resources != null && i < resources.length; i++ )
+                {
+                    json.append( "resources", toJSON( resources[i], bundles, details ) ); //$NON-NLS-1$
+                }
+
+            }
+            catch ( JSONException e )
+            {
+                logger.log( "Failed to serialize repository to JSON object.", e );
+            }
+            catch ( Exception e )
+            {
+                logger.log( "Failed to parse filter '" + filter + "'", e );
+                try
+                {
+                    String reason = "filter=" + filter;
+                    if ( e.getMessage() != null )
+                    {
+                        reason = e.getMessage() + "(" + reason + ")";
+                    }
+                    json.put( "error", reason ); //$NON-NLS-1$
+                }
+                catch ( JSONException je )
+                {
+                    // ignore
+                }
+            }
+            return json.toString();
+        }
+
+        // fall back to no data
+        return "{}"; //$NON-NLS-1$
+    }
+
+
+    final void doAction( String action, String urlParam ) throws IOException, ServletException
+    {
+        RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
+        Repository[] repos = admin.listRepositories();
+        Repository repo = getRepository( repos, urlParam );
+
+        String uri = repo != null ? repo.getURI() : urlParam;
+
+        if ( "delete".equals( action ) ) //$NON-NLS-1$
+        {
+            if ( !admin.removeRepository( uri ) )
+            {
+                throw new ServletException( "Failed to remove repository with URL " + uri );
+            }
+        }
+        else if ( "add".equals( action ) || "refresh".equals( action ) ) //$NON-NLS-1$ //$NON-NLS-2$
+        {
+            try
+            {
+                admin.addRepository( uri );
+            }
+            catch ( IOException e )
+            {
+                throw e;
+            }
+            catch ( Exception e )
+            {
+                throw new ServletException( "Failed to " + action + " repository " + uri + ": " + e.toString() );
+            }
+
+        }
+    }
+
+
+    final void doDeploy( String[] bundles, boolean start, boolean optional )
+    {
+        try
+        {
+            // check whether we have to do something
+            if ( bundles == null || bundles.length == 0 )
+            {
+                logger.log( "No resources to deploy" );
+                return;
+            }
+
+            RepositoryAdmin repoAdmin = ( RepositoryAdmin ) getRepositoryAdmin();
+            Resolver resolver = repoAdmin.resolver();
+
+            // prepare the deployment
+            for ( int i = 0; i < bundles.length; i++ )
+            {
+                String bundle = bundles[i];
+                if ( bundle == null || bundle.equals( "-" ) ) //$NON-NLS-1$
+                {
+                    continue;
+                }
+
+                String filter = "(id=" + bundle + ")";
+                Resource[] resources = repoAdmin.discoverResources( filter );
+                if ( resources != null && resources.length > 0 )
+                {
+                    resolver.add( resources[0] );
+                }
+            }
+
+            FelixDeployer.deploy( resolver, logger, start, optional );
+        }
+        catch ( InvalidSyntaxException e )
+        {
+            throw new IllegalStateException( e );
+        }
+    }
+
+
+    private final Repository getRepository( Repository[] repos, String repositoryUrl )
+    {
+        if ( repositoryUrl == null || repositoryUrl.length() == 0 )
+        {
+            return null;
+        }
+
+        for ( int i = 0; i < repos.length; i++ )
+        {
+            if ( repositoryUrl.equals( repos[i].getURI() ) )
+            {
+                return repos[i];
+            }
+        }
+
+        return null;
+    }
+
+
+    private final JSONObject toJSON( Resource resource, Bundle[] bundles, boolean details ) throws JSONException
+    {
+        final String symbolicName = resource.getSymbolicName();
+        final String version = resource.getVersion().toString();
+        boolean installed = false;
+        for ( int i = 0; symbolicName != null && !installed && bundles != null && i < bundles.length; i++ )
+        {
+            final String ver = ( String ) bundles[i].getHeaders( "" ).get( Constants.BUNDLE_VERSION ); //$NON-NLS-1$
+            installed = symbolicName.equals( bundles[i].getSymbolicName() ) && version.equals( ver );
+        }
+        JSONObject json = new JSONObject( resource.getProperties() ) //
+            .put( "id", resource.getId() ) // //$NON-NLS-1$
+            .put( "presentationname", resource.getPresentationName() ) // //$NON-NLS-1$
+            .put( "symbolicname", symbolicName ) // //$NON-NLS-1$
+            .put( "url", resource.getURI() ) // //$NON-NLS-1$
+            .put( "version", version ) // //$NON-NLS-1$
+            .put( "categories", resource.getCategories() ) // //$NON-NLS-1$
+            .put( "installed", installed ); //$NON-NLS-1$
+
+        if ( details )
+        {
+            Capability[] caps = resource.getCapabilities();
+            for ( int i = 0; caps != null && i < caps.length; i++ )
+            {
+                json.append( "capabilities", new JSONObject() //$NON-NLS-1$
+                    .put( "name", caps[i].getName() ) //$NON-NLS-1$
+                    .put( "properties", toJSON( caps[i].getProperties() ) ) ); //$NON-NLS-1$
+            }
+            Requirement[] reqs = resource.getRequirements();
+            for ( int i = 0; reqs != null && i < reqs.length; i++ )
+            {
+                json.append( "requirements", new JSONObject() //$NON-NLS-1$
+                    .put( "name", reqs[i].getName() ) //$NON-NLS-1$
+                    .put( "filter", reqs[i].getFilter() ) //$NON-NLS-1$
+                    .put( "optional", reqs[i].isOptional() ) ); //$NON-NLS-1$
+            }
+
+            final RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
+            Resolver resolver = admin.resolver();
+            resolver.add( resource );
+            resolver.resolve( Resolver.NO_OPTIONAL_RESOURCES );
+            Resource[] required = resolver.getRequiredResources();
+            for ( int i = 0; required != null && i < required.length; i++ )
+            {
+                json.append( "required", toJSON( required[i], bundles, false ) ); //$NON-NLS-1$
+            }
+            Resource[] optional = resolver.getOptionalResources();
+            for ( int i = 0; optional != null && i < optional.length; i++ )
+            {
+                json.append( "optional", toJSON( optional[i], bundles, false ) ); //$NON-NLS-1$
+            }
+            Reason[] unsatisfied = resolver.getUnsatisfiedRequirements();
+            for ( int i = 0; unsatisfied != null && i < unsatisfied.length; i++ )
+            {
+                json.append( "unsatisfied", new JSONObject() //$NON-NLS-1$
+                    .put( "name", unsatisfied[i].getRequirement().getName() ) //$NON-NLS-1$
+                    .put( "filter", unsatisfied[i].getRequirement().getFilter() ) //$NON-NLS-1$
+                    .put( "optional", unsatisfied[i].getRequirement().isOptional() ) ); //$NON-NLS-1$
+            }
+        }
+        return json;
+    }
+
+
+    private JSONObject toJSON( final Property[] props ) throws JSONException
+    {
+        JSONObject json = new JSONObject();
+        for ( int i = 0; props != null && i < props.length; i++ )
+        {
+            json.put( props[i].getName(), props[i].getValue() );
+        }
+        return json;
+    }
+}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/FelixDeployer.java b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/FelixDeployer.java
similarity index 98%
rename from webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/FelixDeployer.java
rename to webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/FelixDeployer.java
index b7c7329..bfed872 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/FelixDeployer.java
+++ b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/FelixDeployer.java
@@ -1,114 +1,114 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.webconsole.internal.obr;
-
-
-import org.apache.felix.bundlerepository.Reason;
-import org.apache.felix.bundlerepository.Resolver;
-import org.apache.felix.bundlerepository.Resource;
-import org.apache.felix.webconsole.AbstractWebConsolePlugin;
-import org.osgi.service.log.LogService;
-
-
-class FelixDeployer implements Runnable
-{
-
-    private final Resolver obrResolver;
-
-    private final AbstractWebConsolePlugin logger;
-
-    private final boolean startBundles;
-
-    private final boolean optionalDependencies;
-
-    static void deploy(Resolver obrResolver, AbstractWebConsolePlugin logger, boolean startBundles,
-        boolean optionalDependencies)
-    {
-        final FelixDeployer d = new FelixDeployer(obrResolver, logger, startBundles, optionalDependencies);
-        final Thread t = new Thread(d, "OBR Bundle Deployer (Apache Felix API)");
-        t.start();
-    }
-
-    private FelixDeployer(Resolver obrResolver, AbstractWebConsolePlugin logger, boolean startBundles,
-        boolean optionalDependencies)
-    {
-        this.obrResolver = obrResolver;
-        this.logger = logger;
-        this.startBundles = startBundles;
-        this.optionalDependencies = optionalDependencies;
-    }
-
-    public void run()
-    {
-        int flags = 0;
-        flags += (startBundles ? Resolver.START : 0);
-        flags += (optionalDependencies ? 0 : Resolver.NO_OPTIONAL_RESOURCES);
-        try
-        {
-            if ( obrResolver.resolve( flags ) )
-            {
-
-                logResource( "Installing Requested Resources", obrResolver.getAddedResources() );
-                logResource( "Installing Required Resources", obrResolver.getRequiredResources() );
-                logResource( "Installing Optional Resources", obrResolver.getOptionalResources() );
-
-                obrResolver.deploy( flags );
-            }
-            else
-            {
-                logRequirements( "Cannot Install requested bundles due to unsatisfied requirements",
-                    obrResolver.getUnsatisfiedRequirements() );
-            }
-        }
-        catch ( Exception ie )
-        {
-            logger.log( LogService.LOG_ERROR, "Cannot install bundles", ie );
-        }
-    }
-
-
-    private void logResource( String message, Resource[] res )
-    {
-        if ( res != null && res.length > 0 )
-        {
-            logger.log( LogService.LOG_INFO, message );
-            for ( int i = 0; i < res.length; i++ )
-            {
-                logger.log( LogService.LOG_INFO, "  " + i + ": " + res[i].getSymbolicName() + ", "
-                    + res[i].getVersion() );
-            }
-        }
-    }
-
-
-    private void logRequirements( String message, Reason[] reasons )
-    {
-        logger.log( LogService.LOG_ERROR, message );
-        for ( int i = 0; reasons != null && i < reasons.length; i++ )
-        {
-            String moreInfo = reasons[i].getRequirement().getComment();
-            if ( moreInfo == null )
-            {
-                moreInfo = reasons[i].getRequirement().getFilter().toString();
-            }
-            logger.log( LogService.LOG_ERROR, "  " + i + ": " + reasons[i].getRequirement().getName() + " (" + moreInfo + ")" );
-        }
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.webconsole.plugins.obr.internal;
+
+
+import org.apache.felix.bundlerepository.Reason;
+import org.apache.felix.bundlerepository.Resolver;
+import org.apache.felix.bundlerepository.Resource;
+import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+import org.osgi.service.log.LogService;
+
+
+class FelixDeployer implements Runnable
+{
+
+    private final Resolver obrResolver;
+
+    private final AbstractWebConsolePlugin logger;
+
+    private final boolean startBundles;
+
+    private final boolean optionalDependencies;
+
+    static void deploy(Resolver obrResolver, AbstractWebConsolePlugin logger, boolean startBundles,
+        boolean optionalDependencies)
+    {
+        final FelixDeployer d = new FelixDeployer(obrResolver, logger, startBundles, optionalDependencies);
+        final Thread t = new Thread(d, "OBR Bundle Deployer (Apache Felix API)");
+        t.start();
+    }
+
+    private FelixDeployer(Resolver obrResolver, AbstractWebConsolePlugin logger, boolean startBundles,
+        boolean optionalDependencies)
+    {
+        this.obrResolver = obrResolver;
+        this.logger = logger;
+        this.startBundles = startBundles;
+        this.optionalDependencies = optionalDependencies;
+    }
+
+    public void run()
+    {
+        int flags = 0;
+        flags += (startBundles ? Resolver.START : 0);
+        flags += (optionalDependencies ? 0 : Resolver.NO_OPTIONAL_RESOURCES);
+        try
+        {
+            if ( obrResolver.resolve( flags ) )
+            {
+
+                logResource( "Installing Requested Resources", obrResolver.getAddedResources() );
+                logResource( "Installing Required Resources", obrResolver.getRequiredResources() );
+                logResource( "Installing Optional Resources", obrResolver.getOptionalResources() );
+
+                obrResolver.deploy( flags );
+            }
+            else
+            {
+                logRequirements( "Cannot Install requested bundles due to unsatisfied requirements",
+                    obrResolver.getUnsatisfiedRequirements() );
+            }
+        }
+        catch ( Exception ie )
+        {
+            logger.log( LogService.LOG_ERROR, "Cannot install bundles", ie );
+        }
+    }
+
+
+    private void logResource( String message, Resource[] res )
+    {
+        if ( res != null && res.length > 0 )
+        {
+            logger.log( LogService.LOG_INFO, message );
+            for ( int i = 0; i < res.length; i++ )
+            {
+                logger.log( LogService.LOG_INFO, "  " + i + ": " + res[i].getSymbolicName() + ", "
+                    + res[i].getVersion() );
+            }
+        }
+    }
+
+
+    private void logRequirements( String message, Reason[] reasons )
+    {
+        logger.log( LogService.LOG_ERROR, message );
+        for ( int i = 0; reasons != null && i < reasons.length; i++ )
+        {
+            String moreInfo = reasons[i].getRequirement().getComment();
+            if ( moreInfo == null )
+            {
+                moreInfo = reasons[i].getRequirement().getFilter().toString();
+            }
+            logger.log( LogService.LOG_ERROR, "  " + i + ": " + reasons[i].getRequirement().getName() + " (" + moreInfo + ")" );
+        }
+    }
+
+}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/OsgiBundleRepositoryRenderHelper.java b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/OsgiBundleRepositoryRenderHelper.java
similarity index 76%
rename from webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/OsgiBundleRepositoryRenderHelper.java
rename to webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/OsgiBundleRepositoryRenderHelper.java
index 0efe724..fb22b5b 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/OsgiBundleRepositoryRenderHelper.java
+++ b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/OsgiBundleRepositoryRenderHelper.java
@@ -1,270 +1,256 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.webconsole.internal.obr;
-
-
-import java.io.IOException;
-import java.net.URL;
-import javax.servlet.ServletException;
-import org.apache.felix.webconsole.AbstractWebConsolePlugin;
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.service.obr.Capability;
-import org.osgi.service.obr.Repository;
-import org.osgi.service.obr.RepositoryAdmin;
-import org.osgi.service.obr.Requirement;
-import org.osgi.service.obr.Resolver;
-import org.osgi.service.obr.Resource;
-
-
-/**
- * This class provides a plugin for rendering the available OSGi Bundle Repositories
- * and the resources they provide.
- */
-public class OsgiBundleRepositoryRenderHelper extends AbstractBundleRepositoryRenderHelper
-{
-    public OsgiBundleRepositoryRenderHelper( final AbstractWebConsolePlugin logger, final BundleContext bundleContext )
-    {
-        super( logger, bundleContext, RepositoryAdmin.class.getName() );
-    }
-
-
-    String getData( final String filter, final boolean details, Bundle[] bundles )
-    {
-        RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
-        if ( admin != null )
-        {
-            JSONObject json = new JSONObject();
-            try
-            {
-                json.put( "status", admin != null );
-                json.put( "details", details );
-
-                final Repository repositories[] = admin.listRepositories();
-                for ( int i = 0; repositories != null && i < repositories.length; i++ )
-                {
-                    json.append( "repositories", new JSONObject().put( "lastModified",
-                        repositories[i].getLastModified() ).put( "name", repositories[i].getName() ).put( "url",
-                        repositories[i].getURL() ) );
-                }
-
-                Resource[] resources = admin.discoverResources( filter );
-                for ( int i = 0; resources != null && i < resources.length; i++ )
-                {
-                    json.append( "resources", toJSON( resources[i], bundles, details ) );
-                }
-            }
-            catch ( JSONException e )
-            {
-                logger.log( "Failed to serialize repository to JSON object.", e );
-            }
-            catch ( Exception e )
-            {
-                logger.log( "Failed to parse filter '" + filter + "'", e );
-                try
-                {
-                    String reason = "filter=" + filter;
-                    if ( e.getMessage() != null )
-                    {
-                        reason = e.getMessage() + "(" + reason + ")";
-                    }
-                    json.put( "error", reason );
-                }
-                catch ( JSONException je )
-                {
-                    // ignore
-                }
-            }
-
-            return json.toString();
-        }
-
-        // fall back to no data
-        return "{}";
-    }
-
-
-    private String parseRequirement( String req )
-    {
-        int p = req.indexOf( ':' );
-        String filter;
-        if ( p > 0 )
-        {
-            filter = req.substring( p + 1 );
-        }
-        else
-        {
-            filter = req;
-        }
-        if ( !filter.startsWith( "(" ) )
-        {
-            filter = "(" + filter + ")";
-        }
-        return filter;
-    }
-
-
-    void doAction( String action, String urlParam ) throws IOException, ServletException
-    {
-        RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
-        Repository[] repos = admin.listRepositories();
-        Repository repo = getRepository( repos, urlParam );
-
-        URL uri = repo != null ? repo.getURL() : new URL( urlParam );
-
-        if ( "delete".equals( action ) )
-        {
-            if ( !admin.removeRepository( uri ) )
-            {
-                throw new ServletException( "Failed to remove repository with URL " + uri );
-            }
-        }
-        else if ( "add".equals( action ) || "refresh".equals( action ) )
-        {
-            try
-            {
-                admin.addRepository( uri );
-            }
-            catch ( IOException e )
-            {
-                throw e;
-            }
-            catch ( Exception e )
-            {
-                throw new ServletException( "Failed to " + action + " repository " + uri + ": " + e.toString() );
-            }
-
-        }
-    }
-
-
-    final void doDeploy( String[] bundles, boolean start, boolean optional )
-    {
-        // check whether we have to do something
-        if ( bundles == null || bundles.length == 0 )
-        {
-            logger.log( "No resources to deploy" );
-            return;
-        }
-
-        RepositoryAdmin repoAdmin = ( RepositoryAdmin ) getRepositoryAdmin();
-        Resolver resolver = repoAdmin.resolver();
-
-        // prepare the deployment
-        for ( int i = 0; i < bundles.length; i++ )
-        {
-            String bundle = bundles[i];
-            if ( bundle == null || bundle.equals( "-" ) )
-            {
-                continue;
-            }
-
-            String filter = "(id=" + bundle + ")";
-            Resource[] resources = repoAdmin.discoverResources( filter );
-            if ( resources != null && resources.length > 0 )
-            {
-                resolver.add( resources[0] );
-            }
-        }
-
-        OsgiDeployer.deploy( resolver, logger, start );
-    }
-
-
-    private final Repository getRepository( Repository[] repos, String repositoryUrl )
-    {
-        if ( repositoryUrl == null || repositoryUrl.length() == 0 )
-        {
-            return null;
-        }
-
-        for ( int i = 0; i < repos.length; i++ )
-        {
-            if ( repositoryUrl.equals( repos[i].getURL().toString() ) )
-            {
-                return repos[i];
-            }
-        }
-
-        return null;
-    }
-
-
-    private final JSONObject toJSON( Resource resource, Bundle[] bundles, boolean details ) throws JSONException
-    {
-        final String symbolicName = resource.getSymbolicName();
-        final String version = resource.getVersion().toString();
-        boolean installed = false;
-        for ( int i = 0; symbolicName != null && !installed && bundles != null && i < bundles.length; i++ )
-        {
-            final String ver = ( String ) bundles[i].getHeaders( "" ).get( Constants.BUNDLE_VERSION );
-            installed = symbolicName.equals( bundles[i].getSymbolicName() ) && version.equals( ver );
-        }
-        JSONObject json = new JSONObject( resource.getProperties() ) //
-            .put( "id", resource.getId() ) //
-            .put( "presentationname", resource.getPresentationName() ) //
-            .put( "symbolicname", symbolicName ) //
-            .put( "url", resource.getURL() ) //
-            .put( "version", version ) //
-            .put( "categories", resource.getCategories() ) //
-            .put( "installed", installed );
-
-        if ( details )
-        {
-            Capability[] caps = resource.getCapabilities();
-            for ( int i = 0; caps != null && i < caps.length; i++ )
-            {
-                json.append( "capabilities", new JSONObject().put( "name", caps[i].getName() ).put( "properties",
-                    new JSONObject( caps[i].getProperties() ) ) );
-            }
-            Requirement[] reqs = resource.getRequirements();
-            for ( int i = 0; reqs != null && i < reqs.length; i++ )
-            {
-                json.append( "requirements", new JSONObject().put( "name", reqs[i].getName() ).put( "filter",
-                    reqs[i].getFilter() ).put( "optional", reqs[i].isOptional() ) );
-            }
-
-            final RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
-            Resolver resolver = admin.resolver();
-            resolver.add( resource );
-            resolver.resolve(); // (Resolver.NO_OPTIONAL_RESOURCES);
-            Resource[] required = resolver.getRequiredResources();
-            for ( int i = 0; required != null && i < required.length; i++ )
-            {
-                json.append( "required", toJSON( required[i], bundles, false ) );
-            }
-            Resource[] optional = resolver.getOptionalResources();
-            for ( int i = 0; optional != null && i < optional.length; i++ )
-            {
-                json.append( "optional", toJSON( optional[i], bundles, false ) );
-            }
-            Requirement/*Reason*/[] unsatisfied = resolver.getUnsatisfiedRequirements();
-            for ( int i = 0; unsatisfied != null && i < unsatisfied.length; i++ )
-            {
-                json.append( "unsatisfied", new JSONObject().put( "name", unsatisfied[i].getName() ).put( "filter",
-                    unsatisfied[i].getFilter() ).put( "optional", unsatisfied[i].isOptional() ) );
-            }
-        }
-        return json;
-    }
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.webconsole.plugins.obr.internal;
+
+
+import java.io.IOException;
+import java.net.URL;
+import javax.servlet.ServletException;
+import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.service.obr.Capability;
+import org.osgi.service.obr.Repository;
+import org.osgi.service.obr.RepositoryAdmin;
+import org.osgi.service.obr.Requirement;
+import org.osgi.service.obr.Resolver;
+import org.osgi.service.obr.Resource;
+
+
+/**
+ * This class provides a plugin for rendering the available OSGi Bundle Repositories
+ * and the resources they provide.
+ */
+class OsgiBundleRepositoryRenderHelper extends AbstractBundleRepositoryRenderHelper
+{
+
+    OsgiBundleRepositoryRenderHelper( final AbstractWebConsolePlugin logger, final BundleContext bundleContext )
+    {
+        super( logger, bundleContext, RepositoryAdmin.class.getName() );
+    }
+
+
+    String getData( final String filter, final boolean details, Bundle[] bundles )
+    {
+        RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
+        if ( admin != null )
+        {
+            JSONObject json = new JSONObject();
+            try
+            {
+                json.put( "status", true ); //$NON-NLS-1$
+                json.put( "details", details ); //$NON-NLS-1$
+
+                final Repository repositories[] = admin.listRepositories();
+                for ( int i = 0; repositories != null && i < repositories.length; i++ )
+                {
+                    json.append( "repositories", new JSONObject() //$NON-NLS-1$
+                        .put( "lastModified", repositories[i].getLastModified() ) //$NON-NLS-1$
+                        .put( "name", repositories[i].getName() ) //$NON-NLS-1$
+                        .put( "url", repositories[i].getURL() ) ); //$NON-NLS-1$
+                }
+
+                Resource[] resources = admin.discoverResources( filter );
+                for ( int i = 0; resources != null && i < resources.length; i++ )
+                {
+                    json.append( "resources", toJSON( resources[i], bundles, details ) ); //$NON-NLS-1$
+                }
+            }
+            catch ( JSONException e )
+            {
+                logger.log( "Failed to serialize repository to JSON object.", e );
+            }
+            catch ( Exception e )
+            {
+                logger.log( "Failed to parse filter '" + filter + "'", e );
+                try
+                {
+                    String reason = "filter=" + filter;
+                    if ( e.getMessage() != null )
+                    {
+                        reason = e.getMessage() + "(" + reason + ")";
+                    }
+                    json.put( "error", reason ); //$NON-NLS-1$
+                }
+                catch ( JSONException je )
+                {
+                    // ignore
+                }
+            }
+
+            return json.toString();
+        }
+
+        // fall back to no data
+        return "{}"; //$NON-NLS-1$
+    }
+
+    void doAction( String action, String urlParam ) throws IOException, ServletException
+    {
+        RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
+        Repository[] repos = admin.listRepositories();
+        Repository repo = getRepository( repos, urlParam );
+
+        URL uri = repo != null ? repo.getURL() : new URL( urlParam );
+
+        if ( "delete".equals( action ) ) //$NON-NLS-1$
+        {
+            if ( !admin.removeRepository( uri ) )
+            {
+                throw new ServletException( "Failed to remove repository with URL " + uri );
+            }
+        }
+        else if ( "add".equals( action ) || "refresh".equals( action ) ) //$NON-NLS-1$ //$NON-NLS-2$
+        {
+            try
+            {
+                admin.addRepository( uri );
+            }
+            catch ( IOException e )
+            {
+                throw e;
+            }
+            catch ( Exception e )
+            {
+                throw new ServletException( "Failed to " + action + " repository " + uri + ": " + e.toString() );
+            }
+
+        }
+    }
+
+
+    final void doDeploy( String[] bundles, boolean start, boolean optional )
+    {
+        // check whether we have to do something
+        if ( bundles == null || bundles.length == 0 )
+        {
+            logger.log( "No resources to deploy" );
+            return;
+        }
+
+        RepositoryAdmin repoAdmin = ( RepositoryAdmin ) getRepositoryAdmin();
+        Resolver resolver = repoAdmin.resolver();
+
+        // prepare the deployment
+        for ( int i = 0; i < bundles.length; i++ )
+        {
+            String bundle = bundles[i];
+            if ( bundle == null || bundle.equals( "-" ) )
+            {
+                continue;
+            }
+
+            String filter = "(id=" + bundle + ")";
+            Resource[] resources = repoAdmin.discoverResources( filter );
+            if ( resources != null && resources.length > 0 )
+            {
+                resolver.add( resources[0] );
+            }
+        }
+
+        OsgiDeployer.deploy( resolver, logger, start );
+    }
+
+
+    private final Repository getRepository( Repository[] repos, String repositoryUrl )
+    {
+        if ( repositoryUrl == null || repositoryUrl.length() == 0 )
+        {
+            return null;
+        }
+
+        for ( int i = 0; i < repos.length; i++ )
+        {
+            if ( repositoryUrl.equals( repos[i].getURL().toString() ) )
+            {
+                return repos[i];
+            }
+        }
+
+        return null;
+    }
+
+
+    private final JSONObject toJSON( Resource resource, Bundle[] bundles, boolean details ) throws JSONException
+    {
+        final String symbolicName = resource.getSymbolicName();
+        final String version = resource.getVersion().toString();
+        boolean installed = false;
+        for ( int i = 0; symbolicName != null && !installed && bundles != null && i < bundles.length; i++ )
+        {
+            final String ver = ( String ) bundles[i].getHeaders( "" ).get( Constants.BUNDLE_VERSION ); //$NON-NLS-1$
+            installed = symbolicName.equals( bundles[i].getSymbolicName() ) && version.equals( ver );
+        }
+        JSONObject json = new JSONObject( resource.getProperties() ) //
+            .put( "id", resource.getId() ) // //$NON-NLS-1$
+            .put( "presentationname", resource.getPresentationName() ) // //$NON-NLS-1$
+            .put( "symbolicname", symbolicName ) // //$NON-NLS-1$
+            .put( "url", resource.getURL() ) // //$NON-NLS-1$
+            .put( "version", version ) // //$NON-NLS-1$
+            .put( "categories", resource.getCategories() ) // //$NON-NLS-1$
+            .put( "installed", installed ); //$NON-NLS-1$
+
+        if ( details )
+        {
+            Capability[] caps = resource.getCapabilities();
+            for ( int i = 0; caps != null && i < caps.length; i++ )
+            {
+                json.append( "capabilities", new JSONObject() //$NON-NLS-1$
+                    .put( "name", caps[i].getName() ) //$NON-NLS-1$
+                    .put( "properties", new JSONObject( caps[i].getProperties() ) ) ); //$NON-NLS-1$
+            }
+            Requirement[] reqs = resource.getRequirements();
+            for ( int i = 0; reqs != null && i < reqs.length; i++ )
+            {
+                json.append( "requirements", new JSONObject() //$NON-NLS-1$
+                    .put( "name", reqs[i].getName() ) //$NON-NLS-1$
+                    .put( "filter", reqs[i].getFilter() ) //$NON-NLS-1$
+                    .put( "optional", reqs[i].isOptional() ) ); //$NON-NLS-1$
+            }
+
+            final RepositoryAdmin admin = ( RepositoryAdmin ) getRepositoryAdmin();
+            Resolver resolver = admin.resolver();
+            resolver.add( resource );
+            resolver.resolve(); // (Resolver.NO_OPTIONAL_RESOURCES);
+            Resource[] required = resolver.getRequiredResources();
+            for ( int i = 0; required != null && i < required.length; i++ )
+            {
+                json.append( "required", toJSON( required[i], bundles, false ) ); //$NON-NLS-1$
+            }
+            Resource[] optional = resolver.getOptionalResources();
+            for ( int i = 0; optional != null && i < optional.length; i++ )
+            {
+                json.append( "optional", toJSON( optional[i], bundles, false ) ); //$NON-NLS-1$
+            }
+            Requirement/*Reason*/[] unsatisfied = resolver.getUnsatisfiedRequirements();
+            for ( int i = 0; unsatisfied != null && i < unsatisfied.length; i++ )
+            {
+                json.append( "unsatisfied", new JSONObject() //$NON-NLS-1$
+                    .put( "name", unsatisfied[i].getName() ) //$NON-NLS-1$
+                    .put( "filter", unsatisfied[i].getFilter() ) //$NON-NLS-1$
+                    .put( "optional", unsatisfied[i].isOptional() ) ); //$NON-NLS-1$
+            }
+        }
+        return json;
+    }
+
+}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/OsgiDeployer.java b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/OsgiDeployer.java
similarity index 92%
rename from webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/OsgiDeployer.java
rename to webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/OsgiDeployer.java
index 5533d30..e20da6f 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/OsgiDeployer.java
+++ b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/OsgiDeployer.java
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.webconsole.internal.obr;
+package org.apache.felix.webconsole.plugins.obr.internal;
 
 
 import org.apache.felix.webconsole.AbstractWebConsolePlugin;
@@ -26,7 +26,7 @@
 import org.osgi.service.obr.Resource;
 
 
-public class OsgiDeployer implements Runnable
+class OsgiDeployer implements Runnable
 {
 
     private final Resolver obrResolver;
@@ -36,6 +36,13 @@
     private final boolean startBundles;
 
 
+    OsgiDeployer( Resolver obrResolver, AbstractWebConsolePlugin logger, boolean startBundles )
+    {
+        this.obrResolver = obrResolver;
+        this.logger = logger;
+        this.startBundles = startBundles;
+    }
+
     static void deploy( Resolver obrResolver, AbstractWebConsolePlugin logger, boolean startBundles )
     {
         final OsgiDeployer d = new OsgiDeployer( obrResolver, logger, startBundles );
@@ -43,15 +50,9 @@
         t.start();
     }
 
-
-    public OsgiDeployer( Resolver obrResolver, AbstractWebConsolePlugin logger, boolean startBundles )
-    {
-        this.obrResolver = obrResolver;
-        this.logger = logger;
-        this.startBundles = startBundles;
-    }
-
-
+    /**
+     * @see java.lang.Runnable#run()
+     */
     public void run()
     {
         try
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/WebConsolePlugin.java
similarity index 74%
rename from webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
rename to webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/WebConsolePlugin.java
index 1cb5380..c80a88c 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/obr/BundleRepositoryRender.java
+++ b/webconsole-plugins/obr/src/main/java/org/apache/felix/webconsole/plugins/obr/internal/WebConsolePlugin.java
@@ -1,317 +1,323 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.webconsole.internal.obr;
-
-
-import java.io.IOException;
-import java.util.Enumeration;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.felix.webconsole.DefaultVariableResolver;
-import org.apache.felix.webconsole.SimpleWebConsolePlugin;
-import org.apache.felix.webconsole.WebConsoleUtil;
-import org.apache.felix.webconsole.internal.OsgiManagerPlugin;
-
-
-/**
- * This class provides a plugin for rendering the available OSGi Bundle Repositories
- * and the resources they provide.
- */
-public class BundleRepositoryRender extends SimpleWebConsolePlugin implements OsgiManagerPlugin
-{
-    private static final String LABEL = "obr";
-    private static final String TITLE = "%obr.pluginTitle";
-    private static final String[] CSS =
-        { "/res/ui/obr.css" };
-
-    // templates
-    private final String TEMPLATE;
-
-    private AbstractBundleRepositoryRenderHelper helper;
-
-
-    /**
-     *
-     */
-    public BundleRepositoryRender()
-    {
-        super( LABEL, TITLE, CSS );
-
-        // load templates
-        TEMPLATE = readTemplateFile( "/templates/obr.html" );
-    }
-
-
-    public void deactivate()
-    {
-        if ( helper != null )
-        {
-            helper.dispose();
-            helper = null;
-        }
-
-        super.deactivate();
-    }
-
-
-    /**
-     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void renderContent( HttpServletRequest request, HttpServletResponse response ) throws IOException
-    {
-        // prepare variables
-        DefaultVariableResolver vars = ( ( DefaultVariableResolver ) WebConsoleUtil.getVariableResolver( request ) );
-        vars.put( "__data__", getData( request ) );
-
-        response.getWriter().print( TEMPLATE );
-    }
-
-
-    /**
-     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException,
-        IOException
-    {
-        if ( !hasRepositoryAdmin() )
-        {
-            response.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "RepositoryAdmin service is missing" );
-            return;
-        }
-
-        final String action = request.getParameter( "action" );
-        final String deploy = request.getParameter( "deploy" );
-        final String deploystart = request.getParameter( "deploystart" );
-        final String optional = request.getParameter( "optional" );
-
-        if ( action != null )
-        {
-            doAction( action, request.getParameter( "url" ) );
-            response.getWriter().print( getData( request ) );
-            return;
-        }
-
-        if ( deploy != null || deploystart != null )
-        {
-            doDeploy( request.getParameterValues( "bundle" ), deploystart != null, optional != null );
-            doGet( request, response );
-            return;
-        }
-
-        super.doPost( request, response );
-    }
-
-
-    AbstractBundleRepositoryRenderHelper getHelper()
-    {
-        if ( helper == null )
-        {
-            try
-            {
-                helper = new FelixBundleRepositoryRenderHelper( this, getBundleContext() );
-            }
-            catch ( Throwable felixt )
-            {
-                // ClassNotFoundException, ClassDefNotFoundError
-
-                try
-                {
-                    helper = new OsgiBundleRepositoryRenderHelper( this, getBundleContext() );
-                }
-                catch ( Throwable osgit )
-                {
-                    // ClassNotFoundException, ClassDefNotFoundError
-                }
-            }
-        }
-
-        return helper;
-    }
-
-
-    private boolean hasRepositoryAdmin()
-    {
-        AbstractBundleRepositoryRenderHelper helper = getHelper();
-        return helper != null && helper.hasRepositoryAdmin();
-    }
-
-
-    private String getData( final HttpServletRequest request )
-    {
-        AbstractBundleRepositoryRenderHelper helper = getHelper();
-        if ( helper == null || !helper.hasRepositoryAdmin() )
-        {
-            return "{}";
-        }
-
-        RequestInfo info = new RequestInfo( request );
-
-        final String filter;
-        String list = info.getList();
-        if ( list != null )
-        {
-            if ( "-".equals( list ) )
-            {
-                StringBuffer sb = new StringBuffer( "(!(|" );
-                for ( int c = 0; c < 26; c++ )
-                {
-                    sb.append( "(presentationname=" ).append( ( char ) ( 'a' + c ) ).append( "*)(presentationname=" )
-                        .append( ( char ) ( 'A' + c ) ).append( "*)" );
-                }
-                sb.append( "))" );
-                filter = sb.toString();
-            }
-            else
-            {
-                filter = "(|(presentationname=" + list.toLowerCase() + "*)(presentationname=" + list.toUpperCase()
-                    + "*))";
-            }
-        }
-        else
-        {
-            String query = info.getQuery();
-            if ( query != null )
-            {
-                if ( query.indexOf( '=' ) > 0 )
-                {
-                    if ( query.startsWith( "(" ) )
-                    {
-                        filter = query;
-                    }
-                    else
-                    {
-                        filter = "(" + query + ")";
-                    }
-                }
-                else
-                {
-                    filter = "(|(presentationame=*" + query + "*)(symbolicname=*" + query + "*))";
-                }
-            }
-            else
-            {
-                StringBuffer sb = new StringBuffer( "(&" );
-                for ( Enumeration e = request.getParameterNames(); e.hasMoreElements(); )
-                {
-                    String k = ( String ) e.nextElement();
-                    String v = request.getParameter( k );
-                    if ( v != null && v.length() > 0 && !"details".equals( k ) && !"deploy".equals( k )
-                        && !"deploystart".equals( k ) && !"bundle".equals( k ) && !"optional".equals( k ) )
-                    {
-                        sb.append( "(" ).append( k ).append( "=" ).append( v ).append( ")" );
-                    }
-                }
-                sb.append( ")" );
-                filter = (sb.length() > 3) ? sb.toString() : null;
-            }
-        }
-
-        return helper.getData( filter, info.showDetails(), getBundleContext().getBundles() );
-    }
-
-
-    private void doAction( String action, String urlParam ) throws IOException, ServletException
-    {
-        AbstractBundleRepositoryRenderHelper helper = getHelper();
-        if ( helper != null )
-        {
-            helper.doAction( action, urlParam );
-        }
-    }
-
-
-    private void doDeploy( String[] bundles, boolean start, boolean optional )
-    {
-        AbstractBundleRepositoryRenderHelper helper = getHelper();
-        if ( helper != null )
-        {
-            helper.doDeploy( bundles, start, optional );
-        }
-    }
-
-    private static class RequestInfo {
-
-        private final HttpServletRequest request;
-
-        private boolean details;
-        private String query;
-        private String list;
-
-
-        RequestInfo( final HttpServletRequest request )
-        {
-            this.request = request;
-        }
-
-
-        boolean showDetails()
-        {
-            getQuery();
-            return details;
-        }
-
-
-        String getQuery()
-        {
-            if ( query == null )
-            {
-                String query = WebConsoleUtil.urlDecode( request.getParameter( "query" ) );
-                boolean details = false;
-                if ( query == null && request.getPathInfo().length() > 5 )
-                {
-                    // cut off "/obr/" prefix (might want to use getTitle ??)
-                    String path = request.getPathInfo().substring( 5 );
-                    int slash = path.indexOf( '/' );
-                    if ( slash < 0 )
-                    {
-                        // symbolic name only, version ??
-                        query = "(symbolicname=" + path + ")";
-                    }
-                    else
-                    {
-                        query = "(&(symbolicname=" + path.substring( 0, slash ) + ")(version="
-                            + path.substring( slash + 1 ) + "))";
-                        details = true;
-                    }
-                }
-
-                this.query = query;
-                this.details = details;
-            }
-            return query;
-        }
-
-
-        String getList()
-        {
-            if ( list == null )
-            {
-                list = WebConsoleUtil.urlDecode( request.getParameter( "list" ) );
-                if ( list == null && !request.getParameterNames().hasMoreElements() && getQuery() == null )
-                {
-                    list = "a";
-                }
-            }
-            return list;
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.webconsole.plugins.obr.internal;
+
+
+import java.io.IOException;
+import java.util.Enumeration;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.webconsole.DefaultVariableResolver;
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.apache.felix.webconsole.WebConsoleUtil;
+
+
+/**
+ * This class provides a plugin for rendering the available OSGi Bundle Repositories
+ * and the resources they provide.
+ */
+class WebConsolePlugin extends SimpleWebConsolePlugin 
+{
+    private static final String LABEL = "obr"; //$NON-NLS-1$
+    private static final String TITLE = "%obr.pluginTitle"; //$NON-NLS-1$
+    private static final String CSS[] = { "/" + LABEL + "/res/plugin.css" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+    // templates
+    private final String TEMPLATE;
+
+    private AbstractBundleRepositoryRenderHelper helper;
+
+
+    /**
+     *
+     */
+    public WebConsolePlugin()
+    {
+        super( LABEL, TITLE, CSS );
+
+        // load templates
+        TEMPLATE = readTemplateFile("/res/plugin.html"); //$NON-NLS-1$
+    }
+
+
+    /**
+     * @see org.apache.felix.webconsole.SimpleWebConsolePlugin#deactivate()
+     */
+    public void deactivate()
+    {
+        if ( helper != null )
+        {
+            helper.dispose();
+            helper = null;
+        }
+
+        super.deactivate();
+    }
+
+
+    /**
+     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void renderContent( HttpServletRequest request, HttpServletResponse response ) throws IOException
+    {
+        // prepare variables
+        DefaultVariableResolver vars = ( ( DefaultVariableResolver ) WebConsoleUtil.getVariableResolver( request ) );
+        vars.put( "__data__", getData( request ) ); //$NON-NLS-1$
+
+        response.getWriter().print( TEMPLATE );
+    }
+
+
+    /**
+     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException,
+        IOException
+    {
+        if ( !hasRepositoryAdmin() )
+        {
+            response.sendError( HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "RepositoryAdmin service is missing" );
+            return;
+        }
+
+        final String action = request.getParameter( "action" ); //$NON-NLS-1$
+        final String deploy = request.getParameter( "deploy" ); //$NON-NLS-1$
+        final String deploystart = request.getParameter( "deploystart" ); //$NON-NLS-1$
+        final String optional = request.getParameter( "optional" ); //$NON-NLS-1$
+
+        if ( action != null )
+        {
+            doAction( action, request.getParameter( "url" ) ); //$NON-NLS-1$
+            response.getWriter().print( getData( request ) );
+            return;
+        }
+
+        if ( deploy != null || deploystart != null )
+        {
+            doDeploy( request.getParameterValues( "bundle" ), deploystart != null, optional != null ); //$NON-NLS-1$
+            doGet( request, response );
+            return;
+        }
+
+        super.doPost( request, response );
+    }
+
+
+    AbstractBundleRepositoryRenderHelper getHelper()
+    {
+        if ( helper == null )
+        {
+            try
+            {
+                helper = new FelixBundleRepositoryRenderHelper( this, getBundleContext() );
+            }
+            catch ( Throwable felixt )
+            {
+                // ClassNotFoundException, ClassDefNotFoundError
+
+                try
+                {
+                    helper = new OsgiBundleRepositoryRenderHelper( this, getBundleContext() );
+                }
+                catch ( Throwable osgit )
+                {
+                    // ClassNotFoundException, ClassDefNotFoundError
+                }
+            }
+        }
+
+        return helper;
+    }
+
+
+    private boolean hasRepositoryAdmin()
+    {
+        AbstractBundleRepositoryRenderHelper helper = getHelper();
+        return helper != null && helper.hasRepositoryAdmin();
+    }
+
+
+    private String getData( final HttpServletRequest request )
+    {
+        AbstractBundleRepositoryRenderHelper helper = getHelper();
+        if ( helper == null || !helper.hasRepositoryAdmin() )
+        {
+            return "{}"; //$NON-NLS-1$
+        }
+
+        RequestInfo info = new RequestInfo( request );
+
+        final String filter;
+        String list = info.getList();
+        if ( list != null )
+        {
+            if ( "-".equals( list ) ) //$NON-NLS-1$
+            {
+                StringBuffer sb = new StringBuffer( "(!(|" ); //$NON-NLS-1$
+                for ( int c = 0; c < 26; c++ )
+                {
+                    sb.append( "(presentationname=" ).append( ( char ) ( 'a' + c ) ) //$NON-NLS-1$
+                      .append( "*)(presentationname=" ).append( ( char ) ( 'A' + c ) ) //$NON-NLS-1$
+                      .append( "*)" ); //$NON-NLS-1$
+                }
+                sb.append( "))" ); //$NON-NLS-1$
+                filter = sb.toString();
+            }
+            else
+            {
+                filter = "(|(presentationname=" + list.toLowerCase() //$NON-NLS-1$
+                    + "*)(presentationname=" + list.toUpperCase() + "*))"; //$NON-NLS-1$ //$NON-NLS-2$
+            }
+        }
+        else
+        {
+            String query = info.getQuery();
+            if ( query != null )
+            {
+                if ( query.indexOf( '=' ) > 0 )
+                {
+                    if ( query.startsWith( "(" ) ) //$NON-NLS-1$
+                    {
+                        filter = query;
+                    }
+                    else
+                    {
+                        filter = "(" + query + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+                    }
+                }
+                else
+                {
+                    filter = "(|(presentationame=*" + query + "*)(symbolicname=*" + query + "*))"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+                }
+            }
+            else
+            {
+                StringBuffer sb = new StringBuffer( "(&" ); //$NON-NLS-1$
+                for ( Enumeration e = request.getParameterNames(); e.hasMoreElements(); )
+                {
+                    String k = ( String ) e.nextElement();
+                    String v = request.getParameter( k );
+                    if ( v != null && v.length() > 0 
+                        && !"details".equals( k )  //$NON-NLS-1$
+                        && !"deploy".equals( k ) //$NON-NLS-1$
+                        && !"deploystart".equals( k )  //$NON-NLS-1$
+                        && !"bundle".equals( k )  //$NON-NLS-1$
+                        && !"optional".equals( k ) ) //$NON-NLS-1$
+                    {
+                        sb.append( '(' ).append( k ).append( '=' ).append( v ).append( ')' );
+                    }
+                }
+                sb.append( ')' );
+                filter = (sb.length() > 3) ? sb.toString() : null;
+            }
+        }
+
+        return helper.getData( filter, info.showDetails(), getBundleContext().getBundles() );
+    }
+
+
+    private void doAction( String action, String urlParam ) throws IOException, ServletException
+    {
+        AbstractBundleRepositoryRenderHelper helper = getHelper();
+        if ( helper != null )
+        {
+            helper.doAction( action, urlParam );
+        }
+    }
+
+
+    private void doDeploy( String[] bundles, boolean start, boolean optional )
+    {
+        AbstractBundleRepositoryRenderHelper helper = getHelper();
+        if ( helper != null )
+        {
+            helper.doDeploy( bundles, start, optional );
+        }
+    }
+
+    private static class RequestInfo {
+
+        private final HttpServletRequest request;
+
+        private boolean details;
+        private String query;
+        private String list;
+
+
+        RequestInfo( final HttpServletRequest request )
+        {
+            this.request = request;
+        }
+
+
+        boolean showDetails()
+        {
+            getQuery();
+            return details;
+        }
+
+
+        String getQuery()
+        {
+            if ( query == null )
+            {
+                String query = WebConsoleUtil.urlDecode( request.getParameter( "query" ) ); //$NON-NLS-1$
+                boolean details = false;
+                if ( query == null && request.getPathInfo().length() > 5 )
+                {
+                    // cut off "/obr/" prefix (might want to use getTitle ??)
+                    String path = request.getPathInfo().substring( 5 );
+                    int slash = path.indexOf( '/' );
+                    if ( slash < 0 )
+                    {
+                        // symbolic name only, version ??
+                        query = "(symbolicname=" + path + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+                    }
+                    else
+                    {
+                        query = "(&(symbolicname=" + path.substring( 0, slash )  //$NON-NLS-1$
+                            + ")(version=" + path.substring( slash + 1 ) + "))"; //$NON-NLS-1$ //$NON-NLS-2$
+                        details = true;
+                    }
+                }
+
+                this.query = query;
+                this.details = details;
+            }
+            return query;
+        }
+
+
+        String getList()
+        {
+            if ( list == null )
+            {
+                list = WebConsoleUtil.urlDecode( request.getParameter( "list" ) ); //$NON-NLS-1$
+                if ( list == null && !request.getParameterNames().hasMoreElements() && getQuery() == null )
+                {
+                    list = "a"; //$NON-NLS-1$
+                }
+            }
+            return list;
+        }
+    }
+}
diff --git a/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties b/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
new file mode 100644
index 0000000..89b6aae
--- /dev/null
+++ b/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
@@ -0,0 +1,49 @@
+﻿#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
+
+# OBR Plugin
+obr.pluginTitle=OSGi Хранилище
+obr.status.ok=Apache Bundle Repository услъгата е достъпна.
+obr.status.no=Нуждаете се от Apache Bundle Repository услугата за да се възползвате от тази функционалност!
+obr.version.select=Изберете версия...
+obr.repo.title=Бъндъл хранилище
+obr.action.add=Добавяне
+obr.action.search=Търсене
+obr.action.search.description=Въведе част от презентацията на бъндъла (име, описание, версия ...), \
+ или валиден OSGi филтър
+obr.action.deploy=Инсталиране на избраните
+obr.action.deploystart=Инсталиране и стартиране на избраните
+obr.repo.name=Име
+obr.repo.url=Адрес
+obr.repo.lastModified=Последна промяна
+obr.repo.actions=Действия
+obr.res.title=Достъпни ресурси
+obr.res.name=Име на ресурса
+obr.res.installedVer=Инсталирана версия
+obr.error=Грешка при филтриране на ресурсите
diff --git a/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties b/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
new file mode 100644
index 0000000..e99dfb5
--- /dev/null
+++ b/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
@@ -0,0 +1,50 @@
+#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# OBR Plugin
+obr.pluginTitle=OSGi Repository
+obr.status.ok=Der Apache Bundle Repository Service ist aktiv und bereit.
+obr.status.no=Der Apache Bundle Repository Service ist nicht aktiv!
+obr.version.select=Wähle Version...
+obr.repo.title=Bundle Repositories
+obr.action.add=Hinzufügen
+obr.action.search=Suchen
+obr.action.search.description=Geben Sie einen Teil des Präsentations- oder \
+ symoblischen Namens der gesuchten Bundles oder einen gültigen OSGi \
+ Filter Ausdruck
+obr.action.deploy=Ausgewählte Installieren
+obr.action.deploystart=Ausgewählte Installieren und Starten
+obr.repo.name=Name
+obr.repo.url=URL
+obr.repo.lastModified=Letzte Änderung
+obr.repo.actions=Aktionen
+obr.res.title=Verfügbare Resourcen
+obr.res.name=Resource Name
+obr.res.installedVer=Installierte Version
+obr.error=Fehler bei der Auswahl der Resourcen
diff --git a/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties b/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
new file mode 100644
index 0000000..f3cebef
--- /dev/null
+++ b/webconsole-plugins/obr/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
@@ -0,0 +1,49 @@
+﻿#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# OBR Plugin
+obr.pluginTitle=Хранилище OSGi
+obr.status.ok=Сервис Apache Bundle Repository запущен и работает.
+obr.status.no=Сервис Apache Bundle Repository не найден!
+obr.version.select=Выберите версию...
+obr.repo.title=Хранилище модулей
+obr.action.add=Добавить
+obr.action.search=Поиск
+obr.action.search.description=Введите слово, содержащееся в описании модуля (или в имени, версии и т. д.) \
+ или правильный OSGi фильтр
+obr.action.deploy=Установить выбранное
+obr.action.deploystart=Установить и запустить выбранное
+obr.repo.name=Имя
+obr.repo.url=Адрес
+obr.repo.lastModified=Последнее изменение
+obr.repo.actions=Действия
+obr.res.title=Доступные ресурсы
+obr.res.name=Имя ресурса
+obr.res.installedVer=Установленная версия
+obr.error=Ошибка фильтрации ресурсов
diff --git a/webconsole-plugins/obr/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole-plugins/obr/src/main/resources/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..78812a5
--- /dev/null
+++ b/webconsole-plugins/obr/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,49 @@
+#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# OBR Plugin
+obr.pluginTitle=OSGi Repository
+obr.status.ok=The Apache Bundle Repository service is up and running.
+obr.status.no=The Apache Bundle Repository service is not available!
+obr.version.select=Select Version...
+obr.repo.title=Bundle Repositories
+obr.action.add=Add
+obr.action.search=Search
+obr.action.search.description=Enter word contained in bundle presentation \
+ and/or symbolic name or a valid OSGi Filter Expression
+obr.action.deploy=Deploy Selected
+obr.action.deploystart=Deploy and Start Selected
+obr.repo.name=Name
+obr.repo.url=URL
+obr.repo.lastModified=Last Modified
+obr.repo.actions=Actions
+obr.res.title=Available Resources
+obr.res.name=Resource Name
+obr.res.installedVer=Installed Version
+obr.error=Error Filtering Resources
diff --git a/webconsole/src/main/resources/res/ui/obr.css b/webconsole-plugins/obr/src/main/resources/res/plugin.css
similarity index 100%
rename from webconsole/src/main/resources/res/ui/obr.css
rename to webconsole-plugins/obr/src/main/resources/res/plugin.css
diff --git a/webconsole-plugins/obr/src/main/resources/res/plugin.html b/webconsole-plugins/obr/src/main/resources/res/plugin.html
new file mode 100644
index 0000000..4037a24
--- /dev/null
+++ b/webconsole-plugins/obr/src/main/resources/res/plugin.html
@@ -0,0 +1,102 @@
+<script type="text/javascript" src="${pluginRoot}/res/plugin.js"></script>
+<script type="text/javascript">
+var i18n = {
+	status_ok : '${obr.status.ok}',
+	status_no : '${obr.status.no}',
+	selectVersion : '${obr.version.select}',
+	error : '${obr.error}'
+}
+var obrData = ${__data__};
+</script>
+
+<p class="statline">${obr.status.ok}</p>
+
+<div id="ifStatusOK" class="ui-helper-hidden">
+
+<div class="ui-widget-header ui-corner-top buttonGroup">
+	<span style="float: left; margin-left: 1em">${obr.repo.title}</span>
+	<input style="width: 50%" type="text" id="addRepoUri" />
+	<button id="addRepoBtn">${obr.action.add}</button>
+</div>
+
+<table id="repoTable" class="nicetable">
+	<thead>
+		<tr>
+			<th class="col_Name">${obr.repo.name}</th>
+			<th class="col_URL">${obr.repo.url}</th>
+			<th class="col_lastMod">${obr.repo.lastModified}</th>
+			<th class="col_Actions">${obr.repo.actions}</th>
+		</tr>
+	</thead>
+	<tbody> <!-- template: will be replaced dynamically by JS -->
+		<tr>
+			<td>name</td>
+			<td>url</td>
+			<td>date</td>
+			<td>
+				<ul class="icons ui-widget">
+					<li class="dynhover" title="${refresh}"><span class="ui-icon ui-icon-refresh">&nbsp;</span></li>
+					<li class="dynhover" title="${delete}"><span class="ui-icon ui-icon-trash">&nbsp;</span></li>
+				</ul>
+			</td>
+		</tr>
+	</tbody>
+</table>
+
+<br/>
+
+<div class="ui-widget-header ui-corner-top buttonGroup">
+    <span style="float: left; margin-left: 1em">${obr.res.title}</span>
+    <span>
+        <a href="${pluginRoot}?list=a">A</a>
+        <a href="${pluginRoot}?list=b">B</a>
+        <a href="${pluginRoot}?list=c">C</a>
+        <a href="${pluginRoot}?list=d">D</a>
+        <a href="${pluginRoot}?list=e">E</a>
+        <a href="${pluginRoot}?list=f">F</a>
+        <a href="${pluginRoot}?list=g">G</a>
+        <a href="${pluginRoot}?list=h">H</a>
+        <a href="${pluginRoot}?list=i">I</a>
+        <a href="${pluginRoot}?list=j">J</a>
+        <a href="${pluginRoot}?list=k">K</a>
+        <a href="${pluginRoot}?list=l">L</a>
+        <a href="${pluginRoot}?list=m">M</a>
+        <a href="${pluginRoot}?list=n">N</a>
+        <a href="${pluginRoot}?list=o">O</a>
+        <a href="${pluginRoot}?list=p">P</a>
+        <a href="${pluginRoot}?list=q">Q</a>
+        <a href="${pluginRoot}?list=r">R</a>
+        <a href="${pluginRoot}?list=s">S</a>
+        <a href="${pluginRoot}?list=t">T</a>
+        <a href="${pluginRoot}?list=u">U</a>
+        <a href="${pluginRoot}?list=v">V</a>
+        <a href="${pluginRoot}?list=w">W</a>
+        <a href="${pluginRoot}?list=x">X</a>
+        <a href="${pluginRoot}?list=y">Y</a>
+        <a href="${pluginRoot}?list=z">Z</a>
+        <a href="${pluginRoot}?list=-">?</a>
+    </span>
+    <input type="text" id="searchField" title="${obr.action.search.description}"/>
+    <button id="searchBtn">${obr.action.search}</button>
+</div>
+
+<table id="resTable" class="nicetable">
+    <thead>
+        <tr>
+            <th class="col_ResName">${obr.res.name}</th>
+            <th class="col_VersionInst">${obr.res.installedVer}</th>
+        </tr>
+    </thead>
+    <tbody>
+        <tr><td colspan="2">dummy</td></tr>
+    </tbody>
+</table>
+
+<table id="detailsTable" class="nicetable ui-helper-hidden">
+    <tbody id="detailsTableBody">
+    </tbody>
+</table>
+
+<br/>
+
+</div> <!-- ifStatusOK -->
\ No newline at end of file
diff --git a/webconsole/src/main/resources/res/ui/obr.js b/webconsole-plugins/obr/src/main/resources/res/plugin.js
similarity index 99%
rename from webconsole/src/main/resources/res/ui/obr.js
rename to webconsole-plugins/obr/src/main/resources/res/plugin.js
index 58e5ffb..159ccfa 100644
--- a/webconsole/src/main/resources/res/ui/obr.js
+++ b/webconsole-plugins/obr/src/main/resources/res/plugin.js
@@ -1,510 +1,510 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
- 
-var repoTable = false;
-var repoTableTemplate = false;
-var addRepoUri = false;
-var resTable = false;
-var searchField = false;
-var ifStatusOK = false;
-
-//This prototype is provided by the Mozilla foundation and
-//is distributed under the MIT license.
-//http://www.ibiblio.org/pub/Linux/LICENSES/mit.license
-if (!Array.prototype.map)
-{
-  Array.prototype.map = function(fun /*, thisp*/)
-  {
-    var len = this.length;
-    if (typeof fun != "function")
-      throw new TypeError();
-
-    var res = new Array(len);
-    var thisp = arguments[1];
-    for (var i = 0; i < len; i++)
-    {
-      if (i in this)
-        res[i] = fun.call(thisp, this[i], i, this);
-    }
-
-    return res;
-  };
-}
-
-var uid = 0;
-function guid() {
-   uid = uid + 1;
-   return (0x10000 + uid).toString(16).substring(1) + (((1+Math.random())*0x10000)|0).toString(16).substring(1);
-}
-
-/* displays a date in the user's local timezone */
-function localTm(time) {
-    return (time ? new Date(time) : new Date()).toLocaleString();
-}
-
-function doRepoAction(action, url) {
-    if ( !url ) {
-        Xalert('Invalid URI: ' + url, 'Error');
-    } else {
-        $.post(pluginRoot, {
-            'action' : action,
-            'url'    : url
-        }, renderData, 'json');
-    }
-}
-
-function showDetails( symbolicname, version ) {
-    window.location.href = pluginRoot + '/' + symbolicname + '/' + version;
-}
-
-function showVersions( symbolicname ) {
-    var _id = symbolicname.replace(/\./g, '_');
-    $("#block" + _id).append("<div id='pluginInlineVersions" + _id + "' style='margin-left: 4em'><ul/></div>");
-    $("#img" + _id).each(function() {
-        $(this).
-            removeClass('ui-icon-triangle-1-e').//right
-            addClass('ui-icon-triangle-1-s');//down
-    });
-    $("#entry" + _id).each(function() {
-        $(this).
-            unbind('click').
-            click(function() {hideVersions(symbolicname)}).
-            attr("title", "Hide Versions");
-    });
-    var versions = [];
-    for (var i in obrData.resources ) {
-        if (obrData.resources[i].symbolicname == symbolicname) {
-            versions.push(obrData.resources[i].version);
-        }
-    }
-    versions.sort();
-    for (var i in versions) {
-        var txt = "<li><a href='javascript: showDetails(\"" + symbolicname + "\",\"" + versions[i] + "\")'>" + versions[i] + "</a></li>";
-        $("#pluginInlineVersions" + _id + " > ul").append(txt);
-    }
-}
-
-function hideVersions( symbolicname ) {
-    var _id = symbolicname.replace(/\./g, '_');
-    $("#img" + _id).each(function() {
-        $(this).
-            removeClass('ui-icon-triangle-1-s').//down
-            addClass('ui-icon-triangle-1-e');//right
-    });
-    $("#pluginInlineVersions" + _id).each(function() {
-        $(this).
-            remove();
-    });
-    $("#entry" + _id).each(function() {
-        $(this).
-            unbind('click').
-            click(function() {showVersions(symbolicname)}).
-            attr("title", "Show Versions");
-    });
-}
-
-function renderResource(res) {
-    // proceed with resource
-    var _id = res.symbolicname.replace(/\./g, '_');
-    var _tr = resTable.find('#row' + _id);
-
-    if (_tr.length == 0) { // not created yet, create it
-        var blockElement = createElement('span', '', {
-            id: 'block' + _id
-        });
-        var titleElement = createElement('span', '', {
-            id: 'entry' + _id,
-            title: "Show Versions"
-        });
-        var inputElement = createElement('span', 'ui-icon ui-icon-triangle-1-e', {
-            id: 'img' + _id,
-            style: {display: "inline-block"}
-        });
-        blockElement.appendChild(titleElement);
-        titleElement.appendChild(inputElement);
-        titleElement.appendChild(text(" "));
-        if (res.presentationname) {
-	    titleElement.appendChild(text(res.presentationname));
-	    titleElement.appendChild(text(" ("));
-	    titleElement.appendChild(text(res.symbolicname));
-	    titleElement.appendChild(text(")"));
-	} else {
-	    titleElement.appendChild(text(res.symbolicname));
-	}
-        $(titleElement).click(function() {showVersions(res.symbolicname)});
-
-        _tr = tr( null, { 'id' : 'row' + _id } , [
-            td( null, null, [ blockElement ] ),
-            td( null, null, [ text(res.installed ? res.version : '') ] )
-        ]);
-        resTable.append( _tr );
-    }
-}
-
-function getCapabilitiesByName(res, name) {
-    var caps = [];
-    for (var v in res.capabilities) {
-        if (res.capabilities[v].name == name) {
-            caps.push(res.capabilities[v]);
-        }
-    }
-    return caps;
-}
-
-function getRequirementsByName(res, name) {
-    var caps = [];
-    for (var v in res.requirements) {
-        if (res.requirements[v].name == name) {
-            caps.push(res.requirements[v]);
-        }
-    }
-    return caps;
-}
-
-function createDetailedTable(enclosing, name, headers, rows, callback) {
-    if (rows && rows.length > 0) {
-        var uuid = guid();
-        var title = createElement('span', null, null, [
-                                createElement('span', 'ui-icon ui-icon-triangle-1-e', { id: "img"+uuid, style: {display: "inline-block"} }),
-                                text(" "),
-                                text(name)
-                             ]);
-        enclosing.append(tr(null, null, [
-            td(null, null, [ title ]),
-            td(null, null, [ createElement('table', 'nicetable ui-widget ui-helper-hidden', { id: "alt1"+uuid }, [
-                                createElement('thead', null, null, [
-                                    tr(null, null, headers.map(function(x) {
-                                        return th('ui-widget-header', null, [text(x)]);
-                                    }))
-                                ]),
-                                createElement('tbody', null, null,
-                                    rows.map(function(x) {
-                                        var values = callback(x);
-                                        var tds = values.map(function(x) {
-                                            return td(null, null, [x]);
-                                        });
-                                        return tr(null, null, tds);
-                                    })
-                                )
-                             ]),
-                             createElement('span', null, { id: "alt2"+uuid }, [
-                                text(rows.length)
-                             ])
-            ])
-        ]));
-        $(title).
-                unbind('click').
-                click(function(event) {
-                    event.preventDefault();
-                    $("#img"+uuid).toggleClass('ui-icon-triangle-1-s').//down
-                                   toggleClass('ui-icon-triangle-1-e');//right
-                    $("#alt1"+uuid).toggle();
-                    $("#alt2"+uuid).toggle();
-                });
-    }
-}
-
-function trim(stringToTrim) {
-    return stringToTrim.replace(/^\s+|\s+$/g,"");
-}
-
-function parseSimpleFilter(filter) {
-    filter = filter.substring(1, filter.length-1);
-    var start = 0;
-    var pos = 0;
-    var c = filter.charAt(pos);
-    while (c != '~' && c != '<' && c != '>' && c != '=' && c != '(' && c != ')') {
-        if (c == '<' && filterChars[pos+1] == '*') {
-            break;
-        }
-        if (c == '*' && filterChars[pos+1] == '>') {
-            break;
-        }
-        pos++;
-        c = filter.charAt(pos);
-    }
-    if (pos == start) {
-        throw ("Missing attr: " + filter.substring(pos));
-    }
-
-    var attr = trim(filter.substring(start, pos));
-    var oper = filter.substring(pos, pos+2);
-    var value;
-    if (oper == '*>' || oper == '~=' || oper == '>=' || oper == '<=' || oper == '<*') {
-        value = trim(filter.substring(pos+2));
-        if (value == '') {
-            throw ("Missing value: " + filter.substring(pos));
-        }
-
-        return { operator: oper, operands: [ attr, value ]};
-    } else {
-        if (c != '=') {
-            throw ("Invalid operator: " + filter.substring(pos));
-        }
-        oper = '=';
-        value = filter.substring(pos+1);
-        if (value == '*' ) {
-            return { operator: '=*', operands: [ attr ]};
-        }
-        return { operator: '=', operands: [ attr, value ]};
-    }
-}
-
-function parseFilter(filter) {
-    if (filter.charAt(0) != "(" || filter.charAt(filter.length-1) != ")") {
-        throw "Wrong parenthesis: " + filter;
-    }
-    if (filter.charAt(1) == "!") {
-        return { operator: filter.charAt(1), operands: [ parseFilter(filter.substring(2, filter.length-1)) ] };
-    }
-    if (filter.charAt(1) == "|" || filter.charAt(1) == "&") {
-        var inner = filter.substring(2, filter.length-1);
-        var flts = inner.match(/\([^\(\)]*(\([^\(\)]*(\([^\(\)]*(\([^\(\)]*\))*[^\(\)]*\))*[^\(\)]*\))*[^\(\)]*\)/g);
-        return { operator: filter.charAt(1), operands: flts.map(function(x) { return parseFilter(x); }) };
-    }
-    return parseSimpleFilter(filter);
-}
-
-function simplify(filter) {
-    if (filter.operator == '&' || filter.operator == '|') {
-        filter.operands = filter.operands.map(function(x) { return simplify(x); });
-    } else if (filter.operator == '!') {
-        if (filter.operands[0].operator == '<=') {
-            filter.operator = '>';
-            filter.operands = filter.operands[0].operands;
-        } else if (filter.operands[0].operator == '>=') {
-            filter.operator = '<';
-            filter.operands = filter.operands[0].operands;
-        }
-    }
-    return filter;
-}
-
-function addRow(tbody, key, value) {
-    if (value) {
-        tbody.append( tr(null, null, [
-            td(null, null, [ text(key) ]),
-            td(null, null, [ text(value) ])
-        ]));
-    }
-}
-
-function renderDetailedResource(res) {
-    var tbody = $('#detailsTableBody');
-
-    tbody.append( tr(null, null, [
-        th('ui-widget-header', null, [
-            text("Resource")
-        ]),
-        th('ui-widget-header', null, [
-            createElement('form', 'button-group', { method: "post"}, [
-                createElement('input', null, { type: "hidden", name: "bundle", value: res.id}),
-                createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploy", value: "Deploy" }, [ text("dummy")]),
-                createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploystart", value: "Deploy and Start" }, [ text("dummy")]),
-                text(" "),
-                createElement('input', 'ui-state-default ui-corner-all', { id: "optional", type: "checkbox", name: "optional" }),
-                text(" "),
-                createElement('label', 'ui-widget', { 'for': "optional" }, [ text("deploy optional dependencies") ])
-            ])
-        ])
-    ]));
-
-    addRow(tbody, "Name", res.presentationname);
-    addRow(tbody, "Description", res.description);
-    addRow(tbody, "Symbolic name", res.symbolicname);
-    addRow(tbody, "Version", res.version);
-    addRow(tbody, "URI", res.uri);
-    addRow(tbody, "Documentation", res.documentation);
-    addRow(tbody, "Javadoc", res.javadoc);
-    addRow(tbody, "Source", res.source);
-    addRow(tbody, "License", res.license);
-    addRow(tbody, "Copyright", res.copyright);
-    addRow(tbody, "Size", res.size);
-
-    // Exported packages
-    createDetailedTable(tbody, "Exported packages", ["Package", "Version"],
-                        getCapabilitiesByName(res, "package").sort(function(a,b) {
-                            var pa = a.properties['package'], pb = b.properties['package']; return pa == pb ? 0 : pa < pb ? -1 : +1;
-                        }),
-                        function(p) {
-                            return [ text(p.properties['package']), text(p.properties['version']) ];
-                        });
-    // Exported services
-    createDetailedTable(tbody, "Exported services", ["Service"], getCapabilitiesByName(res, "service"), function(p) {
-                            return [ text(p.properties['service']) ];
-                        });
-    // Imported packages
-    createDetailedTable(tbody, "Imported packages", ["Package", "Version", "Optional"], getRequirementsByName(res, "package"), function(p) {
-                            var f = parseFilter(p.filter);
-                            simplify(f);
-                            var n, vmin = "[0.0.0", vmax = "infinity)";
-                            if (f.operator == '&') {
-                                for (var i in f.operands) {
-                                    var fi = f.operands[i];
-                                    if (fi.operands[0] == 'package' && fi.operator == '=') {
-                                        n = fi.operands[1];
-                                    }
-                                    if (fi.operands[0] == 'version') {
-                                        if (fi.operator == '>=') {
-                                            vmin = '[' + fi.operands[1];
-                                        }
-                                        if (fi.operator == '>') {
-                                            vmin = '(' + fi.operands[1];
-                                        }
-                                        if (fi.operator == '<=') {
-                                            vmax = fi.operands[1] + "]";
-                                        }
-                                        if (fi.operator == '<') {
-                                            vmax = fi.operands[1] + ")";
-                                        }
-                                    }
-                                }
-                            }
-                            return [ text(n ? n : p.filter), text(vmin + ", " + vmax), text(p.optional) ];
-                        });
-    // Imported bundles
-    createDetailedTable(tbody, "Imported bundles", ["Bundle", "Version", "Optional"], getRequirementsByName(res, "bundle"), function(p) {
-                            return [ text(p.filter), text(""), text(p.optional) ];
-                        });
-    // Imported services
-    createDetailedTable(tbody, "Imported services", ["Service", "Optional"], getRequirementsByName(res, "service"), function(p) {
-                            return [ text(p.filter), text(p.optional) ];
-                        });
-    // Required dependencies
-    createDetailedTable(tbody, "Dependencies", ["Name", "Version"], res.required, function(p) {
-                            var a = createElement('a', null, { href: (pluginRoot + '/' + p.symbolicname + '/' + p.version) });
-                            a.appendChild(text(p.presentationname ? p.presentationname : p.symbolicname));
-                            return [ a, text(p.version) ];
-                        });
-    // Optional dependencies
-    createDetailedTable(tbody, "Optional Dependencies", ["Name", "Version"], res.optional, function(p) {
-                            var a = createElement('a', null, { href: (pluginRoot + '/' + p.symbolicname + '/' + p.version) });
-                            a.appendChild(text(p.presentationname ? p.presentationname : p.symbolicname));
-                            return [ a, text(p.version) ];
-                        });
-    // Unsatisfied requirements
-    createDetailedTable(tbody, "Unsatisfied Requirements", ["Requirement", "Optional"], res.unsatisfied, function(p) {
-                            return [ text(p.filter), text(p.optional) ];
-                        });
-
-//    $('#detailsTableBody').append( tr(null, null, [ th('ui-widget-header', { colspan: 2 }, [ text("Resource") ]) ]) );
-//    $('#detailsTableBody').append( tbody );
-}
-
-function renderRepository(repo) {
-    var _tr = repoTableTemplate.clone();
-    _tr.find('td:eq(0)').text( repo.name );
-    _tr.find('td:eq(1)').text( repo.url );
-    _tr.find('td:eq(2)').text( localTm(repo.lastModified) );
-    _tr.find('li:eq(0)').click(function() {
-        doRepoAction('refresh', repo.url);
-    });
-    _tr.find('li:eq(1)').click(function() {
-        doRepoAction('delete', repo.url);
-    });
-    repoTable.append(_tr);
-}
-
-function renderData() {
-    repoTable.empty();
-    resTable.empty();
-    if ( obrData.status ) {
-        $('.statline').html(i18n.status_ok);
-        ifStatusOK.removeClass('ui-helper-hidden');
-        for (var i in obrData.repositories ) {
-            renderRepository( obrData.repositories[i] );
-        }
-        if (obrData.details) {
-            $('#resTable').addClass('ui-helper-hidden');
-            $('#detailsTable').removeClass('ui-helper-hidden');
-            for (var i in obrData.resources ) {
-                renderDetailedResource( obrData.resources[i] );
-            }
-        } else if (obrData.resources) {
-            for (var i in obrData.resources ) {
-                renderResource( obrData.resources[i] );
-            }
-        } else if (obrData.error) {
-            _tr = tr( "ui-state-error", null , [
-                      td( "ui-state-error-text", { 'colspan': '2' }, 
-                	  [ text(i18n.error + ": " + obrData.error) ] )
-                  ]);
-            resTable.append( _tr );
-        }
-    } else {
-        $('.statline').html(i18n.status_no);
-        ifStatusOK.addClass('ui-helper-hidden');
-    }
-}
-
-
-$.extend({
-  getUrlVars: function(){
-    var vars = [], hash;
-    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
-    for(var i = 0; i < hashes.length; i++)
-    {
-      var j = hashes[i].indexOf('=');
-      if (j > 0) {
-        var k = hashes[i].slice(0, j);
-        var v = hashes[i].slice(j + 1);
-        vars.push(k);
-        vars[k] = v;
-      } else {
-        vars.push(hashes[i]);
-        vars[hashes[i]] = true;
-      }
-    }
-    return vars;
-  },
-  getUrlVar: function(name){
-    return $.getUrlVars()[name];
-  }
-});
-
-$(document).ready( function() {
-    repoTable = $('#repoTable tbody');
-    repoTableTemplate = repoTable.find('tr').clone();
-    addRepoUri = $('#addRepoUri');
-    resTable = $('#resTable tbody').empty();
-    searchField = $('#searchField');
-    ifStatusOK = $('#ifStatusOK');
-    
-    var query = $.getUrlVar('query');
-    if (query) {
-        searchField.val(decodeURIComponent(query));
-    }
-
-    $('#addRepoBtn').click(function(event) {
-        event.preventDefault();
-        doRepoAction('add', addRepoUri.val());
-    });
-    $('#searchBtn').click(function(event) {
-        event.preventDefault();
-        window.location.href = pluginRoot + '?query=' + encodeURIComponent(searchField.val());
-    });
-    searchField.keypress(function(event) {
-        if (event.keyCode == 13) {
-            event.preventDefault();
-            $('#searchBtn').click();
-        }
-    });
-
-    renderData();
-    initStaticWidgets();
-});
-
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+var repoTable = false;
+var repoTableTemplate = false;
+var addRepoUri = false;
+var resTable = false;
+var searchField = false;
+var ifStatusOK = false;
+
+//This prototype is provided by the Mozilla foundation and
+//is distributed under the MIT license.
+//http://www.ibiblio.org/pub/Linux/LICENSES/mit.license
+if (!Array.prototype.map)
+{
+  Array.prototype.map = function(fun /*, thisp*/)
+  {
+    var len = this.length;
+    if (typeof fun != "function")
+      throw new TypeError();
+
+    var res = new Array(len);
+    var thisp = arguments[1];
+    for (var i = 0; i < len; i++)
+    {
+      if (i in this)
+        res[i] = fun.call(thisp, this[i], i, this);
+    }
+
+    return res;
+  };
+}
+
+var uid = 0;
+function guid() {
+   uid = uid + 1;
+   return (0x10000 + uid).toString(16).substring(1) + (((1+Math.random())*0x10000)|0).toString(16).substring(1);
+}
+
+/* displays a date in the user's local timezone */
+function localTm(time) {
+    return (time ? new Date(time) : new Date()).toLocaleString();
+}
+
+function doRepoAction(action, url) {
+    if ( !url ) {
+        Xalert('Invalid URI: ' + url, 'Error');
+    } else {
+        $.post(pluginRoot, {
+            'action' : action,
+            'url'    : url
+        }, renderData, 'json');
+    }
+}
+
+function showDetails( symbolicname, version ) {
+    window.location.href = pluginRoot + '/' + symbolicname + '/' + version;
+}
+
+function showVersions( symbolicname ) {
+    var _id = symbolicname.replace(/\./g, '_');
+    $("#block" + _id).append("<div id='pluginInlineVersions" + _id + "' style='margin-left: 4em'><ul/></div>");
+    $("#img" + _id).each(function() {
+        $(this).
+            removeClass('ui-icon-triangle-1-e').//right
+            addClass('ui-icon-triangle-1-s');//down
+    });
+    $("#entry" + _id).each(function() {
+        $(this).
+            unbind('click').
+            click(function() {hideVersions(symbolicname)}).
+            attr("title", "Hide Versions");
+    });
+    var versions = [];
+    for (var i in obrData.resources ) {
+        if (obrData.resources[i].symbolicname == symbolicname) {
+            versions.push(obrData.resources[i].version);
+        }
+    }
+    versions.sort();
+    for (var i in versions) {
+        var txt = "<li><a href='javascript: showDetails(\"" + symbolicname + "\",\"" + versions[i] + "\")'>" + versions[i] + "</a></li>";
+        $("#pluginInlineVersions" + _id + " > ul").append(txt);
+    }
+}
+
+function hideVersions( symbolicname ) {
+    var _id = symbolicname.replace(/\./g, '_');
+    $("#img" + _id).each(function() {
+        $(this).
+            removeClass('ui-icon-triangle-1-s').//down
+            addClass('ui-icon-triangle-1-e');//right
+    });
+    $("#pluginInlineVersions" + _id).each(function() {
+        $(this).
+            remove();
+    });
+    $("#entry" + _id).each(function() {
+        $(this).
+            unbind('click').
+            click(function() {showVersions(symbolicname)}).
+            attr("title", "Show Versions");
+    });
+}
+
+function renderResource(res) {
+    // proceed with resource
+    var _id = res.symbolicname.replace(/\./g, '_');
+    var _tr = resTable.find('#row' + _id);
+
+    if (_tr.length == 0) { // not created yet, create it
+        var blockElement = createElement('span', '', {
+            id: 'block' + _id
+        });
+        var titleElement = createElement('span', '', {
+            id: 'entry' + _id,
+            title: "Show Versions"
+        });
+        var inputElement = createElement('span', 'ui-icon ui-icon-triangle-1-e', {
+            id: 'img' + _id,
+            style: {display: "inline-block"}
+        });
+        blockElement.appendChild(titleElement);
+        titleElement.appendChild(inputElement);
+        titleElement.appendChild(text(" "));
+        if (res.presentationname) {
+	    titleElement.appendChild(text(res.presentationname));
+	    titleElement.appendChild(text(" ("));
+	    titleElement.appendChild(text(res.symbolicname));
+	    titleElement.appendChild(text(")"));
+	} else {
+	    titleElement.appendChild(text(res.symbolicname));
+	}
+        $(titleElement).click(function() {showVersions(res.symbolicname)});
+
+        _tr = tr( null, { 'id' : 'row' + _id } , [
+            td( null, null, [ blockElement ] ),
+            td( null, null, [ text(res.installed ? res.version : '') ] )
+        ]);
+        resTable.append( _tr );
+    }
+}
+
+function getCapabilitiesByName(res, name) {
+    var caps = [];
+    for (var v in res.capabilities) {
+        if (res.capabilities[v].name == name) {
+            caps.push(res.capabilities[v]);
+        }
+    }
+    return caps;
+}
+
+function getRequirementsByName(res, name) {
+    var caps = [];
+    for (var v in res.requirements) {
+        if (res.requirements[v].name == name) {
+            caps.push(res.requirements[v]);
+        }
+    }
+    return caps;
+}
+
+function createDetailedTable(enclosing, name, headers, rows, callback) {
+    if (rows && rows.length > 0) {
+        var uuid = guid();
+        var title = createElement('span', null, null, [
+                                createElement('span', 'ui-icon ui-icon-triangle-1-e', { id: "img"+uuid, style: {display: "inline-block"} }),
+                                text(" "),
+                                text(name)
+                             ]);
+        enclosing.append(tr(null, null, [
+            td(null, null, [ title ]),
+            td(null, null, [ createElement('table', 'nicetable ui-widget ui-helper-hidden', { id: "alt1"+uuid }, [
+                                createElement('thead', null, null, [
+                                    tr(null, null, headers.map(function(x) {
+                                        return th('ui-widget-header', null, [text(x)]);
+                                    }))
+                                ]),
+                                createElement('tbody', null, null,
+                                    rows.map(function(x) {
+                                        var values = callback(x);
+                                        var tds = values.map(function(x) {
+                                            return td(null, null, [x]);
+                                        });
+                                        return tr(null, null, tds);
+                                    })
+                                )
+                             ]),
+                             createElement('span', null, { id: "alt2"+uuid }, [
+                                text(rows.length)
+                             ])
+            ])
+        ]));
+        $(title).
+                unbind('click').
+                click(function(event) {
+                    event.preventDefault();
+                    $("#img"+uuid).toggleClass('ui-icon-triangle-1-s').//down
+                                   toggleClass('ui-icon-triangle-1-e');//right
+                    $("#alt1"+uuid).toggle();
+                    $("#alt2"+uuid).toggle();
+                });
+    }
+}
+
+function trim(stringToTrim) {
+    return stringToTrim.replace(/^\s+|\s+$/g,"");
+}
+
+function parseSimpleFilter(filter) {
+    filter = filter.substring(1, filter.length-1);
+    var start = 0;
+    var pos = 0;
+    var c = filter.charAt(pos);
+    while (c != '~' && c != '<' && c != '>' && c != '=' && c != '(' && c != ')') {
+        if (c == '<' && filterChars[pos+1] == '*') {
+            break;
+        }
+        if (c == '*' && filterChars[pos+1] == '>') {
+            break;
+        }
+        pos++;
+        c = filter.charAt(pos);
+    }
+    if (pos == start) {
+        throw ("Missing attr: " + filter.substring(pos));
+    }
+
+    var attr = trim(filter.substring(start, pos));
+    var oper = filter.substring(pos, pos+2);
+    var value;
+    if (oper == '*>' || oper == '~=' || oper == '>=' || oper == '<=' || oper == '<*') {
+        value = trim(filter.substring(pos+2));
+        if (value == '') {
+            throw ("Missing value: " + filter.substring(pos));
+        }
+
+        return { operator: oper, operands: [ attr, value ]};
+    } else {
+        if (c != '=') {
+            throw ("Invalid operator: " + filter.substring(pos));
+        }
+        oper = '=';
+        value = filter.substring(pos+1);
+        if (value == '*' ) {
+            return { operator: '=*', operands: [ attr ]};
+        }
+        return { operator: '=', operands: [ attr, value ]};
+    }
+}
+
+function parseFilter(filter) {
+    if (filter.charAt(0) != "(" || filter.charAt(filter.length-1) != ")") {
+        throw "Wrong parenthesis: " + filter;
+    }
+    if (filter.charAt(1) == "!") {
+        return { operator: filter.charAt(1), operands: [ parseFilter(filter.substring(2, filter.length-1)) ] };
+    }
+    if (filter.charAt(1) == "|" || filter.charAt(1) == "&") {
+        var inner = filter.substring(2, filter.length-1);
+        var flts = inner.match(/\([^\(\)]*(\([^\(\)]*(\([^\(\)]*(\([^\(\)]*\))*[^\(\)]*\))*[^\(\)]*\))*[^\(\)]*\)/g);
+        return { operator: filter.charAt(1), operands: flts.map(function(x) { return parseFilter(x); }) };
+    }
+    return parseSimpleFilter(filter);
+}
+
+function simplify(filter) {
+    if (filter.operator == '&' || filter.operator == '|') {
+        filter.operands = filter.operands.map(function(x) { return simplify(x); });
+    } else if (filter.operator == '!') {
+        if (filter.operands[0].operator == '<=') {
+            filter.operator = '>';
+            filter.operands = filter.operands[0].operands;
+        } else if (filter.operands[0].operator == '>=') {
+            filter.operator = '<';
+            filter.operands = filter.operands[0].operands;
+        }
+    }
+    return filter;
+}
+
+function addRow(tbody, key, value) {
+    if (value) {
+        tbody.append( tr(null, null, [
+            td(null, null, [ text(key) ]),
+            td(null, null, [ text(value) ])
+        ]));
+    }
+}
+
+function renderDetailedResource(res) {
+    var tbody = $('#detailsTableBody');
+
+    tbody.append( tr(null, null, [
+        th('ui-widget-header', null, [
+            text("Resource")
+        ]),
+        th('ui-widget-header', null, [
+            createElement('form', 'button-group', { method: "post"}, [
+                createElement('input', null, { type: "hidden", name: "bundle", value: res.id}),
+                createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploy", value: "Deploy" }, [ text("dummy")]),
+                createElement('input', 'ui-state-default ui-corner-all', { type: "submit", name: "deploystart", value: "Deploy and Start" }, [ text("dummy")]),
+                text(" "),
+                createElement('input', 'ui-state-default ui-corner-all', { id: "optional", type: "checkbox", name: "optional" }),
+                text(" "),
+                createElement('label', 'ui-widget', { 'for': "optional" }, [ text("deploy optional dependencies") ])
+            ])
+        ])
+    ]));
+
+    addRow(tbody, "Name", res.presentationname);
+    addRow(tbody, "Description", res.description);
+    addRow(tbody, "Symbolic name", res.symbolicname);
+    addRow(tbody, "Version", res.version);
+    addRow(tbody, "URI", res.uri);
+    addRow(tbody, "Documentation", res.documentation);
+    addRow(tbody, "Javadoc", res.javadoc);
+    addRow(tbody, "Source", res.source);
+    addRow(tbody, "License", res.license);
+    addRow(tbody, "Copyright", res.copyright);
+    addRow(tbody, "Size", res.size);
+
+    // Exported packages
+    createDetailedTable(tbody, "Exported packages", ["Package", "Version"],
+                        getCapabilitiesByName(res, "package").sort(function(a,b) {
+                            var pa = a.properties['package'], pb = b.properties['package']; return pa == pb ? 0 : pa < pb ? -1 : +1;
+                        }),
+                        function(p) {
+                            return [ text(p.properties['package']), text(p.properties['version']) ];
+                        });
+    // Exported services
+    createDetailedTable(tbody, "Exported services", ["Service"], getCapabilitiesByName(res, "service"), function(p) {
+                            return [ text(p.properties['service']) ];
+                        });
+    // Imported packages
+    createDetailedTable(tbody, "Imported packages", ["Package", "Version", "Optional"], getRequirementsByName(res, "package"), function(p) {
+                            var f = parseFilter(p.filter);
+                            simplify(f);
+                            var n, vmin = "[0.0.0", vmax = "infinity)";
+                            if (f.operator == '&') {
+                                for (var i in f.operands) {
+                                    var fi = f.operands[i];
+                                    if (fi.operands[0] == 'package' && fi.operator == '=') {
+                                        n = fi.operands[1];
+                                    }
+                                    if (fi.operands[0] == 'version') {
+                                        if (fi.operator == '>=') {
+                                            vmin = '[' + fi.operands[1];
+                                        }
+                                        if (fi.operator == '>') {
+                                            vmin = '(' + fi.operands[1];
+                                        }
+                                        if (fi.operator == '<=') {
+                                            vmax = fi.operands[1] + "]";
+                                        }
+                                        if (fi.operator == '<') {
+                                            vmax = fi.operands[1] + ")";
+                                        }
+                                    }
+                                }
+                            }
+                            return [ text(n ? n : p.filter), text(vmin + ", " + vmax), text(p.optional) ];
+                        });
+    // Imported bundles
+    createDetailedTable(tbody, "Imported bundles", ["Bundle", "Version", "Optional"], getRequirementsByName(res, "bundle"), function(p) {
+                            return [ text(p.filter), text(""), text(p.optional) ];
+                        });
+    // Imported services
+    createDetailedTable(tbody, "Imported services", ["Service", "Optional"], getRequirementsByName(res, "service"), function(p) {
+                            return [ text(p.filter), text(p.optional) ];
+                        });
+    // Required dependencies
+    createDetailedTable(tbody, "Dependencies", ["Name", "Version"], res.required, function(p) {
+                            var a = createElement('a', null, { href: (pluginRoot + '/' + p.symbolicname + '/' + p.version) });
+                            a.appendChild(text(p.presentationname ? p.presentationname : p.symbolicname));
+                            return [ a, text(p.version) ];
+                        });
+    // Optional dependencies
+    createDetailedTable(tbody, "Optional Dependencies", ["Name", "Version"], res.optional, function(p) {
+                            var a = createElement('a', null, { href: (pluginRoot + '/' + p.symbolicname + '/' + p.version) });
+                            a.appendChild(text(p.presentationname ? p.presentationname : p.symbolicname));
+                            return [ a, text(p.version) ];
+                        });
+    // Unsatisfied requirements
+    createDetailedTable(tbody, "Unsatisfied Requirements", ["Requirement", "Optional"], res.unsatisfied, function(p) {
+                            return [ text(p.filter), text(p.optional) ];
+                        });
+
+//    $('#detailsTableBody').append( tr(null, null, [ th('ui-widget-header', { colspan: 2 }, [ text("Resource") ]) ]) );
+//    $('#detailsTableBody').append( tbody );
+}
+
+function renderRepository(repo) {
+    var _tr = repoTableTemplate.clone();
+    _tr.find('td:eq(0)').text( repo.name );
+    _tr.find('td:eq(1)').text( repo.url );
+    _tr.find('td:eq(2)').text( localTm(repo.lastModified) );
+    _tr.find('li:eq(0)').click(function() {
+        doRepoAction('refresh', repo.url);
+    });
+    _tr.find('li:eq(1)').click(function() {
+        doRepoAction('delete', repo.url);
+    });
+    repoTable.append(_tr);
+}
+
+function renderData() {
+    repoTable.empty();
+    resTable.empty();
+    if ( obrData.status ) {
+        $('.statline').html(i18n.status_ok);
+        ifStatusOK.removeClass('ui-helper-hidden');
+        for (var i in obrData.repositories ) {
+            renderRepository( obrData.repositories[i] );
+        }
+        if (obrData.details) {
+            $('#resTable').addClass('ui-helper-hidden');
+            $('#detailsTable').removeClass('ui-helper-hidden');
+            for (var i in obrData.resources ) {
+                renderDetailedResource( obrData.resources[i] );
+            }
+        } else if (obrData.resources) {
+            for (var i in obrData.resources ) {
+                renderResource( obrData.resources[i] );
+            }
+        } else if (obrData.error) {
+            _tr = tr( "ui-state-error", null , [
+                      td( "ui-state-error-text", { 'colspan': '2' }, 
+                	  [ text(i18n.error + ": " + obrData.error) ] )
+                  ]);
+            resTable.append( _tr );
+        }
+    } else {
+        $('.statline').html(i18n.status_no);
+        ifStatusOK.addClass('ui-helper-hidden');
+    }
+}
+
+
+$.extend({
+  getUrlVars: function(){
+    var vars = [], hash;
+    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
+    for(var i = 0; i < hashes.length; i++)
+    {
+      var j = hashes[i].indexOf('=');
+      if (j > 0) {
+        var k = hashes[i].slice(0, j);
+        var v = hashes[i].slice(j + 1);
+        vars.push(k);
+        vars[k] = v;
+      } else {
+        vars.push(hashes[i]);
+        vars[hashes[i]] = true;
+      }
+    }
+    return vars;
+  },
+  getUrlVar: function(name){
+    return $.getUrlVars()[name];
+  }
+});
+
+$(document).ready( function() {
+    repoTable = $('#repoTable tbody');
+    repoTableTemplate = repoTable.find('tr').clone();
+    addRepoUri = $('#addRepoUri');
+    resTable = $('#resTable tbody').empty();
+    searchField = $('#searchField');
+    ifStatusOK = $('#ifStatusOK');
+    
+    var query = $.getUrlVar('query');
+    if (query) {
+        searchField.val(decodeURIComponent(query));
+    }
+
+    $('#addRepoBtn').click(function(event) {
+        event.preventDefault();
+        doRepoAction('add', addRepoUri.val());
+    });
+    $('#searchBtn').click(function(event) {
+        event.preventDefault();
+        window.location.href = pluginRoot + '?query=' + encodeURIComponent(searchField.val());
+    });
+    searchField.keypress(function(event) {
+        if (event.keyCode == 13) {
+            event.preventDefault();
+            $('#searchBtn').click();
+        }
+    });
+
+    renderData();
+    initStaticWidgets();
+});
+
diff --git a/webconsole-plugins/shell/LICENSE b/webconsole-plugins/shell/LICENSE
new file mode 100644
index 0000000..75b5248
--- /dev/null
+++ b/webconsole-plugins/shell/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/webconsole-plugins/shell/NOTICE b/webconsole-plugins/shell/NOTICE
new file mode 100644
index 0000000..3a3923a
--- /dev/null
+++ b/webconsole-plugins/shell/NOTICE
@@ -0,0 +1,21 @@
+Apache Felix OSGi Web Console Event Plugin
+Copyright 2007-2010 The Apache Software Foundation
+
+
+I. Included Software
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+Licensed under the Apache License 2.0.
+
+
+II. Used Software
+
+This product uses software developed at
+The OSGi Alliance (http://www.osgi.org/).
+Copyright (c) OSGi Alliance (2000, 2009).
+Licensed under the Apache License 2.0.
+
+
+III. License Summary
+- Apache License 2.0
diff --git a/webconsole-plugins/shell/pom.xml b/webconsole-plugins/shell/pom.xml
new file mode 100644
index 0000000..661d3cd
--- /dev/null
+++ b/webconsole-plugins/shell/pom.xml
@@ -0,0 +1,114 @@
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.apache.felix</groupId>
+		<artifactId>felix-parent</artifactId>
+		<version>1.2.0</version>
+		<relativePath>../../../pom/pom.xml</relativePath>
+	</parent>
+
+	<artifactId>org.apache.felix.webconsole.plugins.shell</artifactId>
+	<packaging>bundle</packaging>
+	<version>1.0.0-SNAPSHOT</version>
+
+	<name>Apache Felix Web Console Shell Plugin</name>
+	<description>
+        This is a plugin for the Apache Felix OSGi web console that provides access to shell/console commands.
+    </description>
+
+	<scm>
+		<connection>scm:svn:http://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/shell</connection>
+		<developerConnection>scm:svn:https://svn.apache.org/repos/asf/felix/trunk/webconsole-plugins/shell</developerConnection>
+		<url>http://svn.apache.org/viewvc/felix/trunk/webconsole-plugins/shell</url>
+	</scm>
+
+	<build>
+		<plugins>
+			<!-- translate UTF-8 encoded properties files to ISO-8859-1 -->
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>native2ascii-maven-plugin</artifactId>
+				<version>1.0-alpha-1</version>
+				<executions>
+					<execution>
+						<goals>
+							<goal>native2ascii</goal>
+						</goals>
+						<configuration>
+							<encoding>UTF-8</encoding>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<version>2.0.1</version>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>
+							${artifactId}
+                        </Bundle-SymbolicName>
+						<Bundle-Activator>
+							org.apache.felix.webconsole.plugins.shell.internal.Activator
+                        </Bundle-Activator>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+
+	<dependencies>
+		<dependency>
+			<groupId>javax.servlet</groupId>
+			<artifactId>servlet-api</artifactId>
+			<version>2.4</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.core</artifactId>
+			<version>4.0.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.osgi</groupId>
+			<artifactId>org.osgi.compendium</artifactId>
+			<version>4.1.0</version>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20070829</version>
+			<scope>compile</scope>
+			<optional>true</optional>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.felix</groupId>
+			<artifactId>org.apache.felix.webconsole</artifactId>
+			<version>3.0.0</version>
+			<scope>provided</scope>
+		</dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.shell</artifactId>
+            <version>1.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+	</dependencies>
+</project>
diff --git a/webconsole-plugins/shell/src/main/java/org/apache/felix/webconsole/plugins/shell/internal/Activator.java b/webconsole-plugins/shell/src/main/java/org/apache/felix/webconsole/plugins/shell/internal/Activator.java
new file mode 100644
index 0000000..c26abac
--- /dev/null
+++ b/webconsole-plugins/shell/src/main/java/org/apache/felix/webconsole/plugins/shell/internal/Activator.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.felix.webconsole.plugins.shell.internal;
+
+import org.apache.felix.shell.ShellService;
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.util.tracker.ServiceTracker;
+import org.osgi.util.tracker.ServiceTrackerCustomizer;
+
+/**
+ * Activator is the main starting class.
+ */
+public class Activator implements BundleActivator, ServiceTrackerCustomizer
+{
+
+    private ServiceTracker tracker;
+    private BundleContext context;
+
+    private SimpleWebConsolePlugin plugin;
+
+    /**
+     * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+     */
+    public final void start(BundleContext context) throws Exception
+    {
+        this.context = context;
+        this.tracker = new ServiceTracker(context, ShellService.class.getName(), this);
+        this.tracker.open();
+    }
+
+    /**
+     * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+     */
+    public final void stop(BundleContext context) throws Exception
+    {
+        if (tracker != null)
+        {
+            tracker.close();
+            tracker = null;
+        }
+    }
+
+    // - begin tracker
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#modifiedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void modifiedService(ServiceReference reference, Object service)
+    {/* unused */
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#addingService(org.osgi.framework.ServiceReference)
+     */
+    public final Object addingService(ServiceReference reference)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+        if (plugin == null)
+        {
+            this.plugin = plugin = new WebConsolePlugin(tracker).register(context);
+        }
+
+        return context.getService(reference);
+    }
+
+    /**
+     * @see org.osgi.util.tracker.ServiceTrackerCustomizer#removedService(org.osgi.framework.ServiceReference,
+     *      java.lang.Object)
+     */
+    public final void removedService(ServiceReference reference, Object service)
+    {
+        SimpleWebConsolePlugin plugin = this.plugin;
+
+        if (tracker.getTrackingCount() == 0 && plugin != null)
+        {
+            plugin.unregister();
+            this.plugin = null;
+        }
+
+    }
+}
diff --git a/webconsole-plugins/shell/src/main/java/org/apache/felix/webconsole/plugins/shell/internal/WebConsolePlugin.java b/webconsole-plugins/shell/src/main/java/org/apache/felix/webconsole/plugins/shell/internal/WebConsolePlugin.java
new file mode 100644
index 0000000..9508ebc
--- /dev/null
+++ b/webconsole-plugins/shell/src/main/java/org/apache/felix/webconsole/plugins/shell/internal/WebConsolePlugin.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.webconsole.plugins.shell.internal;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.felix.shell.ShellService;
+import org.apache.felix.webconsole.DefaultVariableResolver;
+import org.apache.felix.webconsole.SimpleWebConsolePlugin;
+import org.apache.felix.webconsole.WebConsoleUtil;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * ShellServlet provides a Web bases interface to the Apache shell service, allowing
+ * the user to execute shell commands from the browser.
+ */
+class WebConsolePlugin extends SimpleWebConsolePlugin
+{
+
+    private static final String LABEL = "shell"; //$NON-NLS-1$
+    private static final String TITLE = "%shell.pluginTitle"; //$NON-NLS-1$
+    private static final String CSS[] = { "/" + LABEL + "/res/plugin.css" }; //$NON-NLS-1$ //$NON-NLS-2$
+
+    private final ServiceTracker tracker;
+
+    // templates
+    private final String TEMPLATE;
+
+    WebConsolePlugin(ServiceTracker tracker)
+    {
+        super(LABEL, TITLE, CSS);
+
+        // load templates
+        TEMPLATE = readTemplateFile("/res/plugin.html"); //$NON-NLS-1$
+        this.tracker = tracker;
+    }
+
+    /**
+     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void doPost(HttpServletRequest request, HttpServletResponse response)
+        throws ServletException, IOException
+    {
+        response.setCharacterEncoding("utf-8"); //$NON-NLS-1$
+        response.setContentType("text/html"); //$NON-NLS-1$
+
+        PrintWriter pw = response.getWriter();
+
+        try
+        {
+            String command = request.getParameter("command"); //$NON-NLS-1$
+            if (command != null)
+            {
+                command = WebConsoleUtil.urlDecode(command);
+            }
+
+            pw.print("<span class=\"consolecommand\">-&gt; "); //$NON-NLS-1$
+            pw.print(command == null ? "" : WebConsoleUtil.escapeHtml(command)); //$NON-NLS-1$
+            pw.println("</span><br />"); //$NON-NLS-1$
+
+            if (command != null && command.length() > 0)
+            {
+                ShellService shellService = getShellService();
+                if (shellService != null)
+                {
+                    ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
+                    ByteArrayOutputStream baosErr = new ByteArrayOutputStream();
+
+                    shellService.executeCommand(command, new PrintStream(baosOut, true),
+                        new PrintStream(baosErr, true));
+                    if (baosOut.size() > 0)
+                    {
+                        pw.print(WebConsoleUtil.escapeHtml(new String(
+                            baosOut.toByteArray())));
+                    }
+                    if (baosErr.size() > 0)
+                    {
+                        pw.print("<span class=\"error\">"); //$NON-NLS-1$
+                        pw.print(WebConsoleUtil.escapeHtml(new String(
+                            baosErr.toByteArray())));
+                        pw.println("</span>"); //$NON-NLS-1$
+                    }
+                }
+                else
+                {
+                    pw.print("<span class=\"error\">"); //$NON-NLS-1$
+                    pw.print("Error: No shell service available<br />");
+                    pw.println("</span>"); //$NON-NLS-1$
+                }
+            }
+        }
+        catch (Throwable t)
+        {
+            pw.print("<span class=\"error\">"); //$NON-NLS-1$
+            StringWriter out = new StringWriter();
+            t.printStackTrace(new PrintWriter(out, true));
+            pw.print(WebConsoleUtil.escapeHtml(out.toString()));
+            pw.println("</span>"); //$NON-NLS-1$
+        }
+    }
+
+    /**
+     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
+     */
+    protected void renderContent(HttpServletRequest request, HttpServletResponse response)
+        throws IOException
+    {
+        DefaultVariableResolver vr = (DefaultVariableResolver) WebConsoleUtil.getVariableResolver(request);
+        if (getShellService() == null)
+        {
+            vr.put("shell.status", "Shell Service not available"); //$NON-NLS-1$
+            vr.put("shell.disabled", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+        else
+        {
+            vr.put("shell.disabled", "false"); //$NON-NLS-1$ //$NON-NLS-2$
+        }
+        response.getWriter().print(TEMPLATE);
+    }
+
+    private final ShellService getShellService()
+    {
+        return (ShellService) tracker.getService();
+    }
+
+}
diff --git a/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties b/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
new file mode 100644
index 0000000..b2c2e0f
--- /dev/null
+++ b/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
@@ -0,0 +1,33 @@
+﻿#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+# native2ascii -encoding utf-8 bundle_bg.raw_properties bundle_bg.properties
+
+# Shell plugin
+shell.pluginTitle=Конзола
+shell.clear=Изчистване
+shell.status=Използвайте командният ред за изпълнение на команди.
diff --git a/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties b/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
new file mode 100644
index 0000000..265adcc
--- /dev/null
+++ b/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
@@ -0,0 +1,33 @@
+#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Shell plugin
+shell.pluginTitle=Shell
+shell.clear=Löschen
+shell.status=Nutzen Sie das Eingabefeld um Shell Kommandos auszuführen.
diff --git a/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties b/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
new file mode 100644
index 0000000..88b47dc
--- /dev/null
+++ b/webconsole-plugins/shell/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
@@ -0,0 +1,33 @@
+﻿#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Shell plugin
+shell.pluginTitle=Консоль
+shell.clear=Очистить
+shell.status=Используйте строку ввода для выполнения команд в консоли.
diff --git a/webconsole-plugins/shell/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole-plugins/shell/src/main/resources/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 0000000..bf0b203
--- /dev/null
+++ b/webconsole-plugins/shell/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,33 @@
+#Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Web Console strings for reference all strings here are commented.
+# This file may be used to produce a translation of the strings
+#
+# Note that properties files are ISO-8859-1 encoded. To provide translations
+# for languages requiring different character encodings, you may use the
+# native2ascii Maven Plugin from http://mojo.codehaus.org/native2ascii-maven-plugin/
+# to translate the natively encoded files to ISO-8859-1 during bundle build
+#
+# Translations requiring non-ISO-8859-1 encoding are placed in the
+# src/main/native2ascii/OSGI-INF/l10n folder and are converted using said
+# plugin while building the bundle
+#
+
+# Shell plugin
+shell.pluginTitle=Shell
+shell.clear=Clear
+shell.status=Use the command prompt to execute shell commands.
diff --git a/webconsole/src/main/resources/res/ui/shell.css b/webconsole-plugins/shell/src/main/resources/res/plugin.css
similarity index 100%
rename from webconsole/src/main/resources/res/ui/shell.css
rename to webconsole-plugins/shell/src/main/resources/res/plugin.css
diff --git a/webconsole-plugins/shell/src/main/resources/res/plugin.html b/webconsole-plugins/shell/src/main/resources/res/plugin.html
new file mode 100644
index 0000000..c2b9b9b
--- /dev/null
+++ b/webconsole-plugins/shell/src/main/resources/res/plugin.html
@@ -0,0 +1,27 @@
+﻿<script type="text/javascript" src="${pluginRoot}/res/plugin.js"></script>
+<script type="text/javascript">
+// <![CDATA[
+var shellDisabled = ${shell.disabled};
+// ]]>
+</script>
+<p class="statline">${shell.status}</p>
+
+<form id="shell_form" method="post" action="${pluginRoot}">
+	<!-- top header -->
+	<div class="ui-widget-header ui-corner-top buttonGroup">
+		<input id="help" value="${help}" type="button" />
+		<input id="clear" value="${shell.clear}" type="button" />
+	</div>
+
+	<!-- the console window -->
+	<div id="consoleframe">
+		<div id="console">
+			<!-- HERE COMES CONSOLE CONTENTS -->
+		</div><!-- console -->
+	</div><!-- consoleframe -->
+
+	<!-- bottom header -->
+	<div class="ui-widget-header ui-corner-bottom buttonGroup" style="text-align: left">
+		&nbsp;-&gt; <input id="command" name="command" class="command" autocomplete="off" type="text" />
+	</div>
+</form>
diff --git a/webconsole/src/main/resources/res/ui/shell.js b/webconsole-plugins/shell/src/main/resources/res/plugin.js
similarity index 100%
rename from webconsole/src/main/resources/res/ui/shell.js
rename to webconsole-plugins/shell/src/main/resources/res/plugin.js
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
deleted file mode 100644
index 67ef652..0000000
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentConfigurationPrinter.java
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.webconsole.internal.compendium;
-
-
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.Dictionary;
-import java.util.Iterator;
-import java.util.TreeMap;
-import java.util.TreeSet;
-
-import org.apache.felix.scr.Component;
-import org.apache.felix.scr.Reference;
-import org.apache.felix.scr.ScrService;
-import org.apache.felix.webconsole.WebConsoleUtil;
-import org.apache.felix.webconsole.internal.AbstractConfigurationPrinter;
-import org.apache.felix.webconsole.internal.Util;
-import org.osgi.framework.Constants;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.component.ComponentConstants;
-
-
-/**
- * ComponentConfigurationPrinter prints the available SCR services. 
- */
-public class ComponentConfigurationPrinter extends AbstractConfigurationPrinter
-{
-
-    /**
-     * @see org.apache.felix.webconsole.ConfigurationPrinter#getTitle()
-     */
-    public String getTitle()
-    {
-        return "Declarative Services Components";
-    }
-
-
-    /**
-     * @see org.apache.felix.webconsole.ConfigurationPrinter#printConfiguration(java.io.PrintWriter)
-     */
-    public void printConfiguration( PrintWriter pw )
-    {
-        ServiceReference sr = getBundleContext().getServiceReference( "org.apache.felix.scr.ScrService" );
-        if ( sr == null )
-        {
-            pw.println( "  Apache Felix Declarative Service not installed" );
-        }
-        else
-        {
-            ScrService scrService = ( ScrService ) getBundleContext().getService( sr );
-            try
-            {
-                printComponents( pw, scrService.getComponents() );
-            }
-            finally
-            {
-                getBundleContext().ungetService( sr );
-            }
-        }
-    }
-
-
-    private static final void printComponents( final PrintWriter pw, final Component[] components )
-    {
-        if ( components == null || components.length == 0 )
-        {
-            pw.println( "  No Components Registered" );
-        }
-        else
-        {
-            // order components by id
-            TreeMap componentMap = new TreeMap();
-            for ( int i = 0; i < components.length; i++ )
-            {
-                Component component = components[i];
-                componentMap.put( new Long( component.getId() ), component );
-            }
-
-            // render components
-            for ( Iterator ci = componentMap.values().iterator(); ci.hasNext(); )
-            {
-                Component component = ( Component ) ci.next();
-                component( pw, component );
-            }
-        }
-    }
-
-
-    private static final void component( PrintWriter pw, Component component )
-    {
-
-        pw.print( component.getId() );
-        pw.print( "=[" );
-        pw.print( component.getName() );
-        pw.println( "]" );
-
-        pw.println( "  Bundle" + component.getBundle().getSymbolicName() + " (" + component.getBundle().getBundleId()
-            + ")" );
-        pw.println( "  State=" + toStateString( component.getState() ) );
-        pw.println( "  DefaultState=" + ( component.isDefaultEnabled() ? "enabled" : "disabled" ) );
-        pw.println( "  Activation=" + ( component.isImmediate() ? "immediate" : "delayed" ) );
-
-        listServices( pw, component );
-        listReferences( pw, component );
-        listProperties( pw, component );
-
-        pw.println();
-    }
-
-
-    private static void listServices( PrintWriter pw, Component component )
-    {
-        String[] services = component.getServices();
-        if ( services == null )
-        {
-            return;
-        }
-
-        pw.println( "  ServiceType=" + ( component.isServiceFactory() ? "service factory" : "service" ) );
-
-        StringBuffer buf = new StringBuffer();
-        for ( int i = 0; i < services.length; i++ )
-        {
-            if ( i > 0 )
-            {
-                buf.append( ", " );
-            }
-            buf.append( services[i] );
-        }
-
-        pw.println( "  Services=" + buf );
-    }
-
-
-    private static final void listReferences( PrintWriter pw, Component component )
-    {
-        Reference[] refs = component.getReferences();
-        if ( refs != null )
-        {
-            for ( int i = 0; i < refs.length; i++ )
-            {
-
-                pw.println( "  Reference=" + refs[i].getName() + ", "
-                    + ( refs[i].isSatisfied() ? "Satisfied" : "Unsatisfied" ) );
-
-                pw.println( "    Service Name: " + refs[i].getServiceName() );
-
-                if ( refs[i].getTarget() != null )
-                {
-                    pw.println( "  Target Filter: " + refs[i].getTarget() );
-                }
-
-                pw.println( "    Multiple: " + ( refs[i].isMultiple() ? "multiple" : "single" ) );
-                pw.println( "    Optional: " + ( refs[i].isOptional() ? "optional" : "mandatory" ) );
-                pw.println( "    Policy: " + ( refs[i].isStatic() ? "static" : "dynamic" ) );
-
-                // list bound services
-                ServiceReference[] boundRefs = refs[i].getServiceReferences();
-                if ( boundRefs != null && boundRefs.length > 0 )
-                {
-                    for ( int j = 0; j < boundRefs.length; j++ )
-                    {
-                        pw.print( "    Bound Service: ID " );
-                        pw.print( boundRefs[j].getProperty( Constants.SERVICE_ID ) );
-
-                        String name = ( String ) boundRefs[j].getProperty( ComponentConstants.COMPONENT_NAME );
-                        if ( name == null )
-                        {
-                            name = ( String ) boundRefs[j].getProperty( Constants.SERVICE_PID );
-                            if ( name == null )
-                            {
-                                name = ( String ) boundRefs[j].getProperty( Constants.SERVICE_DESCRIPTION );
-                            }
-                        }
-                        if ( name != null )
-                        {
-                            pw.print( " (" );
-                            pw.print( name );
-                            pw.print( ")" );
-                        }
-                        pw.println();
-                    }
-                }
-                else
-                {
-                    pw.println( "    No Services bound" );
-                }
-            }
-        }
-    }
-
-
-    private static final void listProperties( PrintWriter pw, Component component )
-    {
-        Dictionary props = component.getProperties();
-        if ( props != null )
-        {
-
-            pw.println( "  Properties=" );
-            TreeSet keys = new TreeSet( Util.list( props.keys() ) );
-            for ( Iterator ki = keys.iterator(); ki.hasNext(); )
-            {
-                String key = ( String ) ki.next();
-                Object value = props.get( key );
-                value = WebConsoleUtil.toString( value );
-                if ( value.getClass().isArray() )
-                {
-                    value = Arrays.asList( ( Object[] ) value );
-                }
-                pw.println( "    " + key + "=" + value );
-            }
-        }
-    }
-
-
-    static String toStateString( int state )
-    {
-        switch ( state )
-        {
-            case Component.STATE_DISABLED:
-                return "disabled";
-            case Component.STATE_ENABLED:
-                return "enabled";
-            case Component.STATE_UNSATISFIED:
-                return "unsatisfied";
-            case Component.STATE_ACTIVATING:
-                return "activating";
-            case Component.STATE_ACTIVE:
-                return "active";
-            case Component.STATE_REGISTERED:
-                return "registered";
-            case Component.STATE_FACTORY:
-                return "factory";
-            case Component.STATE_DEACTIVATING:
-                return "deactivating";
-            case Component.STATE_DESTROYED:
-                return "destroyed";
-            default:
-                return String.valueOf( state );
-        }
-    }
-}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java
deleted file mode 100644
index 08d743e..0000000
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ComponentsServlet.java
+++ /dev/null
@@ -1,632 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.felix.webconsole.internal.compendium;
-
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Dictionary;
-import java.util.Iterator;
-import java.util.TreeSet;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.felix.scr.Component;
-import org.apache.felix.scr.Reference;
-import org.apache.felix.scr.ScrService;
-import org.apache.felix.webconsole.DefaultVariableResolver;
-import org.apache.felix.webconsole.SimpleWebConsolePlugin;
-import org.apache.felix.webconsole.WebConsoleUtil;
-import org.apache.felix.webconsole.internal.OsgiManagerPlugin;
-import org.apache.felix.webconsole.internal.Util;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONWriter;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.Constants;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.component.ComponentConstants;
-import org.osgi.service.metatype.MetaTypeInformation;
-import org.osgi.service.metatype.MetaTypeService;
-
-
-/**
- * ComponentsServlet provides a plugin for managing Service Components Runtime.
- */
-public class ComponentsServlet extends SimpleWebConsolePlugin implements OsgiManagerPlugin
-{
-
-    private static final long serialVersionUID = 1L;
-
-    private static final String LABEL = "components";
-    private static final String TITLE = "%components.pluginTitle";
-    private static final String CSS[] = { "/res/ui/bundles.css" }; // yes, it's correct!
-
-    // actions
-    private static final String OPERATION = "action";
-    private static final String OPERATION_ENABLE = "enable";
-    private static final String OPERATION_DISABLE = "disable";
-    //private static final String OPERATION_CONFIGURE = "configure";
-
-    // needed services
-    private static final String SCR_SERVICE = "org.apache.felix.scr.ScrService";
-    private static final String META_TYPE_NAME = "org.osgi.service.metatype.MetaTypeService";
-    private static final String CONFIGURATION_ADMIN_NAME = "org.osgi.service.cm.ConfigurationAdmin";
-
-    // templates
-    private final String TEMPLATE;
-
-    /** Default constructor */
-    public ComponentsServlet()
-    {
-        super(LABEL, TITLE, CSS);
-
-        // load templates
-        TEMPLATE = readTemplateFile( "/templates/components.html" );
-    }
-
-
-
-    /**
-     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void doPost( HttpServletRequest request, HttpServletResponse response ) throws IOException
-    {
-        final RequestInfo reqInfo = new RequestInfo(request);
-        if ( reqInfo.component == null && reqInfo.componentRequested ) {
-            response.sendError(404);
-            return;
-        }
-        if ( !reqInfo.componentRequested ) {
-            response.sendError(500);
-            return;
-        }
-        String op = request.getParameter( OPERATION );
-        if ( OPERATION_ENABLE.equals( op ) )
-        {
-            reqInfo.component.enable();
-        }
-        else if ( OPERATION_DISABLE.equals( op ) )
-        {
-            reqInfo.component.disable();
-        }
-
-        final PrintWriter pw = response.getWriter();
-        response.setContentType( "application/json" );
-        response.setCharacterEncoding( "UTF-8" );
-        renderResult( pw, null);
-    }
-
-
-    /**
-     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException,
-    IOException {
-        final RequestInfo reqInfo = new RequestInfo(request);
-        if ( reqInfo.component == null && reqInfo.componentRequested ) {
-            response.sendError(404);
-            return;
-        }
-        if ( reqInfo.extension.equals("json")  )
-        {
-            response.setContentType( "application/json" );
-            response.setCharacterEncoding( "UTF-8" );
-
-            this.renderResult(response.getWriter(), reqInfo.component);
-
-            // nothing more to do
-            return;
-        }
-        super.doGet( request, response );
-    }
-
-    /**
-     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void renderContent( HttpServletRequest request, HttpServletResponse response ) throws IOException
-    {
-        // get request info from request attribute
-        final RequestInfo reqInfo = getRequestInfo(request);
-
-        StringWriter w = new StringWriter();
-        PrintWriter w2 = new PrintWriter(w);
-        renderResult( w2, reqInfo.component );
-
-        // prepare variables
-        DefaultVariableResolver vars = ( ( DefaultVariableResolver ) WebConsoleUtil.getVariableResolver( request ) );
-        vars.put( "__drawDetails__", reqInfo.componentRequested ? Boolean.TRUE : Boolean.FALSE );
-        vars.put( "__data__", w.toString() );
-
-        response.getWriter().print( TEMPLATE );
-
-    }
-
-
-    private void renderResult( final PrintWriter pw,
-                               final Component component) throws IOException
-    {
-        final JSONWriter jw = new JSONWriter( pw );
-        try
-        {
-            jw.object();
-
-            final ScrService scrService = getScrService();
-            if ( scrService == null )
-            {
-                jw.key( "status" );
-                jw.value( -1 );
-            }
-            else
-            {
-                final Component[] components = scrService.getComponents();
-
-                if ( components == null || components.length == 0 )
-                {
-                    jw.key( "status" );
-                    jw.value( 0 );
-                }
-                else
-                {
-                    // order components by name
-                    sortComponents( components );
-
-                    final StringBuffer buffer = new StringBuffer();
-                    buffer.append( components.length );
-                    buffer.append( " component" );
-                    if ( components.length != 1 )
-                    {
-                        buffer.append( 's' );
-                    }
-                    buffer.append( " installed." );
-                    jw.key( "status" );
-                    jw.value( components.length );
-
-                    // render components
-                    jw.key( "data" );
-                    jw.array();
-                    if ( component != null )
-                    {
-                        component( jw, component, true );
-                    }
-                    else
-                    {
-                        for ( int i = 0; i < components.length; i++ )
-                        {
-                            component( jw, components[i], false );
-                        }
-                    }
-                    jw.endArray();
-                }
-            }
-
-            jw.endObject();
-        }
-        catch ( JSONException je )
-        {
-            throw new IOException( je.toString() );
-        }
-    }
-
-
-    private void sortComponents( Component[] components )
-    {
-        Arrays.sort( components, new Comparator()
-        {
-            public int compare( Object o0, Object o1 )
-            {
-                final Component c0 = ( Component ) o0;
-                final Component c1 = ( Component ) o1;
-                final int nameCmp = c0.getName().compareTo( c1.getName() );
-                if ( nameCmp != 0 )
-                {
-                    return nameCmp;
-                }
-                return ( c0.getId() < c1.getId() ) ? -1 : ( ( c0.getId() > c1.getId() ) ? 1 : 0 );
-            }
-        } );
-    }
-
-
-    private void component( JSONWriter jw, Component component, boolean details ) throws JSONException
-    {
-        String id = String.valueOf( component.getId() );
-        String name = component.getName();
-        int state = component.getState();
-
-        jw.object();
-
-        // component information
-        jw.key( "id" );
-        jw.value( id );
-        jw.key( "name" );
-        jw.value( name );
-        jw.key( "state" );
-        jw.value( ComponentConfigurationPrinter.toStateString( state ) );
-        jw.key( "stateRaw" );
-        jw.value( state );
-
-        final Dictionary props = component.getProperties();
-
-        final String pid = (String) (props != null ?  props.get( Constants.SERVICE_PID ) : null);
-        if ( pid != null )
-        {
-            jw.key("pid");
-            jw.value(pid);
-            if ( isConfigurable( component.getBundle(), pid ) )
-            {
-                jw.key("configurable");
-                jw.value(pid);
-            }
-        }
-
-        // component details
-        if ( details )
-        {
-            gatherComponentDetails( jw, component );
-        }
-
-        jw.endObject();
-    }
-
-
-    private void gatherComponentDetails( JSONWriter jw, Component component ) throws JSONException
-    {
-        jw.key( "props" );
-        jw.array();
-
-        keyVal( jw, "Bundle", component.getBundle().getSymbolicName() + " (" + component.getBundle().getBundleId()
-            + ")" );
-        keyVal( jw, "Implementation Class", component.getClassName() );
-        if (component.getFactory() != null) {
-            keyVal( jw, "Component Factory Name", component.getFactory() );
-        }
-        keyVal( jw, "Default State", component.isDefaultEnabled() ? "enabled" : "disabled" );
-        keyVal( jw, "Activation", component.isImmediate() ? "immediate" : "delayed" );
-
-        try {
-            keyVal( jw, "Configuration Policy", component.getConfigurationPolicy() );
-        } catch (Throwable t) {
-            // missing implementation of said method in the actually bound API
-            // ignore this and just don't display the information
-        }
-
-        listServices( jw, component );
-        listReferences( jw, component );
-        listProperties( jw, component );
-
-        jw.endArray();
-    }
-
-
-    private void listServices( JSONWriter jw, Component component )
-    {
-        String[] services = component.getServices();
-        if ( services == null )
-        {
-            return;
-        }
-
-        keyVal( jw, "Service Type", component.isServiceFactory() ? "service factory" : "service" );
-
-        JSONArray buf = new JSONArray();
-        for ( int i = 0; i < services.length; i++ )
-        {
-            buf.put( services[i] );
-        }
-
-        keyVal( jw, "Services", buf );
-    }
-
-
-    private void listReferences( JSONWriter jw, Component component )
-    {
-        Reference[] refs = component.getReferences();
-        if ( refs != null )
-        {
-            for ( int i = 0; i < refs.length; i++ )
-            {
-                JSONArray buf = new JSONArray();
-                buf.put( refs[i].isSatisfied() ? "Satisfied" : "Unsatisfied" );
-                buf.put( "Service Name: " + refs[i].getServiceName());
-                if ( refs[i].getTarget() != null )
-                {
-                    buf.put( "Target Filter: " + refs[i].getTarget() );
-                }
-                buf.put( "Multiple: " + (refs[i].isMultiple() ? "multiple" : "single" ));
-                buf.put( "Optional: " + (refs[i].isOptional() ? "optional" : "mandatory" ));
-                buf.put( "Policy: " + (refs[i].isStatic() ? "static" : "dynamic" ));
-
-                // list bound services
-                ServiceReference[] boundRefs = refs[i].getServiceReferences();
-                if ( boundRefs != null && boundRefs.length > 0 )
-                {
-                    for ( int j = 0; j < boundRefs.length; j++ )
-                    {
-                        final StringBuffer b = new StringBuffer();
-                        b.append( "Bound Service ID " );
-                        b.append( boundRefs[j].getProperty( Constants.SERVICE_ID ) );
-
-                        String name = ( String ) boundRefs[j].getProperty( ComponentConstants.COMPONENT_NAME );
-                        if ( name == null )
-                        {
-                            name = ( String ) boundRefs[j].getProperty( Constants.SERVICE_PID );
-                            if ( name == null )
-                            {
-                                name = ( String ) boundRefs[j].getProperty( Constants.SERVICE_DESCRIPTION );
-                            }
-                        }
-                        if ( name != null )
-                        {
-                            b.append( " (" );
-                            b.append( name );
-                            b.append( ")" );
-                        }
-                        buf.put(b.toString());
-                    }
-                }
-                else
-                {
-                    buf.put( "No Services bound" );
-                }
-
-                keyVal( jw, "Reference " + refs[i].getName(), buf.toString() );
-            }
-        }
-    }
-
-
-    private void listProperties( JSONWriter jw, Component component )
-    {
-        Dictionary props = component.getProperties();
-        if ( props != null )
-        {
-            JSONArray buf = new JSONArray();
-            TreeSet keys = new TreeSet( Util.list( props.keys() ) );
-            for ( Iterator ki = keys.iterator(); ki.hasNext(); )
-            {
-                final String key = ( String ) ki.next();
-                final StringBuffer b = new StringBuffer();
-                b.append( key ).append( " = " );
-
-                Object prop = props.get( key );
-                prop = WebConsoleUtil.toString( prop );
-                b.append( prop );
-                buf.put(b.toString());
-            }
-
-            keyVal( jw, "Properties", buf );
-        }
-
-    }
-
-
-    private void keyVal( JSONWriter jw, String key, Object value )
-    {
-        try
-        {
-            WebConsoleUtil.keyVal( jw, key, value );
-        }
-        catch ( JSONException je )
-        {
-            // don't care
-        }
-    }
-
-
-    /**
-     * Check if the component with the specified pid is
-     * configurable
-     * @param providingBundle The Bundle providing the component. This may be
-     *      theoretically be <code>null</code>.
-     * @param pid A non null pid
-     * @return <code>true</code> if the component is configurable.
-     */
-    private boolean isConfigurable( final Bundle providingBundle, final String pid )
-    {
-        // we first check if the config admin has something for this pid
-        final ConfigurationAdmin ca = this.getConfigurationAdmin();
-        if ( ca != null )
-        {
-            try
-            {
-                // we use listConfigurations to not create configuration
-                // objects persistently without the user providing actual
-                // configuration
-                String filter = "(" + Constants.SERVICE_PID + "=" + pid + ")";
-                Configuration[] configs = ca.listConfigurations( filter );
-                if ( configs != null && configs.length > 0 )
-                {
-                    return true;
-                }
-            }
-            catch ( InvalidSyntaxException ise )
-            {
-                // should print message
-            }
-            catch ( IOException ioe )
-            {
-                // should print message
-            }
-        }
-        // second check is using the meta type service
-        if ( providingBundle != null )
-        {
-            final MetaTypeService mts = this.getMetaTypeService();
-            if ( mts != null )
-            {
-                final MetaTypeInformation mti = mts.getMetaTypeInformation( providingBundle );
-                if ( mti != null )
-                {
-                    return mti.getObjectClassDefinition( pid, null ) != null;
-                }
-            }
-        }
-        return false;
-    }
-
-    private final ConfigurationAdmin getConfigurationAdmin()
-    {
-        return ( ConfigurationAdmin ) getService( CONFIGURATION_ADMIN_NAME );
-    }
-
-    final ScrService getScrService()
-    {
-        return ( ScrService ) getService( SCR_SERVICE );
-    }
-
-    private final MetaTypeService getMetaTypeService()
-    {
-        return ( MetaTypeService ) getService( META_TYPE_NAME );
-    }
-
-    private final class RequestInfo
-    {
-        public final String extension;
-        public final Component component;
-        public final boolean componentRequested;
-
-
-        protected RequestInfo( final HttpServletRequest request )
-        {
-            String info = request.getPathInfo();
-            // remove label and starting slash
-            info = info.substring( getLabel().length() + 1 );
-
-            // get extension
-            if ( info.endsWith( ".json" ) )
-            {
-                extension = "json";
-                info = info.substring( 0, info.length() - 5 );
-            }
-            else
-            {
-                extension = "html";
-            }
-
-            if ( info.length() > 0 && info.startsWith( "/" ) )
-            {
-                this.componentRequested = true;
-                info = info.substring( 1 );
-                Component component = getComponentId( info );
-                if ( component == null )
-                {
-                    component = getComponentByName( info );
-                }
-                this.component = component;
-            }
-            else
-            {
-                this.componentRequested = false;
-                this.component = null;
-            }
-
-            request.setAttribute( ComponentsServlet.this.getClass().getName(), this );
-        }
-
-
-        protected Component getComponentId( final String componentIdPar )
-        {
-            final ScrService scrService = getScrService();
-            if ( scrService != null )
-            {
-                try
-                {
-                    final long componentId = Long.parseLong( componentIdPar );
-                    return scrService.getComponent( componentId );
-                }
-                catch ( NumberFormatException nfe )
-                {
-                    // don't care
-                }
-            }
-
-            return null;
-        }
-
-
-        protected Component getComponentByName( final String names )
-        {
-            if ( names.length() > 0 )
-            {
-                final ScrService scrService = getScrService();
-                if ( scrService != null )
-                {
-
-                    final int slash = names.lastIndexOf( '/' );
-                    final String componentName;
-                    final String pid;
-                    if ( slash > 0 )
-                    {
-                        componentName = names.substring( 0, slash );
-                        pid = names.substring( slash + 1 );
-                    }
-                    else
-                    {
-                        componentName = names;
-                        pid = null;
-                    }
-
-                    Component[] components;
-                    try
-                    {
-                        components = scrService.getComponents( componentName );
-                    }
-                    catch ( Throwable t )
-                    {
-                        // not implemented in the used API versio
-                        components = null;
-                    }
-
-                    if ( components != null )
-                    {
-                        if ( pid != null )
-                        {
-                            for ( int i = 0; i < components.length; i++ )
-                            {
-                                Component component = components[i];
-                                if ( pid.equals( component.getProperties().get( Constants.SERVICE_PID ) ) )
-                                {
-                                    return component;
-                                }
-                            }
-                        }
-                        else if ( components.length > 0 )
-                        {
-                            return components[0];
-                        }
-                    }
-                }
-            }
-
-            return null;
-        }
-    }
-
-    static RequestInfo getRequestInfo(final HttpServletRequest request)
-    {
-        return (RequestInfo)request.getAttribute(ComponentsServlet.class.getName());
-    }
-}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
deleted file mode 100644
index bea5087..0000000
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
+++ /dev/null
@@ -1,248 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.felix.webconsole.internal.deppack;
-
-
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Map;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.commons.fileupload.FileItem;
-import org.apache.felix.webconsole.AbstractWebConsolePlugin;
-import org.apache.felix.webconsole.DefaultVariableResolver;
-import org.apache.felix.webconsole.SimpleWebConsolePlugin;
-import org.apache.felix.webconsole.WebConsoleUtil;
-import org.apache.felix.webconsole.internal.OsgiManagerPlugin;
-import org.apache.felix.webconsole.internal.Util;
-import org.json.JSONException;
-import org.json.JSONWriter;
-import org.osgi.service.deploymentadmin.DeploymentAdmin;
-import org.osgi.service.deploymentadmin.DeploymentPackage;
-
-
-/**
- * DepPackServlet provides a plugin for managing deployment admin packages.
- */
-public class DepPackServlet extends SimpleWebConsolePlugin implements OsgiManagerPlugin
-{
-
-    private static final String LABEL = "deppack";
-    private static final String TITLE = "%deppack.pluginTitle";
-    private static final String CSS[] = { "/res/ui/deployment.css" };
-
-    //
-    private static final String ACTION_DEPLOY = "deploydp";
-    private static final String ACTION_UNINSTALL = "uninstalldp";
-    private static final String PARAMETER_PCK_FILE = "pckfile";
-
-    private static final String DEPL_SERVICE = "org.osgi.service.deploymentadmin.DeploymentAdmin";
-
-    // templates
-    private final String TEMPLATE;
-
-    /** Default constructor */
-    public DepPackServlet()
-    {
-        super(LABEL, TITLE, CSS);
-
-        // load templates
-        TEMPLATE = readTemplateFile( "/templates/deployment.html" );
-    }
-
-
-    /**
-     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void doPost( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException
-    {
-        // get the uploaded data
-        final String action = WebConsoleUtil.getParameter( req, Util.PARAM_ACTION );
-        if ( ACTION_DEPLOY.equals( action ) )
-        {
-            Map params = ( Map ) req.getAttribute( AbstractWebConsolePlugin.ATTR_FILEUPLOAD );
-            if ( params != null )
-            {
-                final FileItem pck = getFileItem( params, PARAMETER_PCK_FILE, false );
-                final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DEPL_SERVICE );
-                if ( admin != null )
-                {
-                    try
-                    {
-                        admin.installDeploymentPackage( pck.getInputStream() );
-
-                        final String uri = req.getRequestURI();
-                        resp.sendRedirect( uri );
-                        return;
-                    }
-                    catch ( /*Deployment*/ Exception e )
-                    {
-                        throw new ServletException( "Unable to deploy package.", e );
-                    }
-                }
-            }
-            throw new ServletException( "Upload file or deployment admin missing." );
-        }
-        else if ( ACTION_UNINSTALL.equals( action ) )
-        {
-            final String pckId = req.getPathInfo().substring( req.getPathInfo().lastIndexOf( '/' ) + 1 );
-            if ( pckId != null && pckId.length() > 0 )
-            {
-                final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DEPL_SERVICE );
-                if ( admin != null )
-                {
-                    try
-                    {
-                        final DeploymentPackage pck = admin.getDeploymentPackage( pckId );
-                        if ( pck != null )
-                        {
-                            pck.uninstall();
-                        }
-                    }
-                    catch ( /*Deployment*/ Exception e )
-                    {
-                        throw new ServletException( "Unable to undeploy package.", e );
-                    }
-                }
-
-            }
-
-            final PrintWriter pw = resp.getWriter();
-            pw.println( "{ \"reload\":true }" );
-            return;
-        }
-        throw new ServletException( "Unknown action: " + action );
-    }
-
-
-    private static final FileItem getFileItem( Map params, String name, boolean isFormField )
-    {
-        FileItem[] items = ( FileItem[] ) params.get( name );
-        if ( items != null )
-        {
-            for ( int i = 0; i < items.length; i++ )
-            {
-                if ( items[i].isFormField() == isFormField )
-                {
-                    return items[i];
-                }
-            }
-        }
-
-        // nothing found, fail
-        return null;
-    }
-
-
-    /**
-     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void renderContent( HttpServletRequest request, HttpServletResponse response ) throws ServletException,
-        IOException
-    {
-
-        final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DEPL_SERVICE );
-
-        StringWriter w = new StringWriter();
-        PrintWriter w2 = new PrintWriter(w);
-        JSONWriter jw = new JSONWriter( w2 );
-        try
-        {
-            jw.object();
-            if ( null == admin )
-            {
-                jw.key( "error" );
-                jw.value( true );
-            }
-            else
-            {
-                final DeploymentPackage[] packages = admin.listDeploymentPackages();
-                jw.key( "data" );
-
-                jw.array();
-                for ( int i = 0; i < packages.length; i++ )
-                {
-                    packageInfoJson( jw, packages[i] );
-                }
-                jw.endArray();
-
-            }
-            jw.endObject();
-
-        }
-        catch ( JSONException je )
-        {
-            throw new IOException( je.toString() );
-        }
-
-        // prepare variables
-        DefaultVariableResolver vars = ( ( DefaultVariableResolver ) WebConsoleUtil.getVariableResolver( request ) );
-        vars.put( "__data__", w.toString() );
-
-        response.getWriter().print(TEMPLATE);
-    }
-
-
-    private static final void packageInfoJson( JSONWriter jw, DeploymentPackage pack ) throws JSONException
-    {
-        jw.object();
-        jw.key( "id" );
-        jw.value( pack.getName() );
-        jw.key( "name" );
-        jw.value( pack.getName() );
-        jw.key( "state" );
-        jw.value( pack.getVersion() );
-
-        jw.key( "actions" );
-        jw.array();
-
-        jw.object();
-        jw.key( "enabled" );
-        jw.value( true );
-        jw.key( "name" );
-        jw.value( "Uninstall" );
-        jw.key( "link" );
-        jw.value( ACTION_UNINSTALL );
-        jw.endObject();
-
-        jw.endArray();
-
-        jw.key( "props" );
-        jw.array();
-        WebConsoleUtil.keyVal( jw, "Package Name", pack.getName() );
-        WebConsoleUtil.keyVal( jw, "Version", pack.getVersion() );
-
-        final StringBuffer buffer = new StringBuffer();
-        for ( int i = 0; i < pack.getBundleInfos().length; i++ )
-        {
-            buffer.append( pack.getBundleInfos()[i].getSymbolicName() );
-            buffer.append( " - " );
-            buffer.append( pack.getBundleInfos()[i].getVersion() );
-            buffer.append( "<br/>" );
-        }
-        WebConsoleUtil.keyVal( jw, "Bundles", buffer.toString() );
-
-        jw.endArray();
-
-        jw.endObject();
-    }
-
-}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java
deleted file mode 100644
index 4628b29..0000000
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.webconsole.internal.misc;
-
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.apache.felix.shell.ShellService;
-import org.apache.felix.webconsole.DefaultVariableResolver;
-import org.apache.felix.webconsole.SimpleWebConsolePlugin;
-import org.apache.felix.webconsole.WebConsoleUtil;
-import org.apache.felix.webconsole.internal.OsgiManagerPlugin;
-
-
-/**
- * ShellServlet provides a Web bases interface to the Apache shell service, allowing
- * the user to execute shell commands from the browser.
- */
-public class ShellServlet extends SimpleWebConsolePlugin implements OsgiManagerPlugin
-{
-
-    private static final String LABEL = "shell";
-    private static final String TITLE = "%shell.pluginTitle";
-    private static final String[] CSS = { "/res/ui/shell.css" };
-
-    // templates
-    private final String TEMPLATE;
-
-    /** Default constructor */
-    public ShellServlet()
-    {
-        super(LABEL, TITLE, CSS);
-
-        // load templates
-        TEMPLATE = readTemplateFile( "/templates/shell.html" );
-    }
-
-
-    /**
-     * @see javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void doPost( HttpServletRequest request, HttpServletResponse response ) throws ServletException,
-        IOException
-    {
-        response.setCharacterEncoding( "utf-8" );
-        response.setContentType( "text/html" );
-
-        PrintWriter pw = response.getWriter();
-
-        try
-        {
-            String command = request.getParameter( "command" );
-            if ( command != null )
-            {
-                command = WebConsoleUtil.urlDecode( command );
-            }
-
-            pw.print( "<span class=\"consolecommand\">-&gt; " );
-            pw.print( command == null ? "" : WebConsoleUtil.escapeHtml( command ) );
-            pw.println( "</span><br />" );
-
-            if ( command != null && command.length() > 0 )
-            {
-                ShellService shellService = getShellService();
-                if ( shellService != null )
-                {
-                    ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
-                    ByteArrayOutputStream baosErr = new ByteArrayOutputStream();
-
-                    shellService.executeCommand( command, new PrintStream( baosOut, true ), new PrintStream( baosErr,
-                        true ) );
-                    if ( baosOut.size() > 0 )
-                    {
-                        pw.print( WebConsoleUtil.escapeHtml( new String( baosOut.toByteArray() ) ) );
-                    }
-                    if ( baosErr.size() > 0 )
-                    {
-                        pw.print( "<span class=\"error\">" );
-                        pw.print( WebConsoleUtil.escapeHtml( new String( baosErr.toByteArray() ) ) );
-                        pw.println( "</span>" );
-                    }
-                }
-                else
-                {
-                    pw.print( "<span class=\"error\">" );
-                    pw.print( "Error: No shell service available<br />" );
-                    pw.println( "</span>" );
-                }
-            }
-        }
-        catch ( Throwable t )
-        {
-            pw.print( "<span class=\"error\">" );
-            StringWriter out = new StringWriter();
-            t.printStackTrace( new PrintWriter( out, true ) );
-            pw.print( WebConsoleUtil.escapeHtml( out.toString() ) );
-            pw.println( "</span>" );
-        }
-    }
-
-    /**
-     * @see org.apache.felix.webconsole.AbstractWebConsolePlugin#renderContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
-     */
-    protected void renderContent( HttpServletRequest request, HttpServletResponse response ) throws IOException
-    {
-        DefaultVariableResolver vr = ( DefaultVariableResolver ) WebConsoleUtil.getVariableResolver( request );
-        if ( getShellService() == null )
-        {
-            vr.put( "shell.status", "Shell Service not available" );
-            vr.put( "shell.disabled", "true" );
-        } else {
-            vr.put( "shell.disabled", "false" );
-        }
-        response.getWriter().print(TEMPLATE);
-    }
-
-
-    private final ShellService getShellService()
-    {
-        try {
-            return ((ShellService) getService(ShellService.class.getName()));
-        } catch (NoClassDefFoundError ncdfe) {
-            // shell service class not available
-        }
-        return null;
-    }
-
-}
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
index 119502f..62cc6e7 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
@@ -121,7 +121,6 @@
     static final String DEFAULT_MANAGER_ROOT = "/system/console"; //$NON-NLS-1$
 
     static final String[] PLUGIN_CLASSES = {
-            "org.apache.felix.webconsole.internal.compendium.ComponentConfigurationPrinter", //$NON-NLS-1$
             "org.apache.felix.webconsole.internal.compendium.ConfigurationAdminConfigurationPrinter", //$NON-NLS-1$
             "org.apache.felix.webconsole.internal.compendium.PreferencesConfigurationPrinter", //$NON-NLS-1$
             "org.apache.felix.webconsole.internal.compendium.WireAdminConfigurationPrinter", //$NON-NLS-1$
@@ -132,15 +131,11 @@
             "org.apache.felix.webconsole.internal.misc.ThreadPrinter", }; //$NON-NLS-1$
 
     static final String[] PLUGIN_MAP = {
-            "org.apache.felix.webconsole.internal.compendium.ComponentsServlet", "components", //$NON-NLS-1$ //$NON-NLS-2$
             "org.apache.felix.webconsole.internal.compendium.ConfigManager", "configMgr", //$NON-NLS-1$ //$NON-NLS-2$
             "org.apache.felix.webconsole.internal.compendium.LogServlet", "logs", //$NON-NLS-1$ //$NON-NLS-2$
             "org.apache.felix.webconsole.internal.core.BundlesServlet", "bundles", //$NON-NLS-1$ //$NON-NLS-2$
             "org.apache.felix.webconsole.internal.core.ServicesServlet", "services", //$NON-NLS-1$ //$NON-NLS-2$
-            "org.apache.felix.webconsole.internal.deppack.DepPackServlet", "deppack", //$NON-NLS-1$ //$NON-NLS-2$
             "org.apache.felix.webconsole.internal.misc.LicenseServlet", "licenses", //$NON-NLS-1$ //$NON-NLS-2$
-            "org.apache.felix.webconsole.internal.misc.ShellServlet", "shell", //$NON-NLS-1$ //$NON-NLS-2$
-            "org.apache.felix.webconsole.internal.obr.BundleRepositoryRender", "obr", //$NON-NLS-1$ //$NON-NLS-2$
             "org.apache.felix.webconsole.internal.system.VMStatPlugin", "vmstat", //$NON-NLS-1$ //$NON-NLS-2$
     };
 
diff --git a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
index 8051b74..240412a 100644
--- a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
+++ b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_bg.properties
@@ -94,23 +94,6 @@
 log.level.info=ИНФО
 log.level.debug=ДЕТАЙЛИ
 
-# Deployment Admin plugin
-deppack.pluginTitle=Управление на пакети
-deployment.status.no_data=Няма инсталирани пакети!
-deployment.status.no_service=Услугата Deployment Admin не е налична в момента!
-deployment.status.ok=Deployment Admin е наличен и по-долу е показан списъка с пакет
-deployment.details=Детайли
-deployment.actions=Действия
-deployment.install_update=Инсталиране/обновяване
-deployment.package.name=Име на пакет
-deployment.bundles=Бъндъли
-deployment.uninstall=Премахване
-
-# Shell plugin
-shell.pluginTitle=Конзола
-shell.clear=Изчистване
-shell.status=Използвайте командният ред за изпълнение на команди.
-
 # Bundles plugin
 bundles.pluginTitle=Бъндъли
 bundles.statline=Информация за бъндълите: {0} бъндъли общо, {1} активни, {2} активни фрагменти, {3} resolved, {4} инсталирани.
@@ -164,28 +147,6 @@
 bundles.error.title=Грешка при изпълнение на операцията!
 
 
-# Components plugin
-components.pluginTitle=Компоненти
-scr.status.no_service=Declarative Service не е наличен!
-scr.status.no_components=Няма инсталирани компонент в момента!
-scr.status.ok=Брой инсталирани компоненти: {0}
-scr.action.enable=Enable
-scr.action.disable=Disable
-scr.action.configure=Конфигуриране
-scr.prop.bundle=Бъндъл
-scr.prop.defstate=Статус по подразбиране
-scr.prop.activation=Активация
-scr.prop.properties=Конфигурации
-scr.prop.class=Implementation Class
-scr.prop.componentfactory=Component Factory име
-scr.prop.configurationpolicy=Конфигурационна политика
-scr.serv.type=Тип на услугата
-scr.serv=Услуги
-scr.title.actions=Действия
-scr.title.status=Статус
-scr.title.name=Име
-
-
 # Configuration plugin
 configMgr.pluginTitle=Конфигурации
 config.status.ok=Configuration Admin Service е достъпен.
@@ -219,27 +180,6 @@
 license.resources=Ресурси на бъндъла: 
 license.resources.embedded=Вградени ресурси от {0}: 
 
-# OBR Plugin
-obr.pluginTitle=OSGi Хранилище
-obr.status.ok=Apache Bundle Repository услъгата е достъпна.
-obr.status.no=Нуждаете се от Apache Bundle Repository услугата за да се възползвате от тази функционалност!
-obr.version.select=Изберете версия...
-obr.repo.title=Бъндъл хранилище
-obr.action.add=Добавяне
-obr.action.search=Търсене
-obr.action.search.description=Въведе част от презентацията на бъндъла (име, описание, версия ...), \
- или валиден OSGi филтър
-obr.action.deploy=Инсталиране на избраните
-obr.action.deploystart=Инсталиране и стартиране на избраните
-obr.repo.name=Име
-obr.repo.url=Адрес
-obr.repo.lastModified=Последна промяна
-obr.repo.actions=Действия
-obr.res.title=Достъпни ресурси
-obr.res.name=Име на ресурса
-obr.res.installedVer=Инсталирана версия
-obr.error=Грешка при филтриране на ресурсите
-
 # Configuration Status plugin
 configStatus.pluginTitle=Конфиг. статус
 configStatus.wait=Моля изчакайте...
diff --git a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
index 019daff..383fa7a 100644
--- a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
+++ b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_de.properties
@@ -93,23 +93,6 @@
 log.level.info=Informationen
 log.level.debug=Debug
 
-# Deployment Admin plugin
-deppack.pluginTitle=Deployment Packages
-deployment.status.no_data=Kein Deployment Package ist installiert!
-deployment.status.no_service=Deployment Admin Dienst ist nicht instaliert/aktiv!
-deployment.status.ok=Deployment Admin Dienst ist aktiv
-deployment.details=Details
-deployment.actions=Aktionen
-deployment.install_update=Installieren oder Aktualisieren
-deployment.package.name=Package Name
-deployment.bundles=Bundles
-deployment.uninstall=Deinstallieren
-
-# Shell plugin
-shell.pluginTitle=Shell
-shell.clear=Löschen
-shell.status=Nutzen Sie das Eingabefeld um Shell Kommandos auszuführen.
-
 # Bundles plugin
 bundles.pluginTitle=Bundles
 bundles.statline=Bundle information: {0} Bundles total, {1} aktive Bundles, {2} aktive Fragmente, {3} aufgelöste Bundles, {4} installierte Bundles.
@@ -162,27 +145,6 @@
 # action error
 bundles.error.title=Ein Fehler ist aufgetreten während der Ausführung der Bundle Operation!
 
-# Components plugin
-components.pluginTitle=Komponenten
-scr.status.no_service=Declarative Service ist Voraussetzung für diese Funktionalität!
-scr.status.no_components=Zur Zeit sind keine Komponenten installiert!
-scr.status.ok=Anzahl installierter Komponenten: {0}
-scr.action.enable=Aktivieren
-scr.action.disable=Deaktivieren
-scr.action.configure=Konfigurieren
-scr.prop.bundle=Bundle
-scr.prop.defstate=Default Status
-scr.prop.activation=Aktivierung
-scr.prop.properties=Eigenschaften
-scr.prop.class=Implementationsklasse
-scr.prop.componentfactory=Komponenten Factory Name
-scr.prop.configurationpolicy=Konfigurations Policy
-scr.serv.type=Dienst Typ
-scr.serv=Dienste
-scr.title.actions=Aktionen
-scr.title.status=Status
-scr.title.name=Name
-
 
 # Configuration plugin
 configMgr.pluginTitle=Konfiguration
@@ -216,28 +178,6 @@
 license.resources=Bundle Resourcen: 
 license.resources.embedded=Eingebettet {0}: 
 
-# OBR Plugin
-obr.pluginTitle=OSGi Repository
-obr.status.ok=Der Apache Bundle Repository Service ist aktiv und bereit.
-obr.status.no=Der Apache Bundle Repository Service ist nicht aktiv!
-obr.version.select=Wähle Version...
-obr.repo.title=Bundle Repositories
-obr.action.add=Hinzufügen
-obr.action.search=Suchen
-obr.action.search.description=Geben Sie einen Teil des Präsentations- oder \
- symoblischen Namens der gesuchten Bundles oder einen gültigen OSGi \
- Filter Ausdruck
-obr.action.deploy=Ausgewählte Installieren
-obr.action.deploystart=Ausgewählte Installieren und Starten
-obr.repo.name=Name
-obr.repo.url=URL
-obr.repo.lastModified=Letzte Änderung
-obr.repo.actions=Aktionen
-obr.res.title=Verfügbare Resourcen
-obr.res.name=Resource Name
-obr.res.installedVer=Installierte Version
-obr.error=Fehler bei der Auswahl der Resourcen
-
 # Configuration Status plugin
 configStatus.pluginTitle=Configuration Status
 configStatus.wait=Bitte warten...
diff --git a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
index b2aac83..3650e6e 100644
--- a/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
+++ b/webconsole/src/main/native2ascii/OSGI-INF/l10n/bundle_ru.properties
@@ -62,23 +62,6 @@
 log.level.info=ИНФО
 log.level.debug=ОТЛАДКА
 
-# Deployment Admin plugin
-deppack.pluginTitle=Управление пакетами
-deployment.status.no_data=Нет установочных пакетов!
-deployment.status.no_service=Сервис Deployment Admin не установлен или не запущен.
-deployment.status.ok=Сервис Deployment Admin работает
-deployment.details=Подробно
-deployment.actions=Действия
-deployment.install_update=Установить/обновить
-deployment.package.name=Имя пакета
-deployment.bundles=Модули
-deployment.uninstall=Удалить
-
-# Shell plugin
-shell.pluginTitle=Консоль
-shell.clear=Очистить
-shell.status=Используйте строку ввода для выполнения команд в консоли.
-
 # Bundles plugin
 bundles.pluginTitle=Модули
 bundles.statline=Информация о модулях: модулей всего {0}, активных {1}, активных фрагментов {2}, разрешенных {3}, установленных {4}.
@@ -132,28 +115,6 @@
 bundles.error.title=Ошибка при выполнении действия над модулем!
 
 
-# Components plugin
-components.pluginTitle=Компоненты
-scr.status.no_service=Сервис Declarative Service не найден!
-scr.status.no_components=Нет установленных компонентов!
-scr.status.ok=Количество установленных компонентов: {0}
-scr.action.enable=Включить
-scr.action.disable=Выключить
-scr.action.configure=Конфигурировать
-scr.prop.bundle=Модуль
-scr.prop.defstate=Состояние по умолчанию
-scr.prop.activation=Активация
-scr.prop.properties=Конфигурации
-scr.prop.class=Класс реализации
-scr.prop.componentfactory=Имя фабрики компонентов
-scr.prop.configurationpolicy=Политика конфигурирования
-scr.serv.type=Тип сервиса
-scr.serv=Сервисы
-scr.title.actions=Действия
-scr.title.status=Состояние
-scr.title.name=Имя
-
-
 # Configuration plugin
 configMgr.pluginTitle=Конфигурирование
 config.status.ok=Сервис Configuration Admin запущен.
@@ -187,27 +148,6 @@
 license.resources=Ресурсы модуля:
 license.resources.embedded=Встроенные лицензии {0}:
 
-# OBR Plugin
-obr.pluginTitle=Хранилище OSGi
-obr.status.ok=Сервис Apache Bundle Repository запущен и работает.
-obr.status.no=Сервис Apache Bundle Repository не найден!
-obr.version.select=Выберите версию...
-obr.repo.title=Хранилище модулей
-obr.action.add=Добавить
-obr.action.search=Поиск
-obr.action.search.description=Введите слово, содержащееся в описании модуля (или в имени, версии и т. д.) \
- или правильный OSGi фильтр
-obr.action.deploy=Установить выбранное
-obr.action.deploystart=Установить и запустить выбранное
-obr.repo.name=Имя
-obr.repo.url=Адрес
-obr.repo.lastModified=Последнее изменение
-obr.repo.actions=Действия
-obr.res.title=Доступные ресурсы
-obr.res.name=Имя ресурса
-obr.res.installedVer=Установленная версия
-obr.error=Ошибка фильтрации ресурсов
-
 # Configuration Status plugin
 configStatus.pluginTitle=Сводная информация
 configStatus.wait=Пожалуйста, подождите...
diff --git a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
index 1cf3de4..f6297c7 100644
--- a/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
+++ b/webconsole/src/main/resources/OSGI-INF/l10n/bundle.properties
@@ -94,23 +94,6 @@
 log.level.info=INFO
 log.level.debug=DEBUG
 
-# Deployment Admin plugin
-deppack.pluginTitle=Deployment Packages
-deployment.status.no_data=No deployment packages installed!
-deployment.status.no_service=Deployment Admin is not installed/running!
-deployment.status.ok=Deployment Admin service is running
-deployment.details=Details
-deployment.actions=Actions
-deployment.install_update=Install or Update
-deployment.package.name=Package Name
-deployment.bundles=Bundles
-deployment.uninstall=Uninstall
-
-# Shell plugin
-shell.pluginTitle=Shell
-shell.clear=Clear
-shell.status=Use the command prompt to execute shell commands.
-
 # Bundles plugin
 bundles.pluginTitle=Bundles
 bundles.statline=Bundle information: {0} bundles in total, {1} bundles active, {2} active fragments, {3} bundles resolved, {4} bundles installed.
@@ -164,28 +147,6 @@
 bundles.error.title=Error while executing bundle operation!
 
 
-# Components plugin
-components.pluginTitle=Components
-scr.status.no_service=Declarative Service required for this function!
-scr.status.no_components=No components installed currently!
-scr.status.ok=Number of installed components: {0}
-scr.action.enable=Enable
-scr.action.disable=Disable
-scr.action.configure=Configure
-scr.prop.bundle=Bundle
-scr.prop.defstate=Default State
-scr.prop.activation=Activation
-scr.prop.properties=Properties
-scr.prop.class=Implementation Class
-scr.prop.componentfactory=Component Factory Name
-scr.prop.configurationpolicy=Configuration Policy
-scr.serv.type=Service Type
-scr.serv=Services
-scr.title.actions=Actions
-scr.title.status=Status
-scr.title.name=Name
-
-
 # Configuration plugin
 configMgr.pluginTitle=Configuration
 config.status.ok=Configuration Admin Service is running.
@@ -219,27 +180,6 @@
 license.resources=Bundle Resources: 
 license.resources.embedded=Embedded {0}: 
 
-# OBR Plugin
-obr.pluginTitle=OSGi Repository
-obr.status.ok=The Apache Bundle Repository service is up and running.
-obr.status.no=The Apache Bundle Repository service is not available!
-obr.version.select=Select Version...
-obr.repo.title=Bundle Repositories
-obr.action.add=Add
-obr.action.search=Search
-obr.action.search.description=Enter word contained in bundle presentation \
- and/or symbolic name or a valid OSGi Filter Expression
-obr.action.deploy=Deploy Selected
-obr.action.deploystart=Deploy and Start Selected
-obr.repo.name=Name
-obr.repo.url=URL
-obr.repo.lastModified=Last Modified
-obr.repo.actions=Actions
-obr.res.title=Available Resources
-obr.res.name=Resource Name
-obr.res.installedVer=Installed Version
-obr.error=Error Filtering Resources
-
 # Configuration Status plugin
 configStatus.pluginTitle=Configuration Status
 configStatus.wait=Please wait...
