Upgrade to SSHD 1.2.0
Move ssh / telnet support to test
Fix exported packages
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1736060 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/gogo/jline/pom.xml b/gogo/jline/pom.xml
index 11167dd..e1e4f75 100644
--- a/gogo/jline/pom.xml
+++ b/gogo/jline/pom.xml
@@ -60,8 +60,9 @@
<dependency>
<groupId>org.apache.sshd</groupId>
<artifactId>sshd-core</artifactId>
- <version>1.0.0</version>
+ <version>1.2.0</version>
<optional>true</optional>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
@@ -74,7 +75,7 @@
<configuration>
<instructions>
<Export-Package>
- *
+ org.apache.felix.gogo.jline
</Export-Package>
<Import-Package>
*
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Activator.java b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Activator.java
index d9312a9..82d0496 100644
--- a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Activator.java
+++ b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Activator.java
@@ -28,7 +28,6 @@
import java.util.concurrent.TimeUnit;
import org.apache.felix.gogo.jline.Shell.Context;
-import org.apache.felix.gogo.jline.telnet.Telnet;
import org.apache.felix.service.command.CommandProcessor;
import org.apache.felix.service.command.CommandSession;
import org.apache.felix.service.command.Converter;
@@ -103,9 +102,6 @@
dict.put(CommandProcessor.COMMAND_FUNCTION, Posix.functions);
regs.add(context.registerService(Posix.class.getName(), new Posix(processor), dict));
- dict.put(CommandProcessor.COMMAND_FUNCTION, Telnet.functions);
- regs.add(context.registerService(Telnet.class.getName(), new Telnet(processor), dict));
-
Shell shell = new Shell(new ShellContext(), processor);
dict.put(CommandProcessor.COMMAND_FUNCTION, Shell.functions);
regs.add(context.registerService(Shell.class.getName(), shell, dict));
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Main.java b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Main.java
index 8064192..d2df064 100644
--- a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Main.java
+++ b/gogo/jline/src/main/java/org/apache/felix/gogo/jline/Main.java
@@ -23,8 +23,6 @@
import java.io.PrintStream;
import org.apache.felix.gogo.jline.Shell.Context;
-import org.apache.felix.gogo.jline.ssh.Ssh;
-import org.apache.felix.gogo.jline.telnet.Telnet;
import org.apache.felix.gogo.runtime.CommandProcessorImpl;
import org.apache.felix.gogo.runtime.threadio.ThreadIOImpl;
import org.apache.felix.service.command.CommandSession;
@@ -57,6 +55,7 @@
register(processor, new Procedural(), Procedural.functions);
register(processor, new Posix(processor), Posix.functions);
register(processor, shell, Shell.functions);
+ /*
try {
register(processor, new Telnet(processor), Telnet.functions);
} catch (Throwable t) {
@@ -67,6 +66,7 @@
} catch (Throwable t) {
// ignore
}
+ */
CommandSession session = processor.createSession(terminal.input(), terminal.output(), terminal.output());
session.put(Shell.VAR_CONTEXT, context);
session.put(Shell.VAR_TERMINAL, terminal);
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/ShellCommand.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/ShellCommand.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/ShellCommand.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/ShellCommand.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/ShellCommandFactory.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/ShellCommandFactory.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/ShellCommandFactory.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/ShellCommandFactory.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/ShellFactoryImpl.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/ShellFactoryImpl.java
similarity index 99%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/ShellFactoryImpl.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/ShellFactoryImpl.java
index b50cec7..8221cbb 100644
--- a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/ShellFactoryImpl.java
+++ b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/ShellFactoryImpl.java
@@ -36,7 +36,6 @@
import org.apache.sshd.server.ExitCallback;
import org.apache.sshd.server.SessionAware;
import org.apache.sshd.server.Signal;
-import org.apache.sshd.server.SignalListener;
import org.apache.sshd.server.session.ServerSession;
import org.jline.terminal.Attributes;
import org.jline.terminal.Attributes.ControlChar;
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/Ssh.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/Ssh.java
similarity index 98%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/Ssh.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/Ssh.java
index 72e7ac1..aee3abd 100644
--- a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/ssh/Ssh.java
+++ b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/ssh/Ssh.java
@@ -28,8 +28,8 @@
import org.apache.sshd.server.Command;
import org.apache.sshd.server.ServerBuilder;
import org.apache.sshd.server.SshServer;
-import org.apache.sshd.server.command.ScpCommandFactory;
import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider;
+import org.apache.sshd.server.scp.ScpCommandFactory;
import org.apache.sshd.server.subsystem.sftp.SftpSubsystemFactory;
import org.jline.builtins.Options;
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/BootException.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/BootException.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/BootException.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/BootException.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/Connection.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/Connection.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/Connection.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/Connection.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionData.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionData.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionData.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionData.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionEvent.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionEvent.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionEvent.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionEvent.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionFilter.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionFilter.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionFilter.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionFilter.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionListener.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionListener.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionListener.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionListener.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionManager.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionManager.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/ConnectionManager.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/ConnectionManager.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/PortListener.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/PortListener.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/PortListener.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/PortListener.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/Telnet.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/Telnet.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/Telnet.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/Telnet.java
diff --git a/gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/TelnetIO.java b/gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/TelnetIO.java
similarity index 100%
rename from gogo/jline/src/main/java/org/apache/felix/gogo/jline/telnet/TelnetIO.java
rename to gogo/jline/src/test/java/org/apache/felix/gogo/jline/telnet/TelnetIO.java