Skip to content

Commit 644ab5d

Browse files
authored
Merge pull request #10 from mmolimar/develop
Release 1.0 with KSQL 5.1.X
2 parents 073101b + 41788c8 commit 644ab5d

31 files changed

+2978
-960
lines changed

.travis.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,3 @@
1-
before_install:
2-
- git clone https://github.com/confluentinc/common.git
3-
- cd common
4-
- git checkout v4.1.0-rc3
5-
- mv pom.xml pom.xml.bak && sed '58s/.*/ <kafka.version>1.1.0<\/kafka.version>/' pom.xml.bak > pom.xml
6-
- mvn -B clean install -Dmaven.test.skip=true
7-
- cd ..
8-
- git clone https://github.com/confluentinc/support-metrics-common.git
9-
- cd support-metrics-common
10-
- git checkout v4.1.0-rc3
11-
- mvn -B clean install -Dmaven.test.skip=true
12-
- cd ..
13-
- git clone https://github.com/confluentinc/rest-utils.git
14-
- cd rest-utils
15-
- git checkout v4.1.0-rc3
16-
- mvn -B clean install -Dmaven.test.skip=true
17-
- cd ..
18-
- git clone https://github.com/confluentinc/schema-registry.git
19-
- cd schema-registry
20-
- git checkout v4.1.0-rc3
21-
- mvn -B clean install -Dmaven.test.skip=true
22-
- cd ..
23-
- git clone https://github.com/confluentinc/ksql.git
24-
- cd ksql
25-
- git checkout v4.1.0-rc3
26-
- ex -sc '55d7|x' ksql-cli/pom.xml && ex -sc '37d7|x' ksql-engine/pom.xml && ex -sc '25d7|x' ksql-parser/pom.xml && ex -sc '84d7|x' ksql-rest-app/pom.xml && ex -sc '37d7|x' ksql-tools/pom.xml
27-
- mvn -B clean install -Dmaven.test.skip=true
28-
- cd ..
291
script:
302
- sbt clean coverage test it:test coverageReport && sbt coverageAggregate
313
after_success:

README.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,17 @@ perform queries to Kafka and then, the engine translates those requests to Kafka
1010

1111
### Building from source ###
1212

13-
First of all, the KSQL lib has to be installed into your local repo.
14-
15-
So, cloning the KSQL repo:
16-
17-
``git clone https://github.com/confluentinc/ksql.git && cd ksql && git checkout v4.1.0-rc3``
18-
19-
and installing it:
20-
21-
``mvn clean install -Dmaven.skip.test=true``
22-
23-
Probably, you'll have to do the same things for these Confluent projects (previous to the KSQL project installation):
24-
* [Confluent common](https://github.com/confluentinc/common.git)
25-
* [Confluent support-metrics-common](https://github.com/confluentinc/support-metrics-common.git)
26-
* [Confluent rest-utils](https://github.com/confluentinc/rest-utils.git)
27-
* [Confluent schema-registry](https://github.com/confluentinc/schema-registry.git)
28-
29-
Once you did that, just have to clone the ksql-jdbc-driver repo and package it:
13+
Just clone the ksql-jdbc-driver repo and package it:
3014

3115
``git clone https://github.com/mmolimar/ksql-jdbc-driver.git && cd ksql-jdbc-driver``
3216

3317
``sbt clean package``
3418

19+
If you want to build a fat jar containing both classes and dependencies -for instance, to use it in a
20+
JDBC client such as [SQuirrel SQL](http://squirrel-sql.sourceforge.net/) or whichever-, type the following:
21+
22+
``sbt clean assembly``
23+
3524
### Running tests ###
3625

3726
To run unit and integration tests, execute the following:
@@ -66,6 +55,8 @@ where:
6655
* **\<propertyN>**: are the custom client properties (optionals). Available properties:
6756
* ``secured``: sets if the KSQL connection is secured or not. It's a boolean (``true``|``false``) and its default
6857
value is ``false``.
58+
* ``properties``: enables to set in KSQL extra properties from the JDBC URL. It's a boolean (``true``|``false``)
59+
and its default value is ``false``.
6960
* ``timeout``: sets the max wait time between each message when receiving them. It's a long and its default
7061
value is ``0`` which means that is infinite.
7162

@@ -81,4 +72,4 @@ where:
8172

8273
## License
8374

84-
Released under the Apache License, version 2.0.
75+
Released under the Apache License, version 2.0.

build.sbt

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name := "ksql-jdbc-driver"
22

3-
version := "0.2"
3+
version := "1.0"
44

55
initialize := {
6-
assert(Integer.parseInt(sys.props("java.specification.version").split("\\.")(1)) >= 7, "Java 7 or above required")
6+
assert(Integer.parseInt(sys.props("java.specification.version").split("\\.")(1)) >= 8, "Java 8 or above required")
77
}
88

99
scalaVersion := "2.11.11"
@@ -12,8 +12,17 @@ resolvers += "Confluent Maven Repo" at "http://packages.confluent.io/maven/"
1212
resolvers += "Confluent Snapshots Maven Repo" at "https://s3-us-west-2.amazonaws.com/confluent-snapshots/"
1313
resolvers += Resolver.mavenLocal
1414

15-
libraryDependencies += "io.confluent.ksql" % "ksql-rest-app" % "4.1.0"
16-
libraryDependencies += "org.apache.kafka" %% "kafka" % "1.1.0" % "test"
15+
libraryDependencies += "io.confluent.ksql" % "ksql-rest-app" % "5.1.2"
16+
libraryDependencies += "org.apache.kafka" %% "kafka" % "2.1.1" % "test"
1717
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % "test"
1818
libraryDependencies += "org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test"
19+
libraryDependencies += "javax.ws.rs" % "javax.ws.rs-api" % "2.1.1" artifacts (Artifact("javax.ws.rs-api", "jar", "jar"))
1920

21+
assemblyMergeStrategy in assembly := {
22+
case PathList("javax", "inject", xs@_*) => MergeStrategy.first
23+
case "module-info.class" => MergeStrategy.discard
24+
case "log4j.properties" => MergeStrategy.discard
25+
case x =>
26+
val oldStrategy = (assemblyMergeStrategy in assembly).value
27+
oldStrategy(x)
28+
}

project/Build.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ object KsqlJdbcBuild extends Build {
44
lazy val root = Project("root", file("."))
55
.configs(Configs.all: _*)
66
.settings(Testing.settings: _*)
7-
}
7+
}

project/Configs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ import sbt._
33
object Configs {
44
val IntegrationTest = config("it") extend (Test)
55
val all = Seq(IntegrationTest)
6-
}
6+
}

project/PackagingTypePlugin.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import sbt._
2+
3+
object PackagingTypePlugin extends AutoPlugin {
4+
override val buildSettings = {
5+
sys.props += "packaging.type" -> "jar"
6+
Nil
7+
}
8+
}

project/Testing.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ object Testing {
2323
testAll <<= testAll.dependsOn(test in IntegrationTest),
2424
testAll <<= testAll.dependsOn(test in Test)
2525
)
26-
}
26+
}

project/plugins.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
logLevel := Level.Warn
22

33
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
4-
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.2")
4+
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.2")
5+
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")

0 commit comments

Comments
 (0)