felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r828802 [2/2] - in /felix/trunk/karaf: ./ admin/ admin/command/ admin/command/src/ admin/command/src/main/ admin/command/src/main/java/ admin/command/src/main/java/org/ admin/command/src/main/java/org/apache/ admin/command/src/main/java/org...
Date Thu, 22 Oct 2009 18:01:53 GMT
Copied: felix/trunk/karaf/admin/core/src/test/java/org/apache/felix/karaf/jpm/ProcessTest.java (from r828779, felix/trunk/karaf/shell/admin/src/test/java/org/apache/felix/karaf/jpm/ProcessTest.java)
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/core/src/test/java/org/apache/felix/karaf/jpm/ProcessTest.java?p2=felix/trunk/karaf/admin/core/src/test/java/org/apache/felix/karaf/jpm/ProcessTest.java&p1=felix/trunk/karaf/shell/admin/src/test/java/org/apache/felix/karaf/jpm/ProcessTest.java&r1=828779&r2=828802&rev=828802&view=diff
==============================================================================
    (empty)

Copied: felix/trunk/karaf/admin/management/NOTICE (from r828779, felix/trunk/karaf/shell/admin/NOTICE)
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/NOTICE?p2=felix/trunk/karaf/admin/management/NOTICE&p1=felix/trunk/karaf/shell/admin/NOTICE&r1=828779&r2=828802&rev=828802&view=diff
==============================================================================
    (empty)

Added: felix/trunk/karaf/admin/management/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/pom.xml?rev=828802&view=auto
==============================================================================
--- felix/trunk/karaf/admin/management/pom.xml (added)
+++ felix/trunk/karaf/admin/management/pom.xml Thu Oct 22 18:01:48 2009
@@ -0,0 +1,86 @@
+<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">
+
+    <!--
+
+        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.
+    -->
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.felix.karaf.admin</groupId>
+        <artifactId>admin</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <groupId>org.apache.felix.karaf.admin</groupId>
+    <artifactId>org.apache.felix.karaf.admin.management</artifactId>
+    <packaging>bundle</packaging>
+    <version>1.1.0-SNAPSHOT</version>
+    <name>Apache Felix Karaf :: Admin Management</name>
+
+    <properties>
+        <appendedResourcesDirectory>${basedir}/../../etc/appended-resources</appendedResourcesDirectory>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix.karaf.admin</groupId>
+            <artifactId>org.apache.felix.karaf.admin.core</artifactId>
+        </dependency>
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <Export-Package>
+                            ${pom.artifactId}*;version=${pom.version}
+                        </Export-Package>
+                        <Import-Package>
+                            !${pom.artifactId}*,
+                            javax.management,
+                            javax.management.loading,
+                            org.osgi.service.command,
+                            org.apache.felix.gogo.commands,
+                            org.apache.felix.karaf.shell.console,
+                            *
+                        </Import-Package>
+                        <Private-Package>org.apache.felix.karaf.admin.management.internal</Private-Package>
+                        <_versionpolicy>${bnd.version.policy}</_versionpolicy>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Copied: felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/AdminServiceMBean.java (from r828779, felix/trunk/karaf/shell/admin/src/main/java/org/apache/felix/karaf/shell/admin/AdminServiceMBean.java)
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/AdminServiceMBean.java?p2=felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/AdminServiceMBean.java&p1=felix/trunk/karaf/shell/admin/src/main/java/org/apache/felix/karaf/shell/admin/AdminServiceMBean.java&r1=828779&r2=828802&rev=828802&view=diff
==============================================================================
--- felix/trunk/karaf/shell/admin/src/main/java/org/apache/felix/karaf/shell/admin/AdminServiceMBean.java (original)
+++ felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/AdminServiceMBean.java Thu Oct 22 18:01:48 2009
@@ -14,24 +14,30 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.felix.karaf.shell.admin;
+package org.apache.felix.karaf.admin.management;
 
