changeset 702:992fa84e7885

Reference ssh-dependant class by the fq name to avoid runtime dependency from the ssh library
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 08 Aug 2013 21:32:22 +0200
parents 02766745dbe6
children 7839ff0bfd78
files build.xml src/org/tmatesoft/hg/internal/remote/RemoteConnectorDescriptor.java
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/build.xml	Thu Aug 08 21:05:21 2013 +0200
+++ b/build.xml	Thu Aug 08 21:32:22 2013 +0200
@@ -26,8 +26,8 @@
 	</description>
 
 	<property name="junit.jar" value="lib/junit-4.8.2.jar" />
-	<property name="ssh.jar" value="lib/ganymed-ssh2-build251beta1.jar" />
-	<property name="ver.qualifier" value="" />
+	<property name="ssh.jar" value="lib/trilead-ssh2-1.0.0-build217.jar" />
+	<property name="ver.qualifier" value="m2" />
 	<property name="version.lib" value="1.2" />
 	<property name="version.jar" value="${version.lib}${ver.qualifier}" />
 	<property name="compile-with-debug" value="yes"/>
@@ -129,6 +129,7 @@
 			<fileset dir="test/" includes="org/tmatesoft/hg/**" />
 			<fileset dir="cmdline/" includes="org/tmatesoft/hg/**" />
 			<fileset file="COPYING"/>
+			<fileset file="LICENSE-TRILEAD.txt"/>
 		</jar>
 	</target>
 	
@@ -159,6 +160,7 @@
 				<include name="org/tmatesoft/hg/internal/**" />
 			</fileset>
 			<fileset file="COPYING"/>
+			<fileset file="LICENSE-TRILEAD.txt"/>
 		</jar>
 	</target>
 
--- a/src/org/tmatesoft/hg/internal/remote/RemoteConnectorDescriptor.java	Thu Aug 08 21:05:21 2013 +0200
+++ b/src/org/tmatesoft/hg/internal/remote/RemoteConnectorDescriptor.java	Thu Aug 08 21:32:22 2013 +0200
@@ -84,8 +84,7 @@
 			final ClassLoader cl = Provider.class.getClassLoader();
 			knownConnectors.put("http", new Pair<ClassLoader, String>(cl, HttpConnector.class.getName()));
 			knownConnectors.put("https", new Pair<ClassLoader, String>(cl, HttpConnector.class.getName()));
-			 // FIXME replace SshConnector.class with fqn string to avoid dependency from the trilead library in runtime
-			knownConnectors.put("ssh", new Pair<ClassLoader, String>(cl, SshConnector.class.getName()));
+			knownConnectors.put("ssh", new Pair<ClassLoader, String>(cl, "org.tmatesoft.hg.internal.remote.SshConnector"));
 		}
 
 		public HgRemoteRepository.RemoteDescriptor get(SessionContext ctx, URI uri) {