Skip to content

Commit

Permalink
#1568: Karaf terminal should support both Karaf 2.x and 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
davsclaus committed Sep 14, 2014
1 parent af42a7f commit b84326c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 28 deletions.
8 changes: 0 additions & 8 deletions hawtio-karaf-terminal/pom.xml
Expand Up @@ -58,14 +58,6 @@
<scope>provided</scope>
</dependency>

<!-- TODO: delete me -->
<dependency>
<groupId>org.apache.karaf.shell</groupId>
<artifactId>org.apache.karaf.shell.console</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
Expand Down
Expand Up @@ -22,6 +22,7 @@ public class KarafConsoleFactory {
private final static Logger LOG = LoggerFactory.getLogger(KarafConsoleFactory.class);

private static final String KARAF2_CONSOLE_CLASSNAME = "org.apache.karaf.shell.console.jline.Console";
private static final String KARAF3_CONSOLE_FACTORY = "org.apache.karaf.shell.console.factory.ConsoleFactory";

public static final int TERM_WIDTH = 120;
public static final int TERM_HEIGHT = 400;
Expand Down Expand Up @@ -104,7 +105,7 @@ public static Object createConsole(CommandProcessor commandProcessor,
// okay its karaf 3 then
// TODO: need to lookup the console factory and create the console!
LOG.debug("Using Karaf 3.x Console API");
ServiceReference ref = bundleContext.getServiceReference("(osgi.service.blueprint.compname=consoleFactoryService)");
ServiceReference ref = bundleContext.getServiceReference(KARAF3_CONSOLE_FACTORY);
if (ref != null) {
Object service = bundleContext.getService(ref);

Expand Down
7 changes: 0 additions & 7 deletions hawtio-system/pom.xml
Expand Up @@ -66,13 +66,6 @@
<version>${commons-codec-version}</version>
</dependency>

<!-- TODO: deleteme -->
<dependency>
<groupId>org.apache.karaf.management</groupId>
<artifactId>org.apache.karaf.management.server</artifactId>
<version>3.0.1</version>
</dependency>

<!-- testing -->
<dependency>
<groupId>io.hawt</groupId>
Expand Down
12 changes: 0 additions & 12 deletions hawtio-web/src/main/webapp/WEB-INF/web.xml
Expand Up @@ -152,18 +152,6 @@
<url-pattern>/proxy/*</url-pattern>
</servlet-mapping>

<!-- spring-batch plugin is work in progress
<servlet>
<servlet-name>springBatch</servlet-name>
<servlet-class>io.hawt.web.SpringBatchConfigServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springBatch</servlet-name>
<url-pattern>/springBatch/*</url-pattern>
</servlet-mapping>
-->

<servlet>
<servlet-name>file-upload</servlet-name>
<servlet-class>io.hawt.web.UploadServlet</servlet-class>
Expand Down

0 comments on commit b84326c

Please sign in to comment.