34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
diff --git a/plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/jline/JLineInputHandler.java b/plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/jline/JLineInputHandler.java
|
|
index 93c8bd6..068a6e4 100644
|
|
--- a/plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/jline/JLineInputHandler.java
|
|
+++ b/plexus-interactivity-api/src/main/java/org/codehaus/plexus/components/interactivity/jline/JLineInputHandler.java
|
|
@@ -28,9 +28,8 @@ import javax.inject.Named;
|
|
|
|
import java.io.IOException;
|
|
|
|
+import jline.console.ConsoleReader;
|
|
import org.codehaus.plexus.components.interactivity.AbstractInputHandler;
|
|
-import org.jline.reader.LineReader;
|
|
-import org.jline.reader.LineReaderBuilder;
|
|
|
|
/**
|
|
* Default input handler, that uses the console.
|
|
@@ -39,7 +38,16 @@ import org.jline.reader.LineReaderBuilder;
|
|
*/
|
|
@Named("jline")
|
|
public class JLineInputHandler extends AbstractInputHandler {
|
|
- private final LineReader consoleReader = LineReaderBuilder.builder().build();
|
|
+ private final ConsoleReader consoleReader;
|
|
+
|
|
+ public JLineInputHandler() {
|
|
+ ConsoleReader cr = null;
|
|
+ try {
|
|
+ cr = new ConsoleReader();
|
|
+ } catch (IOException e) {
|
|
+ }
|
|
+ this.consoleReader = cr;
|
|
+ }
|
|
|
|
public String readLine() throws IOException {
|
|
return consoleReader.readLine();
|