Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
minor fix to handle error when connect is now
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Stevenson committed Sep 12, 2017
1 parent 55fad2c commit b28f7b7
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions README.md
@@ -1,13 +1,13 @@
[![Build Status](https://travis-ci.org/datamountaineer/kafka-connect-tools.svg?branch=master)](https://travis-ci.org/datamountaineer/kafka-connect-tools)
[<img src="https://img.shields.io/badge/latest%20release-v1.0.2-blue.svg?label=latest%20release"/>](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22kafka-connect-cli%22)
[<img src="https://img.shields.io/badge/latest%20release-v1.0.3-blue.svg?label=latest%20release"/>](http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22kafka-connect-cli%22)

Connect tools is Maven

```bash
<dependency>
<groupId>com.datamountaineer</groupId>
<artifactId>kafka-connect-cli</artifactId>
<version>1.0.2</version>
<version>1.0.3</version>
</dependency>
```

Expand All @@ -27,7 +27,7 @@ out of band info to `stderr` and non-zero exit status on error. Commands
dealing with configuration expect or produce data in .properties
style: `key=value` lines and comments start with a `#`.

connect-cli 1.0.2
connect-cli 1.0.3
Usage: connect-cli [ps|get|rm|create|run|status|plugins|describe|validate|restart|pause|resume] [options] [<connector-name>]

--help
Expand Down
4 changes: 4 additions & 0 deletions build.gradle
Expand Up @@ -121,6 +121,10 @@ tasks.withType(Jar) {
}
}

task buildCli(type: Exec, dependsOn: [shadowJar]) {
commandLine "bin/package.sh", version
}

if (project.hasProperty('release')) {

// OSSRH publication
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
@@ -1,3 +1,3 @@
version=1.0.2
version=1.0.3
ossrhUsername=you
ossrhPassword=me
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Mon Oct 24 14:21:25 CEST 2016
#Mon Sep 11 21:53:55 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip
Expand Up @@ -99,7 +99,7 @@ class PropertiesFormatter extends Formatter {
val str = errors.mkString("\n")
s"${json}\n${Console.RED}Validation failed.\n$str\n${Console.RESET}"
} else {
s"${Console.GREEN} ${s.name} \n No validation errors. ${Console.YELLOW} \n\t${props.mkString("\n\t")} ${Console.RESET}"
s"${Console.GREEN} ${s.name} \n No validation errors. ${Console.YELLOW}${Console.RESET}"
}
}
case false => s"${Console.YELLOW} ${s.toJson.prettyPrint} ${Console.RESET}"
Expand Down
Expand Up @@ -41,6 +41,10 @@ object ScalajHttpClient extends HttpClient {
case resp => Success((resp.code, Some(resp.body)))
}
} catch {
case c: java.net.ConnectException => {
println(c.getMessage)
Success(404, Some(""))
}
case e: Throwable => Failure(e)
}
}
Expand Down

0 comments on commit b28f7b7

Please sign in to comment.