Skip to content

Commit

Permalink
Merge pull request #10 from mmolimar/develop
Browse files Browse the repository at this point in the history
Release 1.0 with KSQL 5.1.X
  • Loading branch information
mmolimar authored Feb 27, 2019
2 parents 073101b + 41788c8 commit 644ab5d
Show file tree
Hide file tree
Showing 31 changed files with 2,978 additions and 960 deletions.
28 changes: 0 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,3 @@
before_install:
- git clone https://github.com/confluentinc/common.git
- cd common
- git checkout v4.1.0-rc3
- mv pom.xml pom.xml.bak && sed '58s/.*/ <kafka.version>1.1.0<\/kafka.version>/' pom.xml.bak > pom.xml
- mvn -B clean install -Dmaven.test.skip=true
- cd ..
- git clone https://github.com/confluentinc/support-metrics-common.git
- cd support-metrics-common
- git checkout v4.1.0-rc3
- mvn -B clean install -Dmaven.test.skip=true
- cd ..
- git clone https://github.com/confluentinc/rest-utils.git
- cd rest-utils
- git checkout v4.1.0-rc3
- mvn -B clean install -Dmaven.test.skip=true
- cd ..
- git clone https://github.com/confluentinc/schema-registry.git
- cd schema-registry
- git checkout v4.1.0-rc3
- mvn -B clean install -Dmaven.test.skip=true
- cd ..
- git clone https://github.com/confluentinc/ksql.git
- cd ksql
- git checkout v4.1.0-rc3
- 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
- mvn -B clean install -Dmaven.test.skip=true
- cd ..
script:
- sbt clean coverage test it:test coverageReport && sbt coverageAggregate
after_success:
Expand Down
27 changes: 9 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,17 @@ perform queries to Kafka and then, the engine translates those requests to Kafka

### Building from source ###

First of all, the KSQL lib has to be installed into your local repo.

So, cloning the KSQL repo:

``git clone https://github.com/confluentinc/ksql.git && cd ksql && git checkout v4.1.0-rc3``

and installing it:

``mvn clean install -Dmaven.skip.test=true``

Probably, you'll have to do the same things for these Confluent projects (previous to the KSQL project installation):
* [Confluent common](https://github.com/confluentinc/common.git)
* [Confluent support-metrics-common](https://github.com/confluentinc/support-metrics-common.git)
* [Confluent rest-utils](https://github.com/confluentinc/rest-utils.git)
* [Confluent schema-registry](https://github.com/confluentinc/schema-registry.git)

Once you did that, just have to clone the ksql-jdbc-driver repo and package it:
Just clone the ksql-jdbc-driver repo and package it:

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

``sbt clean package``

If you want to build a fat jar containing both classes and dependencies -for instance, to use it in a
JDBC client such as [SQuirrel SQL](http://squirrel-sql.sourceforge.net/) or whichever-, type the following:

``sbt clean assembly``

### Running tests ###

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

Expand All @@ -81,4 +72,4 @@ where:

## License

Released under the Apache License, version 2.0.
Released under the Apache License, version 2.0.
17 changes: 13 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name := "ksql-jdbc-driver"

version := "0.2"
version := "1.0"

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

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

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

assemblyMergeStrategy in assembly := {
case PathList("javax", "inject", xs@_*) => MergeStrategy.first
case "module-info.class" => MergeStrategy.discard
case "log4j.properties" => MergeStrategy.discard
case x =>
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
2 changes: 1 addition & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ object KsqlJdbcBuild extends Build {
lazy val root = Project("root", file("."))
.configs(Configs.all: _*)
.settings(Testing.settings: _*)
}
}
2 changes: 1 addition & 1 deletion project/Configs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import sbt._
object Configs {
val IntegrationTest = config("it") extend (Test)
val all = Seq(IntegrationTest)
}
}
8 changes: 8 additions & 0 deletions project/PackagingTypePlugin.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import sbt._

object PackagingTypePlugin extends AutoPlugin {
override val buildSettings = {
sys.props += "packaging.type" -> "jar"
Nil
}
}
2 changes: 1 addition & 1 deletion project/Testing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ object Testing {
testAll <<= testAll.dependsOn(test in IntegrationTest),
testAll <<= testAll.dependsOn(test in Test)
)
}
}
3 changes: 2 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
logLevel := Level.Warn

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.2")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.2")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.9")
Loading

0 comments on commit 644ab5d

Please sign in to comment.