geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r922153 [2/2] - in /geronimo/server/trunk/plugins/aries: ./ aries-deployer/ aries-deployer/src/main/history/ aries-deployer/src/main/plan/ geronimo-aries-builder/ geronimo-aries-builder/src/main/java/org/apache/geronimo/aries/builder/ geron...
Date Fri, 12 Mar 2010 06:25:47 GMT
Added: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/StopApplication.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/StopApplication.java?rev=922153&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/StopApplication.java
(added)
+++ geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/StopApplication.java
Fri Mar 12 06:25:46 2010
@@ -0,0 +1,48 @@
+/*
+ * 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.geronimo.aries.shell;
+
+import org.apache.aries.application.management.ApplicationContext;
+import org.apache.aries.application.management.ApplicationContextManager;
+import org.apache.felix.gogo.commands.Argument;
+import org.apache.felix.gogo.commands.Command;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Command(scope = "eba", name = "stop", description = "Stop Application")
+public class StopApplication extends ApplicationCommandSupport {
+
+    @Argument(required = true, description = "Application name")
+    String applicationName;
+    
+    @Override
+    protected Object doExecute() throws Exception {
+        ApplicationContextManager contextManager = getApplicationContextManager();
+        ApplicationContext context = findApplicationContext(contextManager, applicationName);
+        if (context == null) {
+            System.out.println("EBA " + applicationName + " not found");
+        } else {
+            context.stop();
+        }
+        return null;
+    }
+
+}

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/StopApplication.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/StopApplication.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/StopApplication.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/UninstallApplication.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/UninstallApplication.java?rev=922153&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/UninstallApplication.java
(added)
+++ geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/UninstallApplication.java
Fri Mar 12 06:25:46 2010
@@ -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.
+ */
+
+package org.apache.geronimo.aries.shell;
+
+import org.apache.aries.application.management.ApplicationContext;
+import org.apache.aries.application.management.ApplicationContextManager;
+import org.apache.aries.application.management.AriesApplicationManager;
+import org.apache.felix.gogo.commands.Argument;
+import org.apache.felix.gogo.commands.Command;
+
+/**
+ * @version $Rev$ $Date$
+ */
+@Command(scope = "eba", name = "uninstall", description = "Uninstall Application")
+public class UninstallApplication extends ApplicationCommandSupport {
+
+    @Argument(required = true, description = "Application name")
+    String applicationName;
+
+    @Override
+    protected Object doExecute() throws Exception {
+        ApplicationContextManager contextManager = getApplicationContextManager();
+        ApplicationContext context = findApplicationContext(contextManager, applicationName);
+        if (context == null) {
+            System.out.println("EBA " + applicationName + " not found");
+        } else {
+            AriesApplicationManager manager = getAriesApplicationManager();
+            manager.uninstall(context);
+        }
+        return null;
+    }
+ 
+}

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/UninstallApplication.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/UninstallApplication.java
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/java/org/apache/geronimo/aries/shell/UninstallApplication.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/resources/OSGI-INF/blueprint/shell-eba.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/resources/OSGI-INF/blueprint/shell-eba.xml?rev=922153&view=auto
==============================================================================
--- geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/resources/OSGI-INF/blueprint/shell-eba.xml
(added)
+++ geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/resources/OSGI-INF/blueprint/shell-eba.xml
Fri Mar 12 06:25:46 2010
@@ -0,0 +1,41 @@
+<?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"
+           default-activation="lazy">
+
+    <command-bundle xmlns="http://felix.apache.org/karaf/xmlns/shell/v1.0.0">
+        <command name="eba/install">
+            <action class="org.apache.geronimo.aries.shell.InstallApplication"></action>
+        </command>
+        <command name="eba/uninstall">
+            <action class="org.apache.geronimo.aries.shell.UninstallApplication"></action>
+        </command>
+        <command name="eba/list">
+            <action class="org.apache.geronimo.aries.shell.ListApplication"></action>
+        </command>
+        <command name="eba/start">
+            <action class="org.apache.geronimo.aries.shell.StartApplication"></action>
+        </command>
+        <command name="eba/stop">
+            <action class="org.apache.geronimo.aries.shell.StopApplication"></action>
+        </command>
+    </command-bundle>
+
+</blueprint>

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/resources/OSGI-INF/blueprint/shell-eba.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/resources/OSGI-INF/blueprint/shell-eba.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/plugins/aries/geronimo-aries-shell/src/main/resources/OSGI-INF/blueprint/shell-eba.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: geronimo/server/trunk/plugins/aries/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/aries/pom.xml?rev=922153&r1=922152&r2=922153&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/aries/pom.xml (original)
+++ geronimo/server/trunk/plugins/aries/pom.xml Fri Mar 12 06:25:46 2010
@@ -38,7 +38,33 @@
     
     <modules>
         <module>geronimo-aries-builder</module>
+        <module>geronimo-aries-shell</module>
         <module>aries-deployer</module>
     </modules>
 
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.aries.application</groupId>
+                <artifactId>org.apache.aries.application.utils</artifactId>
+                <version>0.1-incubating-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.application</groupId>
+                <artifactId>org.apache.aries.application.api</artifactId>
+                <version>0.1-incubating-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.application</groupId>
+                <artifactId>org.apache.aries.application.management</artifactId>
+                <version>0.1-incubating-SNAPSHOT</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.application</groupId>
+                <artifactId>org.apache.aries.application.resolver.obr</artifactId>
+                <version>0.1-incubating-SNAPSHOT</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
 </project>



Mime
View raw message