Skip to content

Commit b31f419

Browse files
committed
Upgrade to sbt 0.12.1, sshj 0.8.1, slf4j 1.7.2, specs2 1.12.2 and cross-building to Scala 2.10.0-RC1
1 parent d01d24d commit b31f419

File tree

4 files changed

+20
-22
lines changed

4 files changed

+20
-22
lines changed

build.sbt

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name := "scala-ssh"
22

3-
version := "0.6.2"
3+
version := "0.6.3-SNAPSHOT"
44

55
organization := "com.decodified"
66

@@ -16,14 +16,19 @@ licenses := Seq("Apache 2" -> new URL("http://www.apache.org/licenses/LICENSE-2.
1616

1717
scalaVersion := "2.9.2"
1818

19-
scalacOptions := Seq("-deprecation", "-encoding", "utf8")
19+
scalacOptions <<= scalaVersion map {
20+
case x if x startsWith "2.9" =>
21+
Seq("-unchecked", "-deprecation", "-encoding", "utf8")
22+
case x if x startsWith "2.10" =>
23+
Seq("-feature", "-language:implicitConversions", "-unchecked", "-deprecation", "-encoding", "utf8")
24+
}
2025

2126
libraryDependencies ++= Seq(
22-
"net.schmizz" % "sshj" % "0.8.0",
23-
"org.slf4j" % "slf4j-api" % "1.6.4",
27+
"net.schmizz" % "sshj" % "0.8.1",
28+
"org.slf4j" % "slf4j-api" % "1.7.2",
2429
"org.bouncycastle" % "bcprov-jdk16" % "1.46" % "provided",
2530
"com.jcraft" % "jzlib" % "1.1.1" % "provided",
26-
"org.specs2" %% "specs2" % "1.10" % "test",
31+
"org.specs2" %% "specs2" % "1.12.2" % "test",
2732
"ch.qos.logback" % "logback-classic" % "1.0.3" % "test"
2833
)
2934

@@ -32,16 +37,16 @@ libraryDependencies ++= Seq(
3237
// publishing
3338
///////////////
3439

35-
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials")
40+
crossScalaVersions := Seq("2.9.2", "2.10.0-RC1")
3641

37-
publishMavenStyle := true
42+
scalaBinaryVersion <<= scalaVersion(sV => if (CrossVersion.isStable(sV)) CrossVersion.binaryScalaVersion(sV) else sV)
3843

39-
crossPaths := false
44+
publishMavenStyle := true
4045

4146
publishTo <<= version { version =>
4247
Some {
43-
"spray nexus" at {
44-
// public uri is repo.spray.cc, we use an SSH tunnel to the nexus here
48+
"spray repo" at {
49+
// public uri is repo.spray.io, we use an SSH tunnel to the nexus here
4550
"http://localhost:42424/content/repositories/" + {
4651
if (version.trim.endsWith("SNAPSHOT")) "snapshots/" else"releases/"
4752
}
@@ -60,4 +65,4 @@ seq(lsSettings:_*)
6065

6166
(LsKeys.docsUrl in LsKeys.lsync) := Some(new URL("https://github.com/sirthias/scala-ssh/"))
6267

63-
(externalResolvers in LsKeys.lsync) := Seq("spray repo" at "http://repo.spray.cc")
68+
(externalResolvers in LsKeys.lsync) := Seq("spray repo" at "http://repo.spray.io")

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=0.11.3
1+
sbt.version=0.12.1

project/plugins.sbt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.1")
2-
3-
resolvers ++= Seq(
4-
Resolver.url("sbt-plugin-releases", new URL(
5-
"http://scalasbt.artifactoryonline.com/scalasbt/sbt-plugin-releases/"))(
6-
Resolver.ivyStylePatterns),
7-
"coda" at "http://repo.codahale.com"
8-
)
1+
addSbtPlugin("me.lessis" % "ls-sbt" % "0.1.2")

src/main/scala/com/decodified/scalassh/SshClient.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class SshClient(val config: HostConfig) {
3232
def exec(command: Command): Validated[CommandResult] = {
3333
authenticatedClient.right.flatMap { client =>
3434
startSession(client).right.flatMap { session =>
35-
log.info("Executing SSH command on {}: \"{}\"", endpoint, command.command)
35+
log.info("Executing SSH command on {}: \"{}\"", Seq(endpoint, command.command): _*)
3636
protect("Could not execute SSH command on") {
3737
val channel = session.exec(command.command)
3838
command.input.inputStream.foreach(new StreamCopier().copy(_, channel.getOutputStream))
@@ -88,7 +88,7 @@ class SshClient(val config: HostConfig) {
8888
}
8989

9090
require(client.isConnected && !client.isAuthenticated)
91-
log.info("Authenticating to {} using {} ...", endpoint, config.login)
91+
log.info("Authenticating to {} using {} ...", Seq(endpoint, config.login): _*)
9292
config.login match {
9393
case PasswordLogin(user, passProducer) =>
9494
protect("Could not authenticate (with password) to") {

0 commit comments

Comments
 (0)