Author: iocanel
Date: Sat Jun 23 20:53:55 2012
New Revision: 1353201
URL: http://svn.apache.org/viewvc?rev=1353201&view=rev
Log:
[KARAF-1586] wrapper:install is now discoverable and usable outside OSGi.
Added:
karaf/trunk/wrapper/command/src/main/resources/META-INF/
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/apache/
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/apache/karaf/
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/apache/karaf/shell/
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/apache/karaf/shell/commands
Modified:
karaf/trunk/assemblies/apache-karaf-minimal/pom.xml
karaf/trunk/assemblies/apache-karaf/pom.xml
karaf/trunk/wrapper/command/src/main/java/org/apache/karaf/wrapper/commands/Install.java
Modified: karaf/trunk/assemblies/apache-karaf-minimal/pom.xml
URL:
http://svn.apache.org/viewvc/karaf/trunk/assemblies/apache-karaf-minimal/pom.xml?rev=1353201&r1=1353200&r2=1353201&view=diff
==============================================================================
--- karaf/trunk/assemblies/apache-karaf-minimal/pom.xml (original)
+++ karaf/trunk/assemblies/apache-karaf-minimal/pom.xml Sat Jun 23 20:53:55 2012
@@ -114,6 +114,9 @@
</execution>
</executions>
<configuration>
+ <installedFeatures>
+ <feature>wrapper</feature>
+ </installedFeatures>
<bootFeatures>
<feature>framework</feature>
</bootFeatures>
Modified: karaf/trunk/assemblies/apache-karaf/pom.xml
URL:
http://svn.apache.org/viewvc/karaf/trunk/assemblies/apache-karaf/pom.xml?rev=1353201&r1=1353200&r2=1353201&view=diff
==============================================================================
--- karaf/trunk/assemblies/apache-karaf/pom.xml (original)
+++ karaf/trunk/assemblies/apache-karaf/pom.xml Sat Jun 23 20:53:55 2012
@@ -174,6 +174,9 @@
</execution>
</executions>
<configuration>
+ <installedFeatures>
+ <feature>wrapper</feature>
+ </installedFeatures>
<bootFeatures>
<feature>standard</feature>
<feature>management</feature>
Modified:
karaf/trunk/wrapper/command/src/main/java/org/apache/karaf/wrapper/commands/Install.java
URL:
http://svn.apache.org/viewvc/karaf/trunk/wrapper/command/src/main/java/org/apache/karaf/wrapper/commands/Install.java?rev=1353201&r1=1353200&r2=1353201&view=diff
==============================================================================
---
karaf/trunk/wrapper/command/src/main/java/org/apache/karaf/wrapper/commands/Install.java
(original)
+++
karaf/trunk/wrapper/command/src/main/java/org/apache/karaf/wrapper/commands/Install.java
Sat Jun 23 20:53:55 2012
@@ -18,8 +18,10 @@ package org.apache.karaf.wrapper.command
import org.apache.karaf.shell.commands.Command;
import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.console.AbstractAction;
import org.apache.karaf.shell.console.OsgiCommandSupport;
import org.apache.karaf.wrapper.WrapperService;
+import org.apache.karaf.wrapper.internal.WrapperServiceImpl;
import org.fusesource.jansi.Ansi;
import java.io.File;
@@ -28,7 +30,7 @@ import java.io.File;
* Installs the Karaf instance as a service in your operating system.
*/
@Command(scope = "wrapper", name = "install", description = "Install the
container as a system service in the OS.")
-public class Install extends OsgiCommandSupport {
+public class Install extends AbstractAction {
@Option(name = "-n", aliases = {"--name"}, description = "The service name
that will be used when installing the service. (Default: karaf)", required =
false, multiValued = false)
private String name = "karaf";
@@ -42,7 +44,7 @@ public class Install extends OsgiCommand
@Option(name = "-s", aliases = {"--start-type"}, description = "Mode in
which the service is installed. AUTO_START or DEMAND_START (Default:
AUTO_START)", required = false, multiValued = false)
private String startType = "AUTO_START";
- private WrapperService wrapperService;
+ private WrapperService wrapperService = new WrapperServiceImpl();
public void setWrapperService(WrapperService wrapperService) {
this.wrapperService = wrapperService;
Added:
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/apache/karaf/shell/commands
URL:
http://svn.apache.org/viewvc/karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/apache/karaf/shell/commands?rev=1353201&view=auto
==============================================================================
---
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/apache/karaf/shell/commands
(added)
+++
karaf/trunk/wrapper/command/src/main/resources/META-INF/services/org/apache/karaf/shell/commands
Sat Jun 23 20:53:55 2012
@@ -0,0 +1,17 @@
+##---------------------------------------------------------------------------
+## 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.
+##---------------------------------------------------------------------------
+org.apache.karaf.wrapper.commands.Install
\ No newline at end of file