mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 21:31:53 +01:00
Fix "openhab --help" and "help openhab" in Karaf console (#2953)
* Enable "openhab --help" and "help openhab" in Karaf console Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
910047355c
commit
b52d9f2e4f
1
bundles/org.openhab.core.io.console.karaf/bnd.bnd
Normal file
1
bundles/org.openhab.core.io.console.karaf/bnd.bnd
Normal file
@ -0,0 +1 @@
|
||||
Karaf-Commands: org.openhab.core.io.console.karaf.internal
|
@ -26,6 +26,12 @@
|
||||
<artifactId>org.openhab.core.io.console</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.karaf.wrapper</groupId>
|
||||
<artifactId>org.apache.karaf.wrapper.core</artifactId>
|
||||
<version>${karaf.compile.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -14,7 +14,6 @@ package org.openhab.core.io.console.karaf.internal;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.karaf.shell.api.action.Action;
|
||||
import org.apache.karaf.shell.api.action.lifecycle.Reference;
|
||||
@ -66,7 +65,7 @@ public class CommandWrapper implements Command, Action {
|
||||
|
||||
@Override
|
||||
public Object execute(Session session, List<Object> argList) throws Exception {
|
||||
String[] args = argList.stream().map(a -> a.toString()).collect(Collectors.toList()).toArray(new String[0]);
|
||||
String[] args = argList.stream().map(Object::toString).toArray(String[]::new);
|
||||
|
||||
final Console console = new OSGiConsole(getScope(), session.getConsole());
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
*
|
||||
* SPDX-License-Identifier: EPL-2.0
|
||||
*/
|
||||
package org.openhab.core.karaf.internal.command;
|
||||
package org.openhab.core.io.console.karaf.internal;
|
||||
|
||||
import static org.apache.karaf.shell.support.ansi.SimpleAnsi.*;
|
||||
|
@ -1,2 +0,0 @@
|
||||
Bundle-SymbolicName: ${project.artifactId}
|
||||
Karaf-Commands: org.openhab.core.karaf.internal.command
|
@ -43,12 +43,6 @@
|
||||
<version>${karaf.compile.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.karaf.wrapper</groupId>
|
||||
<artifactId>org.apache.karaf.wrapper.core</artifactId>
|
||||
<version>${karaf.compile.version}</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.karaf.jaas</groupId>
|
||||
<artifactId>org.apache.karaf.jaas.modules</artifactId>
|
||||
|
@ -116,6 +116,7 @@
|
||||
<feature name="openhab-core-io-console-karaf" description="Karaf Console support for SmartHome stuff" version="${project.version}">
|
||||
<feature>openhab-core-base</feature>
|
||||
<feature>shell</feature>
|
||||
<feature>service-wrapper</feature>
|
||||
<bundle>mvn:org.openhab.core.bundles/org.openhab.core.io.console.karaf/${project.version}</bundle>
|
||||
</feature>
|
||||
|
||||
|
@ -14,4 +14,4 @@ org.openhab.core.ui.internal.proxy.ProxyServletService=AvoidCatchingThrowable
|
||||
org.openhab.core.automation.internal.RuleEngineImpl=AvoidCatchingThrowable
|
||||
org.openhab.core.automation.internal.RuleRegistryImpl=CompareObjectsWithEquals
|
||||
org.openhab.core.automation.internal.provider.AutomationResourceBundlesEventQueue=AvoidCatchingThrowable
|
||||
org.openhab.core.karaf.internal.command.InstallServiceCommand=SystemPrintln
|
||||
org.openhab.core.io.console.karaf.internal.InstallServiceCommand=SystemPrintln
|
||||
|
Loading…
Reference in New Issue
Block a user