-public interface AdminServiceMBean {
-
-    void createInstance(String name, int port, String location) throws Exception;
+import javax.management.openmbean.TabularData;
 
-    String[] getInstances();
-
-    int getPort(String name);
+public interface AdminServiceMBean {
 
+    String INSTANCE_PID = "Pid";
+    String INSTANCE_NAME = "Name";
+    String INSTANCE_PORT = "Port";
+    String INSTANCE_STATE = "State";
+    String INSTANCE_LOCATION = "Location";
+
+    String[] INSTANCE = {INSTANCE_PID, INSTANCE_NAME, INSTANCE_PORT,
+            INSTANCE_STATE, INSTANCE_LOCATION };
+
+    // Operations
+    int createInstance(String name, int port, String location, String features, String featureURLs)
+            throws Exception;
     void changePort(String name, int port) throws Exception;
+    void destroyInstance(String name) throws Exception;
+    void startInstance(String name, String opts) throws Exception;
+    void stopInstance(String name) throws Exception;
 
-    String getState(String name) throws Exception;
-
-    void start(String name, String javaOpts) throws Exception;
-
-    void stop(String name) throws Exception;
-
-    void destroy(String name) throws Exception;
+    // Attributes
+    TabularData getInstances() throws Exception;
 
 }

Added: felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/codec/JmxInstance.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/codec/JmxInstance.java?rev=828802&view=auto
==============================================================================
--- felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/codec/JmxInstance.java (added)
+++ felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/codec/JmxInstance.java Thu Oct 22 18:01:48 2009
@@ -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.
+ */
+package org.apache.felix.karaf.admin.management.codec;
+
+import java.util.List;
+
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeDataSupport;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.OpenDataException;
+import javax.management.openmbean.OpenType;
+import javax.management.openmbean.SimpleType;
+import javax.management.openmbean.TabularData;
+import javax.management.openmbean.TabularDataSupport;
+import javax.management.openmbean.TabularType;
+
+import org.apache.felix.karaf.admin.management.AdminServiceMBean;
+import org.apache.felix.karaf.admin.Instance;
+
+public class JmxInstance {
+    static final CompositeType INSTANCE;
+    static final TabularType INSTANCE_TABLE;
+
+    static {
+        INSTANCE = createInstanceType();
+        INSTANCE_TABLE = createInstanceTableType();
+    }
+
+    private final CompositeDataSupport data;
+
+    private CompositeData asCompositeData() {
+        return data;
+    }
+
+    public JmxInstance(Instance instance) {
+        try {
+            String[] itemNames = AdminServiceMBean.INSTANCE;
+            Object[] itemValues = new Object[itemNames.length];
+            itemValues[0] = instance.getPid();
+            itemValues[1] = instance.getName();
+            itemValues[2] = instance.getPort();
+            try {
+                itemValues[3] = instance.getState();
+            } catch (Exception e) {
+                itemValues[3] = "Error";
+            }
+            itemValues[4] = instance.getLocation();
+
+            data = new CompositeDataSupport(INSTANCE, itemNames, itemValues);
+        } catch (OpenDataException e) {
+            throw new IllegalStateException("Cannot create instance open data", e);
+        }
+    }
+
+    private static CompositeType createInstanceType() {
+        try {
+            String desc = "This type describes Karaf instances";
+            String[] itemNames = AdminServiceMBean.INSTANCE;
+            OpenType[] itemTypes = new OpenType[itemNames.length];
+            String[] descriptions = new String[itemNames.length];
+
+            itemTypes[0] = SimpleType.INTEGER;
+            descriptions[0] = "The Process ID of the instance or 0 if not running.";
+
+            itemTypes[1] = SimpleType.STRING;
+            descriptions[1] = "The name of the instance.";
+
+            itemTypes[2] = SimpleType.INTEGER;
+            descriptions[2] = "The SSH port that can be used to connect to the instance.";
+
+            itemTypes[3] = SimpleType.STRING;
+            descriptions[3] = "The state of the instance.";
+
+            itemTypes[4] = SimpleType.STRING;
+            descriptions[4] = "The location of the instance.";
+
+            return new CompositeType("Instance", desc, itemNames, descriptions, itemTypes);
+        } catch (OpenDataException e) {
+            throw new IllegalStateException("Unable to build instance type", e);
+        }
+    }
+
+    private static TabularType createInstanceTableType() {
+        try {
+            return new TabularType("Instances", "Table of all Karaf instances", INSTANCE,
+                    new String[] {AdminServiceMBean.INSTANCE_NAME});
+        } catch (OpenDataException e) {
+            throw new IllegalStateException("Unable to build instance table type", e);
+        }
+    }
+
+    public static TabularData tableFrom(List<JmxInstance> instances) {
+        TabularDataSupport table = new TabularDataSupport(INSTANCE_TABLE);
+        for (JmxInstance instance : instances) {
+            table.put(instance.asCompositeData());
+        }
+        return table;
+    }
+
+}

Added: felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/internal/AdminServiceMBeanImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/internal/AdminServiceMBeanImpl.java?rev=828802&view=auto
==============================================================================
--- felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/internal/AdminServiceMBeanImpl.java (added)
+++ felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/internal/AdminServiceMBeanImpl.java Thu Oct 22 18:01:48 2009
@@ -0,0 +1,107 @@
+/*
+ * 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.karaf.admin.management.internal;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.management.openmbean.TabularData;
+
+import org.apache.felix.karaf.admin.management.AdminServiceMBean;
+import org.apache.felix.karaf.admin.AdminService;
+import org.apache.felix.karaf.admin.Instance;
+import org.apache.felix.karaf.admin.InstanceSettings;
+import org.apache.felix.karaf.admin.management.codec.JmxInstance;
+
+public class AdminServiceMBeanImpl implements AdminServiceMBean {
+
+    private AdminService adminService;
+
+    public AdminService getAdminService() {
+        return adminService;
+    }
+
+    public void setAdminService(AdminService adminService) {
+        this.adminService = adminService;
+    }
+
+    public int createInstance(String name, int port, String location, String features, String featureURLs)
+            throws Exception {
+        if ("".equals(location)) {
+            location = null;
+        }
+
+        InstanceSettings settings = new InstanceSettings(port, location,
+                parseStringList(featureURLs), parseStringList(features));
+
+        Instance inst = adminService.createInstance(name, settings);
+        if (inst != null) {
+            return inst.getPid();
+        } else {
+            return -1;
+        }
+    }
+
+    public void changePort(String name, int port) throws Exception {
+        getExistingInstance(name).changePort(port);
+    }
+
+    public void destroyInstance(String name) throws Exception {
+        getExistingInstance(name).destroy();
+    }
+
+    public void startInstance(String name, String opts) throws Exception {
+        getExistingInstance(name).start(opts);
+    }
+
+    public void stopInstance(String name) throws Exception {
+        getExistingInstance(name).stop();
+    }
+
+    public TabularData getInstances() throws Exception {
+        List<Instance> allInstances = Arrays.asList(adminService.getInstances());
+        List<JmxInstance> instances = new ArrayList<JmxInstance>();
+        for (Instance instance : allInstances) {
+            instances.add(new JmxInstance(instance));
+        }
+        TabularData table = JmxInstance.tableFrom(instances);
+        return table;
+    }
+
+    private Instance getExistingInstance(String name) {
+        Instance i = adminService.getInstance(name);
+        if (i == null) {
+            throw new IllegalArgumentException("Instance '" + name + "' does not exist");
+        }
+        return i;
+    }
+
+    private List<String> parseStringList(String value) {
+        List<String> list = new ArrayList<String>();
+        if (value != null) {
+            for (String el : value.split(",")) {
+                String trimmed = el.trim();
+                if (trimmed.length() == 0) {
+                    continue;
+                }
+                list.add(trimmed);
+            }
+        }
+        return list;
+    }
+}

Added: felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/internal/MBeanRegistrer.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/internal/MBeanRegistrer.java?rev=828802&view=auto
==============================================================================
--- felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/internal/MBeanRegistrer.java (added)
+++ felix/trunk/karaf/admin/management/src/main/java/org/apache/felix/karaf/admin/management/internal/MBeanRegistrer.java Thu Oct 22 18:01:48 2009
@@ -0,0 +1,67 @@
+/*
+ * 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.karaf.admin.management.internal;
+
+import java.util.Map;
+
+import javax.management.JMException;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+public class MBeanRegistrer {
+
+    private MBeanServer mbeanServer;
+
+    private Map<Object, String> mbeans;
+
+    public void setMbeans(Map<Object, String> mbeans) {
+        this.mbeans = mbeans;
+    }
+
+    public void registerMBeanServer(MBeanServer mbeanServer) throws JMException {
+        if (this.mbeanServer != mbeanServer) {
+            unregisterMBeans();
+        }
+        this.mbeanServer = mbeanServer;
+        registerMBeans();
+    }
+
+    public void unregisterMBeanServer(MBeanServer mbeanServer) throws JMException {
+        unregisterMBeans();
+        this.mbeanServer = null;
+    }
+
+    public void init() throws Exception {
+        registerMBeans();
+    }
+
+    protected void registerMBeans() throws JMException {
+        if (mbeanServer != null && mbeans != null) {
+            for (Map.Entry<Object, String> entry : mbeans.entrySet()) {
+                mbeanServer.registerMBean(entry.getKey(), new ObjectName(entry.getValue()));
+            }
+        }
+    }
+
+    protected void unregisterMBeans() throws JMException {
+        if (mbeanServer != null && mbeans != null) {
+            for (Map.Entry<Object, String> entry : mbeans.entrySet()) {
+                mbeanServer.unregisterMBean(new ObjectName(entry.getValue()));
+            }
+        }
+    }
+}
\ No newline at end of file

Added: felix/trunk/karaf/admin/management/src/main/resources/OSGI-INF/blueprint/admin-management.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/src/main/resources/OSGI-INF/blueprint/admin-management.xml?rev=828802&view=auto
==============================================================================
--- felix/trunk/karaf/admin/management/src/main/resources/OSGI-INF/blueprint/admin-management.xml (added)
+++ felix/trunk/karaf/admin/management/src/main/resources/OSGI-INF/blueprint/admin-management.xml Thu Oct 22 18:01:48 2009
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+
+-->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+    <reference id="adminService" interface="org.apache.felix.karaf.admin.AdminService" />
+
+    <reference id="mbeanServer" interface="javax.management.MBeanServer">
+        <reference-listener ref="mbeanRegister" bind-method="registerMBeanServer" unbind-method="unregisterMBeanServer" />
+    </reference>
+
+    <bean id="mbeanImpl" class="org.apache.felix.karaf.admin.management.internal.AdminServiceMBeanImpl">
+        <property name="adminService" ref="adminService" />
+    </bean>
+
+    <bean id="mbeanRegister" class="org.apache.felix.karaf.admin.management.internal.MBeanRegistrer">
+        <property name="mbeans">
+            <map>
+                <entry>
+                    <key>
+                        <bean class="javax.management.StandardMBean">
+                            <argument ref="mbeanImpl" />
+                            <argument value="org.apache.felix.karaf.admin.management.AdminServiceMBean"/>
+                        </bean>
+                    </key>
+                    <value>org.apache.felix.karaf:service=admin</value>
+                </entry>
+            </map>
+        </property>
+    </bean>
+
+
+</blueprint>

Added: felix/trunk/karaf/admin/management/src/test/java/org/apache/felix/karaf/admin/management/codec/JmxInstanceTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/src/test/java/org/apache/felix/karaf/admin/management/codec/JmxInstanceTest.java?rev=828802&view=auto
==============================================================================
--- felix/trunk/karaf/admin/management/src/test/java/org/apache/felix/karaf/admin/management/codec/JmxInstanceTest.java (added)
+++ felix/trunk/karaf/admin/management/src/test/java/org/apache/felix/karaf/admin/management/codec/JmxInstanceTest.java Thu Oct 22 18:01:48 2009
@@ -0,0 +1,89 @@
+/*
+ * 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.karaf.admin.management.codec;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.CompositeType;
+import javax.management.openmbean.TabularData;
+import javax.management.openmbean.TabularType;
+
+import junit.framework.TestCase;
+import org.apache.felix.karaf.admin.Instance;
+import org.apache.felix.karaf.admin.management.AdminServiceMBean;
+import org.easymock.EasyMock;
+import org.junit.Assert;
+
+public class JmxInstanceTest extends TestCase {
+    public void testJMXInstanceStatics() {
+        CompositeType it = JmxInstance.INSTANCE;
+        Assert.assertEquals(
+            new HashSet<String>(Arrays.asList(AdminServiceMBean.INSTANCE)),
+            it.keySet());
+
+        TabularType tt = JmxInstance.INSTANCE_TABLE;
+        Assert.assertEquals("Instances", tt.getTypeName());
+    }
+
+    public void testJMXInstance() throws Exception {
+        Instance i = EasyMock.createMock(Instance.class);
+        EasyMock.expect(i.getPid()).andReturn(1712);
+        EasyMock.expect(i.getName()).andReturn("MyInstance");
+        EasyMock.expect(i.getPort()).andReturn(0);
+        EasyMock.expect(i.getState()).andThrow(new Exception("gotcha"));
+        EasyMock.expect(i.getLocation()).andReturn("somewhere");
+        EasyMock.replay(i);
+        
+        JmxInstance ji = new JmxInstance(i);
+        TabularData td = JmxInstance.tableFrom(Collections.singletonList(ji));        
+        Collection<?> keys = (Collection<?>) td.keySet().iterator().next();
+        Assert.assertEquals("MyInstance", keys.iterator().next());
+        
+        CompositeData cd = td.get(keys.toArray());
+        Assert.assertEquals(1712, cd.get("Pid"));
+        Assert.assertEquals("MyInstance", cd.get("Name"));
+        Assert.assertEquals(0, cd.get("Port"));
+        Assert.assertEquals("Error", cd.get("State"));
+        Assert.assertEquals("somewhere", cd.get("Location"));
+    }
+
+    public void testJMXInstance2() throws Exception {
+        Instance i = EasyMock.createMock(Instance.class);
+        EasyMock.expect(i.getPid()).andReturn(1712);
+        EasyMock.expect(i.getName()).andReturn("MyInstance");
+        EasyMock.expect(i.getPort()).andReturn(0);
+        EasyMock.expect(i.getState()).andReturn("Started");
+        EasyMock.expect(i.getLocation()).andReturn(null);
+        EasyMock.replay(i);
+        
+        JmxInstance ji = new JmxInstance(i);
+        TabularData td = JmxInstance.tableFrom(Collections.singletonList(ji));        
+        Collection<?> keys = (Collection<?>) td.keySet().iterator().next();
+        Assert.assertEquals("MyInstance", keys.iterator().next());
+        
+        CompositeData cd = td.get(keys.toArray());
+        Assert.assertEquals(1712, cd.get("Pid"));
+        Assert.assertEquals("MyInstance", cd.get("Name"));
+        Assert.assertEquals(0, cd.get("Port"));
+        Assert.assertEquals("Started", cd.get("State"));
+        Assert.assertNull(cd.get("Location"));
+    }
+}

Added: felix/trunk/karaf/admin/management/src/test/java/org/apache/felix/karaf/admin/management/internal/AdminServiceMBeanImplTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/management/src/test/java/org/apache/felix/karaf/admin/management/internal/AdminServiceMBeanImplTest.java?rev=828802&view=auto
==============================================================================
--- felix/trunk/karaf/admin/management/src/test/java/org/apache/felix/karaf/admin/management/internal/AdminServiceMBeanImplTest.java (added)
+++ felix/trunk/karaf/admin/management/src/test/java/org/apache/felix/karaf/admin/management/internal/AdminServiceMBeanImplTest.java Thu Oct 22 18:01:48 2009
@@ -0,0 +1,174 @@
+/*
+ * 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.karaf.admin.management.internal;
+
+import java.util.Arrays;
+import java.util.Collections;
+
+import javax.management.openmbean.CompositeData;
+import javax.management.openmbean.TabularData;
+
+import junit.framework.TestCase;
+import org.apache.felix.karaf.admin.AdminService;
+import org.apache.felix.karaf.admin.Instance;
+import org.apache.felix.karaf.admin.InstanceSettings;
+import org.easymock.EasyMock;
+import org.junit.Assert;
+
+public class AdminServiceMBeanImplTest extends TestCase {
+    public void testCreateInstance() throws Exception {
+        final InstanceSettings is = new InstanceSettings(123, "somewhere",
+                Collections.<String>emptyList(), Arrays.asList("webconsole", "funfeat"));
+        
+        final Instance inst = EasyMock.createMock(Instance.class);
+        EasyMock.expect(inst.getPid()).andReturn(42);
+        EasyMock.replay(inst);
+
+        AdminService as = EasyMock.createMock(AdminService.class);
+        EasyMock.expect(as.createInstance("t1", is)).andReturn(inst);
+        EasyMock.replay(as);
+        
+        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
+        ab.setAdminService(as);
+        Assert.assertSame(as, ab.getAdminService());
+        
+        assertEquals(42, ab.createInstance("t1", 123, "somewhere", " webconsole,  funfeat", ""));
+    }
+    
+    public void testCreateInstance2() throws Exception {
+        final InstanceSettings is = new InstanceSettings(0, null, 
+                Collections.<String>emptyList(), Collections.<String>emptyList());
+        
+        AdminService as = EasyMock.createMock(AdminService.class);
+        EasyMock.expect(as.createInstance("t1", is)).andReturn(null);
+        EasyMock.replay(as);
+        
+        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
+        ab.setAdminService(as);
+        Assert.assertSame(as, ab.getAdminService());
+        
+        assertEquals(-1, ab.createInstance("t1", 0, "", "", ""));
+    }
+    
+    public void testGetInstances() throws Exception {       
+        Instance i1 = EasyMock.createMock(Instance.class);
+        EasyMock.expect(i1.getPid()).andReturn(1234);
+        EasyMock.expect(i1.getPort()).andReturn(8818);
+        EasyMock.expect(i1.getName()).andReturn("i1");
+        EasyMock.expect(i1.getLocation()).andReturn("somewhere");
+        EasyMock.expect(i1.getState()).andReturn("Stopped");
+        EasyMock.replay(i1);
+        Instance i2 = EasyMock.createNiceMock(Instance.class);
+        EasyMock.expect(i2.getName()).andReturn("i2");
+        EasyMock.replay(i2);
+        
+        AdminService as = EasyMock.createMock(AdminService.class);
+        EasyMock.expect(as.getInstances()).andReturn(new Instance [] {i1, i2});
+        EasyMock.replay(as);
+
+        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
+        ab.setAdminService(as);
+        
+        TabularData td = ab.getInstances();
+        Assert.assertEquals(2, td.size());
+        CompositeData cd1 = td.get(new Object [] {"i1"});
+        Assert.assertTrue(cd1.containsValue("i1"));
+        Assert.assertTrue(cd1.containsValue(1234));
+        Assert.assertTrue(cd1.containsValue(8818));
+        Assert.assertTrue(cd1.containsValue("somewhere"));
+        Assert.assertTrue(cd1.containsValue("Stopped"));
+
+        CompositeData cd2 = td.get(new Object [] {"i2"});
+        Assert.assertTrue(cd2.containsValue("i2"));
+    }
+    
+    public void testStartInstance() throws Exception {
+        Instance inst = EasyMock.createMock(Instance.class);
+        inst.start("-x -y -z");
+        EasyMock.expectLastCall();
+        EasyMock.replay(inst);
+
+        AdminService as = EasyMock.createMock(AdminService.class);
+        EasyMock.expect(as.getInstance("test instance")).andReturn(inst);
+        EasyMock.replay(as);
+        
+        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
+        ab.setAdminService(as);
+        Assert.assertSame(as, ab.getAdminService());
+
+        ab.startInstance("test instance", "-x -y -z");
+        EasyMock.verify(as);
+        EasyMock.verify(inst);
+    }
+    
+    public void testStopInstance() throws Exception {
+        Instance inst = EasyMock.createMock(Instance.class);
+        inst.stop();
+        EasyMock.expectLastCall();
+        EasyMock.replay(inst);
+
+        AdminService as = EasyMock.createMock(AdminService.class);
+        EasyMock.expect(as.getInstance("test instance")).andReturn(inst);
+        EasyMock.replay(as);
+        
+        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
+        ab.setAdminService(as);
+        Assert.assertSame(as, ab.getAdminService());
+
+        ab.stopInstance("test instance");
+        EasyMock.verify(as);
+        EasyMock.verify(inst);
+    }
+
+    public void testDestroyInstance() throws Exception {
+        Instance inst = EasyMock.createMock(Instance.class);
+        inst.destroy();
+        EasyMock.expectLastCall();
+        EasyMock.replay(inst);
+
+        AdminService as = EasyMock.createMock(AdminService.class);
+        EasyMock.expect(as.getInstance("test instance")).andReturn(inst);
+        EasyMock.replay(as);
+        
+        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
+        ab.setAdminService(as);
+        Assert.assertSame(as, ab.getAdminService());
+
+        ab.destroyInstance("test instance");
+        EasyMock.verify(as);
+        EasyMock.verify(inst);
+    }
+
+    public void testChangePort() throws Exception {
+        Instance inst = EasyMock.createMock(Instance.class);
+        inst.changePort(7788);
+        EasyMock.expectLastCall();
+        EasyMock.replay(inst);
+
+        AdminService as = EasyMock.createMock(AdminService.class);
+        EasyMock.expect(as.getInstance("test instance")).andReturn(inst);
+        EasyMock.replay(as);
+        
+        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
+        ab.setAdminService(as);
+        Assert.assertSame(as, ab.getAdminService());
+
+        ab.changePort("test instance", 7788);
+        EasyMock.verify(as);
+        EasyMock.verify(inst);
+    }
+}

Copied: felix/trunk/karaf/admin/pom.xml (from r828779, felix/trunk/karaf/shell/pom.xml)
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/admin/pom.xml?p2=felix/trunk/karaf/admin/pom.xml&p1=felix/trunk/karaf/shell/pom.xml&r1=828779&r2=828802&rev=828802&view=diff
==============================================================================
--- felix/trunk/karaf/shell/pom.xml (original)
+++ felix/trunk/karaf/admin/pom.xml Thu Oct 22 18:01:48 2009
@@ -26,23 +26,16 @@
         <version>1.1.0-SNAPSHOT</version>
     </parent>
 
-    <groupId>org.apache.felix.karaf.shell</groupId>
-    <artifactId>shell</artifactId>
+    <groupId>org.apache.felix.karaf.admin</groupId>
+    <artifactId>admin</artifactId>
     <packaging>pom</packaging>
     <version>1.1.0-SNAPSHOT</version>
-    <name>Apache Felix Karaf :: Shell</name>
+    <name>Apache Felix Karaf :: Admin</name>
 
     <modules>
-        <module>admin</module>
-        <module>commands</module>
-        <module>config</module>
-        <module>console</module>
-        <module>log</module>
-        <module>obr</module>
-        <module>osgi</module>
-        <module>packages</module>
-        <module>ssh</module>
-        <module>wrapper</module>
+        <module>core</module>
+        <module>command</module>
+        <module>management</module>
     </modules>
 
 </project>

Modified: felix/trunk/karaf/assembly/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/assembly/pom.xml?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/assembly/pom.xml (original)
+++ felix/trunk/karaf/assembly/pom.xml Thu Oct 22 18:01:48 2009
@@ -80,12 +80,20 @@
             <artifactId>org.apache.felix.karaf.features.management</artifactId>
         </dependency>
         <dependency>
-            <groupId>org.apache.felix.karaf.shell</groupId>
-            <artifactId>org.apache.felix.karaf.shell.console</artifactId>
+            <groupId>org.apache.felix.karaf.admin</groupId>
+            <artifactId>org.apache.felix.karaf.admin.core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.admin</groupId>
+            <artifactId>org.apache.felix.karaf.admin.command</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix.karaf.admin</groupId>
+            <artifactId>org.apache.felix.karaf.admin.management</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.felix.karaf.shell</groupId>
-            <artifactId>org.apache.felix.karaf.shell.admin</artifactId>
+            <artifactId>org.apache.felix.karaf.shell.console</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.felix.karaf.shell</groupId>

Modified: felix/trunk/karaf/assembly/src/main/descriptors/unix-bin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/assembly/src/main/descriptors/unix-bin.xml?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/assembly/src/main/descriptors/unix-bin.xml (original)
+++ felix/trunk/karaf/assembly/src/main/descriptors/unix-bin.xml Thu Oct 22 18:01:48 2009
@@ -189,6 +189,17 @@
             <outputDirectory>/system</outputDirectory>
             <unpack>false</unpack>
             <useProjectArtifact>false</useProjectArtifact>
+            <outputFileNameMapping>org/apache/felix/karaf/admin/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <includes>
+                <include>org.apache.felix.karaf.admin:org.apache.felix.karaf.admin.core</include>
+                <include>org.apache.felix.karaf.admin:org.apache.felix.karaf.admin.command</include>
+                <include>org.apache.felix.karaf.admin:org.apache.felix.karaf.admin.management</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>/system</outputDirectory>
+            <unpack>false</unpack>
+            <useProjectArtifact>false</useProjectArtifact>
             <outputFileNameMapping>org/apache/felix/karaf/deployer/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.felix.karaf.deployer:org.apache.felix.karaf.deployer.spring</include>
@@ -203,7 +214,6 @@
             <outputFileNameMapping>org/apache/felix/karaf/shell/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.console</include>
-                <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.admin</include>
                 <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.osgi</include>
                 <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.log</include>
                 <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.config</include>

Modified: felix/trunk/karaf/assembly/src/main/descriptors/windows-bin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/assembly/src/main/descriptors/windows-bin.xml?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/assembly/src/main/descriptors/windows-bin.xml (original)
+++ felix/trunk/karaf/assembly/src/main/descriptors/windows-bin.xml Thu Oct 22 18:01:48 2009
@@ -180,6 +180,17 @@
             <outputDirectory>/system</outputDirectory>
             <unpack>false</unpack>
             <useProjectArtifact>false</useProjectArtifact>
+            <outputFileNameMapping>org/apache/felix/karaf/admin/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
+            <includes>
+                <include>org.apache.felix.karaf.admin:org.apache.felix.karaf.admin.core</include>
+                <include>org.apache.felix.karaf.admin:org.apache.felix.karaf.admin.command</include>
+                <include>org.apache.felix.karaf.admin:org.apache.felix.karaf.admin.management</include>
+            </includes>
+        </dependencySet>
+        <dependencySet>
+            <outputDirectory>/system</outputDirectory>
+            <unpack>false</unpack>
+            <useProjectArtifact>false</useProjectArtifact>
             <outputFileNameMapping>org/apache/felix/karaf/deployer/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.felix.karaf.deployer:org.apache.felix.karaf.deployer.spring</include>
@@ -194,7 +205,6 @@
             <outputFileNameMapping>org/apache/felix/karaf/shell/${artifact.artifactId}/${artifact.baseVersion}/${artifact.artifactId}-${artifact.baseVersion}${dashClassifier?}.${artifact.extension}</outputFileNameMapping>
             <includes>
                 <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.console</include>
-                <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.admin</include>
                 <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.osgi</include>
                 <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.log</include>
                 <include>org.apache.felix.karaf.shell:org.apache.felix.karaf.shell.config</include>

Modified: felix/trunk/karaf/assembly/src/main/filtered-resources/bin/admin
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/assembly/src/main/filtered-resources/bin/admin?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/assembly/src/main/filtered-resources/bin/admin (original)
+++ felix/trunk/karaf/assembly/src/main/filtered-resources/bin/admin Thu Oct 22 18:01:48 2009
@@ -273,7 +273,7 @@
 
     CLASSPATH=${KARAF_HOME}/system/org/apache/felix/karaf/shell/org.apache.felix.karaf.shell.admin/${project.version}/org.apache.felix.karaf.shell.admin-${project.version}.jar:${KARAF_HOME}/system/org/apache/felix/karaf/shell/org.apache.felix.karaf.shell.console/${project.version}/org.apache.felix.karaf.shell.console-${project.version}.jar:${KARAF_HOME}/system/org/apache/felix/gogo/org.apache.felix.gogo.runtime/${felix.gogo.version}/org.apache.felix.gogo.runtime-${felix.gogo.version}.jar:${KARAF_HOME}/system/org/apache/geronimo/blueprint/geronimo-blueprint/${geronimo.blueprint.version}/geronimo-blueprint-${geronimo.blueprint.version}.jar:${KARAF_HOME}/system/org/ops4j/pax/logging/pax-logging-api/${pax.logging.version}/pax-logging-api-${pax.logging.version}.jar:${KARAF_HOME}/system/org/apache/felix/org.apache.felix.framework/${felix.framework.version}/org.apache.felix.framework-${felix.framework.version}.jar
 
-    exec $JAVA $JAVA_OPTS -Dstorage.location="${KARAF_HOME}/instances" -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties $OPTS -classpath "$CLASSPATH" org.apache.felix.karaf.shell.admin.main.Execute "$@"
+    exec $JAVA $JAVA_OPTS -Dstorage.location="${KARAF_HOME}/instances" -Dkaraf.home="$KARAF_HOME" -Dkaraf.base="$KARAF_BASE" -Djava.util.logging.config.file=$KARAF_BASE/etc/java.util.logging.properties $OPTS -classpath "$CLASSPATH" org.apache.felix.karaf.admin.main.Execute "$@"
 }
 
 main() {

Modified: felix/trunk/karaf/assembly/src/main/filtered-resources/bin/admin.bat
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/assembly/src/main/filtered-resources/bin/admin.bat?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/assembly/src/main/filtered-resources/bin/admin.bat (original)
+++ felix/trunk/karaf/assembly/src/main/filtered-resources/bin/admin.bat Thu Oct 22 18:01:48 2009
@@ -87,7 +87,7 @@
     if "%SHIFT%" == "true" SET ARGS=%2 %3 %4 %5 %6 %7 %8
     if not "%SHIFT%" == "true" SET ARGS=%1 %2 %3 %4 %5 %6 %7 %8    
     rem Execute the Java Virtual Machine
-    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dstorage.location="%KARAF_HOME%\instances" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.felix.karaf.shell.admin.main.Execute %ARGS%
+    "%JAVA%" %JAVA_OPTS% %OPTS% -classpath "%CLASSPATH%" -Dstorage.location="%KARAF_HOME%\instances" -Dkaraf.home="%KARAF_HOME%" -Dkaraf.base="%KARAF_BASE%" -Djava.util.logging.config.file="%KARAF_BASE%\etc\java.util.logging.properties" org.apache.felix.karaf.admin.main.Execute %ARGS%
 
 rem # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
 

Modified: felix/trunk/karaf/assembly/src/main/filtered-resources/etc/startup.properties
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/assembly/src/main/filtered-resources/etc/startup.properties?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/assembly/src/main/filtered-resources/etc/startup.properties (original)
+++ felix/trunk/karaf/assembly/src/main/filtered-resources/etc/startup.properties Thu Oct 22 18:01:48 2009
@@ -41,7 +41,6 @@
 org/apache/felix/karaf/deployer/org.apache.felix.karaf.deployer.spring/${pom.version}/org.apache.felix.karaf.deployer.spring-${pom.version}.jar=30
 org/apache/felix/karaf/deployer/org.apache.felix.karaf.deployer.blueprint/${pom.version}/org.apache.felix.karaf.deployer.blueprint-${pom.version}.jar=30
 org/apache/felix/karaf/deployer/org.apache.felix.karaf.deployer.features/${pom.version}/org.apache.felix.karaf.deployer.features-${pom.version}.jar=30
-org/apache/felix/karaf/shell/org.apache.felix.karaf.shell.admin/${pom.version}/org.apache.felix.karaf.shell.admin-${pom.version}.jar=30
 org/apache/felix/karaf/shell/org.apache.felix.karaf.shell.osgi/${pom.version}/org.apache.felix.karaf.shell.osgi-${pom.version}.jar=30
 org/apache/felix/karaf/shell/org.apache.felix.karaf.shell.log/${pom.version}/org.apache.felix.karaf.shell.log-${pom.version}.jar=30
 org/apache/felix/karaf/shell/org.apache.felix.karaf.shell.config/${pom.version}/org.apache.felix.karaf.shell.config-${pom.version}.jar=30
@@ -49,7 +48,9 @@
 org/apache/felix/karaf/shell/org.apache.felix.karaf.shell.commands/${pom.version}/org.apache.felix.karaf.shell.commands-${pom.version}.jar=30
 org/apache/felix/karaf/jaas/org.apache.felix.karaf.jaas.config/${pom.version}/org.apache.felix.karaf.jaas.config-${pom.version}.jar=30
 org/apache/felix/karaf/jaas/org.apache.felix.karaf.jaas.modules/${pom.version}/org.apache.felix.karaf.jaas.modules-${pom.version}.jar=30
-
+org/apache/felix/karaf/admin/org.apache.felix.karaf.admin.core/${pom.version}/org.apache.felix.karaf.admin.core-${pom.version}.jar=30
+org/apache/felix/karaf/admin/org.apache.felix.karaf.admin.command/${pom.version}/org.apache.felix.karaf.admin.command-${pom.version}.jar=30
+org/apache/felix/karaf/admin/org.apache.felix.karaf.admin.management/${pom.version}/org.apache.felix.karaf.admin.management-${pom.version}.jar=30
 org/apache/felix/karaf/features/org.apache.felix.karaf.features.core/${pom.version}/org.apache.felix.karaf.features.core-${pom.version}.jar=30
 org/apache/felix/karaf/features/org.apache.felix.karaf.features.command/${pom.version}/org.apache.felix.karaf.features.command-${pom.version}.jar=30
 org/apache/felix/karaf/features/org.apache.felix.karaf.features.management/${pom.version}/org.apache.felix.karaf.features.management-${pom.version}.jar=30

Modified: felix/trunk/karaf/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/pom.xml?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/pom.xml (original)
+++ felix/trunk/karaf/pom.xml Thu Oct 22 18:01:48 2009
@@ -36,6 +36,7 @@
     <modules>
         <module>main</module>
         <module>features</module>
+        <module>admin</module>
         <module>deployer</module>
         <module>shell</module>
         <module>jaas</module>
@@ -217,6 +218,21 @@
                 <version>${pom.version}</version>
             </dependency>
             <dependency>
+                <groupId>org.apache.felix.karaf.admin</groupId>
+                <artifactId>org.apache.felix.karaf.admin.core</artifactId>
+                <version>${pom.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.felix.karaf.admin</groupId>
+                <artifactId>org.apache.felix.karaf.admin.command</artifactId>
+                <version>${pom.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.felix.karaf.admin</groupId>
+                <artifactId>org.apache.felix.karaf.admin.management</artifactId>
+                <version>${pom.version}</version>
+            </dependency>
+            <dependency>
                 <groupId>org.apache.felix.karaf.shell</groupId>
                 <artifactId>org.apache.felix.karaf.shell.core</artifactId>
                 <version>${pom.version}</version>
@@ -238,6 +254,11 @@
             </dependency>
             <dependency>
                 <groupId>org.apache.felix.karaf.shell</groupId>
+                <artifactId>org.apache.felix.karaf.shell.admin.management</artifactId>
+                <version>${pom.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.felix.karaf.shell</groupId>
                 <artifactId>org.apache.felix.karaf.shell.obr</artifactId>
                 <version>${pom.version}</version>
             </dependency>

Modified: felix/trunk/karaf/shell/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/shell/pom.xml?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/shell/pom.xml (original)
+++ felix/trunk/karaf/shell/pom.xml Thu Oct 22 18:01:48 2009
@@ -33,7 +33,6 @@
     <name>Apache Felix Karaf :: Shell</name>
 
     <modules>
-        <module>admin</module>
         <module>commands</module>
         <module>config</module>
         <module>console</module>

Modified: felix/trunk/karaf/webconsole/admin/src/main/resources/OSGI-INF/blueprint/webconsole-admin.xml
URL: http://svn.apache.org/viewvc/felix/trunk/karaf/webconsole/admin/src/main/resources/OSGI-INF/blueprint/webconsole-admin.xml?rev=828802&r1=828801&r2=828802&view=diff
==============================================================================
--- felix/trunk/karaf/webconsole/admin/src/main/resources/OSGI-INF/blueprint/webconsole-admin.xml (original)
+++ felix/trunk/karaf/webconsole/admin/src/main/resources/OSGI-INF/blueprint/webconsole-admin.xml Thu Oct 22 18:01:48 2009
@@ -20,7 +20,7 @@
 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
            xmlns:cm="http://geronimo.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0">
 
-    <reference id="adminService" interface="org.apache.felix.karaf.shell.admin.AdminService" />
+    <reference id="adminService" interface="org.apache.felix.karaf.admin.AdminService" />
 
     <bean id="adminPlugin" class="org.apache.felix.karaf.webconsole.admin.AdminPlugin" init-method="start" destroy-method="stop">
         <property name="adminService" ref="adminService" />



Mime
View raw message