From e95439828fc76923afeda8b2261821c5b0d5e748 Mon Sep 17 00:00:00 2001 From: Clement Escoffier Date: Thu, 26 Nov 2015 19:27:48 +0100 Subject: [PATCH] Update to 3.2.0 And update API --- Procfile | 2 +- core-examples/pom.xml | 2 +- .../vertx-docker-example-fabric8/pom.xml | 2 +- docker-examples/vertx-docker-example/pom.xml | 2 +- .../vertx-docker-java-fatjar/Dockerfile | 2 +- .../vertx-docker-java-fatjar/pom.xml | 2 +- docker-examples/vertx-docker-java/Dockerfile | 2 +- docker-examples/vertx-docker-java/pom.xml | 2 +- examples-utils/pom.xml | 2 +- gradle-simplest/README.adoc | 2 +- gradle-simplest/build.gradle | 2 +- .../README.adoc | 2 +- .../build.gradle | 2 +- .../gradle-verticle-groovy/README.adoc | 2 +- .../gradle-verticle-groovy/build.gradle | 2 +- .../gradle-verticle-js/README.adoc | 2 +- .../gradle-verticle-js/build.gradle | 2 +- .../gradle-verticle-rb/README.adoc | 2 +- .../gradle-verticle-rb/build.gradle | 2 +- gradle-verticles/gradle-verticle/README.adoc | 8 ++++---- gradle-verticles/gradle-verticle/build.gradle | 2 +- heroku-example/pom.xml | 4 ++-- jca-examples/ear/pom.xml | 2 +- jca-examples/ejb/pom.xml | 2 +- jca-examples/pom.xml | 2 +- jca-examples/war/pom.xml | 2 +- jdbc-examples/pom.xml | 2 +- mail-examples/pom.xml | 2 +- .../io/vertx/example/mail/mail_headers.groovy | 2 +- .../js/io/vertx/example/mail/mail_headers.js | 2 +- .../rb/io/vertx/example/mail/mail_headers.rb | 2 +- maven-service-factory-examples/README.adoc | 6 +++--- .../maven-service-factory-api/pom.xml | 2 +- .../vertx/examples/MyDeployingVerticle.java | 2 +- .../maven-service-factory-verticle/pom.xml | 2 +- maven-service-factory-examples/pom.xml | 2 +- maven-simplest/README.adoc | 2 +- maven-simplest/pom.xml | 2 +- .../README.adoc | 2 +- .../maven-verticle-groovy-compiled/pom.xml | 2 +- .../maven-verticle-groovy/README.adoc | 2 +- maven-verticles/maven-verticle-groovy/pom.xml | 2 +- maven-verticles/maven-verticle-js/README.adoc | 2 +- maven-verticles/maven-verticle-js/pom.xml | 2 +- maven-verticles/maven-verticle-rb/README.adoc | 2 +- maven-verticles/maven-verticle-rb/pom.xml | 2 +- maven-verticles/maven-verticle/README.adoc | 10 +++++----- maven-verticles/maven-verticle/pom.xml | 2 +- maven-verticles/pom.xml | 2 +- metrics-examples/README.adoc | 8 ++++---- metrics-examples/pom.xml | 2 +- mongo-examples/README.adoc | 8 ++++---- mongo-examples/pom.xml | 2 +- openshift-example/pom.xml | 2 +- osgi-examples/pom.xml | 2 +- pom.xml | 2 +- redis-examples/README.adoc | 8 ++++---- redis-examples/pom.xml | 2 +- rx-examples/pom.xml | 2 +- service-proxy-examples/README.adoc | 10 +++++----- service-proxy-examples/pom.xml | 2 +- .../service-consumer/pom.xml | 2 +- .../service-provider/node-client/package.json | 2 +- .../service-provider/pom.xml | 2 +- .../ProcessorServiceVertxProxyHandler.java | 3 +-- .../processor_service-proxy.js | 2 +- .../processor_service.js | 2 +- shell-examples/pom.xml | 7 ++++++- .../echokeyboard/echo_keyboard_command.groovy | 8 ++++---- .../helloworld/hello_world_command.groovy | 5 +++-- .../shell/starwars/starwars_command.groovy | 8 ++++---- .../example/shell/wget/wget_command.groovy | 5 +++-- .../echokeyboard/EchoKeyboardCommand.java | 13 ++++++------ .../shell/helloworld/HelloWorldCommand.java | 10 +++++----- .../shell/run_service_ssh/RunShell.java | 6 +++--- .../shell/run_service_telnet/RunShell.java | 4 ++-- .../shell/starwars/StarwarsCommand.java | 20 ++++++------------- .../vertx/example/shell/top/TopCommand.java | 14 ++++++------- .../vertx/example/shell/wget/WgetCommand.java | 9 +++++---- .../echokeyboard/echo_keyboard_command.js | 7 ++++--- .../shell/helloworld/hello_world_command.js | 5 +++-- .../shell/starwars/starwars_command.js | 7 ++++--- .../vertx/example/shell/wget/wget_command.js | 5 +++-- .../echokeyboard/echo_keyboard_command.rb | 11 +++++----- .../shell/helloworld/hello_world_command.rb | 5 +++-- .../shell/starwars/starwars_command.rb | 7 ++++--- .../vertx/example/shell/wget/wget_command.rb | 5 +++-- spring-examples/pom.xml | 2 +- spring-examples/spring-example/README.adoc | 2 +- spring-examples/spring-example/pom.xml | 2 +- spring-examples/springboot-example/pom.xml | 4 ++-- sync-examples/pom.xml | 6 +++--- unit-examples/pom.xml | 2 +- web-examples/pom.xml | 2 +- .../example/web/authorisation/server.groovy | 2 +- .../web/custom_authorisation/server.groovy | 2 +- .../io/vertx/example/web/jwt/server.groovy | 2 +- .../example/web/authorisation/Server.java | 3 ++- .../web/custom_authorisation/Server.java | 3 ++- .../java/io/vertx/example/web/jwt/Server.java | 2 +- .../web/vertxbus/amd/webroot/bower.json | 2 +- .../web/vertxbus/webpack/client/package.json | 2 +- 102 files changed, 194 insertions(+), 186 deletions(-) diff --git a/Procfile b/Procfile index b2fed6eab..9a03ced97 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: java $JAVA_OPTS -Dhttp.port=$PORT -jar heroku-example/target/heroku-example-3.1.0-fat.jar \ No newline at end of file +web: java $JAVA_OPTS -Dhttp.port=$PORT -jar heroku-example/target/heroku-example-3.2.0-SNAPSHOT-fat.jar \ No newline at end of file diff --git a/core-examples/pom.xml b/core-examples/pom.xml index 730f16c52..3a7b2f005 100644 --- a/core-examples/pom.xml +++ b/core-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx core-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/docker-examples/vertx-docker-example-fabric8/pom.xml b/docker-examples/vertx-docker-example-fabric8/pom.xml index 5be9cf2f4..12198a5cc 100644 --- a/docker-examples/vertx-docker-example-fabric8/pom.xml +++ b/docker-examples/vertx-docker-example-fabric8/pom.xml @@ -6,7 +6,7 @@ io.vertx vertx-docker-example-fabric - 3.1.0 + 3.2.0-SNAPSHOT Sample Docker Image for Fabric8 diff --git a/docker-examples/vertx-docker-example/pom.xml b/docker-examples/vertx-docker-example/pom.xml index 302aab7d9..3af1f9440 100644 --- a/docker-examples/vertx-docker-example/pom.xml +++ b/docker-examples/vertx-docker-example/pom.xml @@ -6,7 +6,7 @@ io.vertx vertx-docker-example - 3.1.0 + 3.2.0-SNAPSHOT Sample Docker Image with Maven diff --git a/docker-examples/vertx-docker-java-fatjar/Dockerfile b/docker-examples/vertx-docker-java-fatjar/Dockerfile index e865f9ac6..c6bdeb255 100644 --- a/docker-examples/vertx-docker-java-fatjar/Dockerfile +++ b/docker-examples/vertx-docker-java-fatjar/Dockerfile @@ -8,7 +8,7 @@ FROM java:8 -ENV VERTICLE_FILE hello-verticle-fatjar-3.1.0-fat.jar +ENV VERTICLE_FILE hello-verticle-fatjar-3.2.0-SNAPSHOT-fat.jar # Set the location of the verticles ENV VERTICLE_HOME /usr/verticles diff --git a/docker-examples/vertx-docker-java-fatjar/pom.xml b/docker-examples/vertx-docker-java-fatjar/pom.xml index 540a1ba42..85cfca36f 100644 --- a/docker-examples/vertx-docker-java-fatjar/pom.xml +++ b/docker-examples/vertx-docker-java-fatjar/pom.xml @@ -6,7 +6,7 @@ io.vertx hello-verticle-fatjar - 3.1.0 + 3.2.0-SNAPSHOT Sample Docker Image for Java - FatJar diff --git a/docker-examples/vertx-docker-java/Dockerfile b/docker-examples/vertx-docker-java/Dockerfile index 65833893c..b506cc4be 100644 --- a/docker-examples/vertx-docker-java/Dockerfile +++ b/docker-examples/vertx-docker-java/Dockerfile @@ -10,7 +10,7 @@ FROM vertx/vertx3 ENV VERTICLE_NAME io.vertx.sample.hello.HelloVerticle -ENV VERTICLE_FILE target/hello-verticle-3.1.0.jar +ENV VERTICLE_FILE target/hello-verticle-3.2.0-SNAPSHOT.jar # Set the location of the verticles ENV VERTICLE_HOME /usr/verticles diff --git a/docker-examples/vertx-docker-java/pom.xml b/docker-examples/vertx-docker-java/pom.xml index d63649330..1f15ba09c 100644 --- a/docker-examples/vertx-docker-java/pom.xml +++ b/docker-examples/vertx-docker-java/pom.xml @@ -6,7 +6,7 @@ io.vertx hello-verticle - 3.1.0 + 3.2.0-SNAPSHOT Sample Docker Image for Java diff --git a/examples-utils/pom.xml b/examples-utils/pom.xml index 6f434537e..3999811f6 100644 --- a/examples-utils/pom.xml +++ b/examples-utils/pom.xml @@ -5,7 +5,7 @@ vertx-examples io.vertx - 3.1.0 + 3.2.0-SNAPSHOT 4.0.0 diff --git a/gradle-simplest/README.adoc b/gradle-simplest/README.adoc index 93874f076..99541a3d6 100644 --- a/gradle-simplest/README.adoc +++ b/gradle-simplest/README.adoc @@ -20,7 +20,7 @@ Because the application plugin is being used, you may directly run the applicati You may also run the fat jar as a standalone runnable jar: - java -jar build/libs/gradle-simplest-3.1.0-fat.jar + java -jar build/libs/gradle-simplest-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/gradle-simplest/build.gradle b/gradle-simplest/build.gradle index e425469eb..77ef855ff 100644 --- a/gradle-simplest/build.gradle +++ b/gradle-simplest/build.gradle @@ -11,7 +11,7 @@ repositories { } } -version = '3.1.0' +version = '3.2.0-SNAPSHOT' sourceCompatibility = '1.8' dependencies { diff --git a/gradle-verticles/gradle-verticle-groovy-compiled/README.adoc b/gradle-verticles/gradle-verticle-groovy-compiled/README.adoc index 959996706..5b5be80cf 100644 --- a/gradle-verticles/gradle-verticle-groovy-compiled/README.adoc +++ b/gradle-verticles/gradle-verticle-groovy-compiled/README.adoc @@ -11,7 +11,7 @@ To build the "fat jar" To run the fat jar: - java -jar build/libs/gradle-verticle-groovy-compiled-3.1.0-fat.jar + java -jar build/libs/gradle-verticle-groovy-compiled-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/gradle-verticles/gradle-verticle-groovy-compiled/build.gradle b/gradle-verticles/gradle-verticle-groovy-compiled/build.gradle index 5089a2d4c..c8c4efa3c 100644 --- a/gradle-verticles/gradle-verticle-groovy-compiled/build.gradle +++ b/gradle-verticles/gradle-verticle-groovy-compiled/build.gradle @@ -13,7 +13,7 @@ repositories { } -version = '3.1.0' +version = '3.2.0-SNAPSHOT' sourceCompatibility = '1.8' mainClassName = 'io.vertx.core.Launcher' diff --git a/gradle-verticles/gradle-verticle-groovy/README.adoc b/gradle-verticles/gradle-verticle-groovy/README.adoc index a20913804..e029eaea4 100644 --- a/gradle-verticles/gradle-verticle-groovy/README.adoc +++ b/gradle-verticles/gradle-verticle-groovy/README.adoc @@ -11,7 +11,7 @@ To build the "fat jar" To run the fat jar: - java -jar build/libs/gradle-verticle-groovy-3.1.0-fat.jar + java -jar build/libs/gradle-verticle-groovy-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/gradle-verticles/gradle-verticle-groovy/build.gradle b/gradle-verticles/gradle-verticle-groovy/build.gradle index b69002574..bacede504 100644 --- a/gradle-verticles/gradle-verticle-groovy/build.gradle +++ b/gradle-verticles/gradle-verticle-groovy/build.gradle @@ -12,7 +12,7 @@ repositories { } -version = '3.1.0' +version = '3.2.0-SNAPSHOT' sourceCompatibility = '1.8' mainClassName = 'io.vertx.core.Launcher' diff --git a/gradle-verticles/gradle-verticle-js/README.adoc b/gradle-verticles/gradle-verticle-js/README.adoc index 8da4294e0..a349d75ba 100644 --- a/gradle-verticles/gradle-verticle-js/README.adoc +++ b/gradle-verticles/gradle-verticle-js/README.adoc @@ -11,7 +11,7 @@ To build the "fat jar" To run the fat jar: - java -jar build/libs/gradle-verticle-js-3.1.0-fat.jar + java -jar build/libs/gradle-verticle-js-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/gradle-verticles/gradle-verticle-js/build.gradle b/gradle-verticles/gradle-verticle-js/build.gradle index 93ec3daca..23be81610 100644 --- a/gradle-verticles/gradle-verticle-js/build.gradle +++ b/gradle-verticles/gradle-verticle-js/build.gradle @@ -13,7 +13,7 @@ repositories { sourceCompatibility = '1.8' mainClassName = 'io.vertx.core.Launcher' -version = '3.1.0' +version = '3.2.0-SNAPSHOT' repositories { mavenCentral() diff --git a/gradle-verticles/gradle-verticle-rb/README.adoc b/gradle-verticles/gradle-verticle-rb/README.adoc index e04b28eb7..8bf98a30f 100644 --- a/gradle-verticles/gradle-verticle-rb/README.adoc +++ b/gradle-verticles/gradle-verticle-rb/README.adoc @@ -11,7 +11,7 @@ To build the "fat jar" To run the fat jar: - java -jar build/libs/gradle-verticle-rb-3.1.0-fat.jar + java -jar build/libs/gradle-verticle-rb-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/gradle-verticles/gradle-verticle-rb/build.gradle b/gradle-verticles/gradle-verticle-rb/build.gradle index b757c93d7..c671fa79b 100644 --- a/gradle-verticles/gradle-verticle-rb/build.gradle +++ b/gradle-verticles/gradle-verticle-rb/build.gradle @@ -12,7 +12,7 @@ repositories { } sourceCompatibility = '1.8' mainClassName = 'io.vertx.core.Launcher' -version = '3.1.0' +version = '3.2.0-SNAPSHOT' dependencies { compile "io.vertx:vertx-core:$version" diff --git a/gradle-verticles/gradle-verticle/README.adoc b/gradle-verticles/gradle-verticle/README.adoc index 717892f76..feb973b9f 100644 --- a/gradle-verticles/gradle-verticle/README.adoc +++ b/gradle-verticles/gradle-verticle/README.adoc @@ -14,7 +14,7 @@ To build the "fat jar" To run the fat jar: - java -jar build/libs/gradle-verticle-3.1.0-fat.jar + java -jar build/libs/gradle-verticle-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). @@ -24,13 +24,13 @@ Now point your browser at http://localhost:8080 Writing code in verticles allow you to scale it more easily, e.g. let's say you have 8 cores on your server and you want to utilise them all, you can deploy 8 instances as follows: -java -jar build/libs/gradle-verticle-3.1.0-fat.jar -instances 8 +java -jar build/libs/gradle-verticle-3.2.0-SNAPSHOT-fat.jar -instances 8 You can also enable clustering and ha at the command line, e.g. -java -jar build/libs/gradle-verticle-3.1.0-fat.jar -cluster +java -jar build/libs/gradle-verticle-3.2.0-SNAPSHOT-fat.jar -cluster -java -jar build/libs/gradle-verticle-3.1.0-fat.jar -ha +java -jar build/libs/gradle-verticle-3.2.0-SNAPSHOT-fat.jar -ha Please see the docs for a full list of Vert.x command line options. diff --git a/gradle-verticles/gradle-verticle/build.gradle b/gradle-verticles/gradle-verticle/build.gradle index 828f2ea97..db9856a40 100644 --- a/gradle-verticles/gradle-verticle/build.gradle +++ b/gradle-verticles/gradle-verticle/build.gradle @@ -11,7 +11,7 @@ repositories { } } -version = '3.1.0' +version = '3.2.0-SNAPSHOT' sourceCompatibility = '1.8' mainClassName = 'io.vertx.core.Launcher' diff --git a/heroku-example/pom.xml b/heroku-example/pom.xml index 9eff5ebd1..cf6ad4860 100644 --- a/heroku-example/pom.xml +++ b/heroku-example/pom.xml @@ -6,7 +6,7 @@ io.vertx heroku-example - 3.1.0 + 3.2.0-SNAPSHOT @@ -77,7 +77,7 @@ 0.5.6 - java $JAVA_OPTS -Dhttp.port=$PORT -jar target/heroku-example-3.1.0-fat.jar + java $JAVA_OPTS -Dhttp.port=$PORT -jar target/heroku-example-3.2.0-SNAPSHOT-fat.jar diff --git a/jca-examples/ear/pom.xml b/jca-examples/ear/pom.xml index cd6226427..406f78f0b 100644 --- a/jca-examples/ear/pom.xml +++ b/jca-examples/ear/pom.xml @@ -7,7 +7,7 @@ io.vertx vertx-jca-examples - 3.1.0 + 3.2.0-SNAPSHOT vertx-jca-examples-app diff --git a/jca-examples/ejb/pom.xml b/jca-examples/ejb/pom.xml index e524782b6..453faddf5 100644 --- a/jca-examples/ejb/pom.xml +++ b/jca-examples/ejb/pom.xml @@ -7,7 +7,7 @@ io.vertx vertx-jca-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/jca-examples/pom.xml b/jca-examples/pom.xml index e9c29aa35..3496dcbb7 100644 --- a/jca-examples/pom.xml +++ b/jca-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx vertx-jca-examples - 3.1.0 + 3.2.0-SNAPSHOT pom Vert.x JCA Examples diff --git a/jca-examples/war/pom.xml b/jca-examples/war/pom.xml index 776e53ddb..ca2d2c343 100644 --- a/jca-examples/war/pom.xml +++ b/jca-examples/war/pom.xml @@ -8,7 +8,7 @@ io.vertx vertx-jca-examples - 3.1.0 + 3.2.0-SNAPSHOT vertx-jca-examples-web diff --git a/jdbc-examples/pom.xml b/jdbc-examples/pom.xml index f4f48c3e0..95bdc4144 100644 --- a/jdbc-examples/pom.xml +++ b/jdbc-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx jdbc-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/mail-examples/pom.xml b/mail-examples/pom.xml index cd89644ef..c3e6bb0c0 100644 --- a/mail-examples/pom.xml +++ b/mail-examples/pom.xml @@ -3,7 +3,7 @@ io.vertx mail-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/mail-examples/src/main/groovy/io/vertx/example/mail/mail_headers.groovy b/mail-examples/src/main/groovy/io/vertx/example/mail/mail_headers.groovy index 7d7f438b2..5ab9ecd9b 100644 --- a/mail-examples/src/main/groovy/io/vertx/example/mail/mail_headers.groovy +++ b/mail-examples/src/main/groovy/io/vertx/example/mail/mail_headers.groovy @@ -15,7 +15,7 @@ def email = [ def headers = MultiMap.caseInsensitiveMultiMap() -headers.add("X-Mailer", "Vert.x Mail-Client 3.0") +headers.add("X-Mailer", "Vert.x Mail-Client 3.1") headers.add("Message-ID", "12345@example.com") headers.add("Reply-To", "reply@example.com") headers.add("Received", "by vertx mail service") diff --git a/mail-examples/src/main/js/io/vertx/example/mail/mail_headers.js b/mail-examples/src/main/js/io/vertx/example/mail/mail_headers.js index bc27f4fc6..402c84cbd 100644 --- a/mail-examples/src/main/js/io/vertx/example/mail/mail_headers.js +++ b/mail-examples/src/main/js/io/vertx/example/mail/mail_headers.js @@ -15,7 +15,7 @@ var email = { var headers = MultiMap.caseInsensitiveMultiMap(); -headers.add("X-Mailer", "Vert.x Mail-Client 3.0"); +headers.add("X-Mailer", "Vert.x Mail-Client 3.1"); headers.add("Message-ID", "12345@example.com"); headers.add("Reply-To", "reply@example.com"); headers.add("Received", "by vertx mail service"); diff --git a/mail-examples/src/main/rb/io/vertx/example/mail/mail_headers.rb b/mail-examples/src/main/rb/io/vertx/example/mail/mail_headers.rb index 8a31c308d..73a01f5ee 100644 --- a/mail-examples/src/main/rb/io/vertx/example/mail/mail_headers.rb +++ b/mail-examples/src/main/rb/io/vertx/example/mail/mail_headers.rb @@ -15,7 +15,7 @@ headers = Vertx::MultiMap.case_insensitive_multi_map() -headers.add("X-Mailer", "Vert.x Mail-Client 3.0") +headers.add("X-Mailer", "Vert.x Mail-Client 3.1") headers.add("Message-ID", "12345@example.com") headers.add("Reply-To", "reply@example.com") headers.add("Received", "by vertx mail service") diff --git a/maven-service-factory-examples/README.adoc b/maven-service-factory-examples/README.adoc index 9a24c34b9..aff114423 100644 --- a/maven-service-factory-examples/README.adoc +++ b/maven-service-factory-examples/README.adoc @@ -18,7 +18,7 @@ You can run the verticle from anywhere using: [source] ---- -vertx run maven:io.vertx:maven-service-factory-verticle:3.1.0::my-verticle +vertx run maven:io.vertx:maven-service-factory-verticle:3.2.0-SNAPSHOT::my-verticle ---- The identifier is constructed as follows: @@ -34,7 +34,7 @@ link:maven-service-factory-api/src/main/java/io/vertx/examples/MyDeployingVertic verticle is deployed using: ---- -vertx.deployVerticle("maven:io.vertx:maven-service-factory-verticle:3.1.0::my-verticle", r -> { ... }); +vertx.deployVerticle("maven:io.vertx:maven-service-factory-verticle:3.2.0-SNAPSHOT::my-verticle", r -> { ... }); ---- To run this project just launch: @@ -42,5 +42,5 @@ To run this project just launch: ---- cd maven-service-factory-api mvn clean package -vertx run io.vertx.examples.MyDeployingVerticle -cp target/maven-service-factory-api-3.1.0.jar +vertx run io.vertx.examples.MyDeployingVerticle -cp target/maven-service-factory-api-3.2.0-SNAPSHOT.jar ---- diff --git a/maven-service-factory-examples/maven-service-factory-api/pom.xml b/maven-service-factory-examples/maven-service-factory-api/pom.xml index c97d38877..79e3fc642 100644 --- a/maven-service-factory-examples/maven-service-factory-api/pom.xml +++ b/maven-service-factory-examples/maven-service-factory-api/pom.xml @@ -7,7 +7,7 @@ io.vertx maven-service-factory-examples - 3.1.0 + 3.2.0-SNAPSHOT maven-service-factory-api diff --git a/maven-service-factory-examples/maven-service-factory-api/src/main/java/io/vertx/examples/MyDeployingVerticle.java b/maven-service-factory-examples/maven-service-factory-api/src/main/java/io/vertx/examples/MyDeployingVerticle.java index cbe9c3a45..31b90a8e8 100644 --- a/maven-service-factory-examples/maven-service-factory-api/src/main/java/io/vertx/examples/MyDeployingVerticle.java +++ b/maven-service-factory-examples/maven-service-factory-api/src/main/java/io/vertx/examples/MyDeployingVerticle.java @@ -13,7 +13,7 @@ public class MyDeployingVerticle extends AbstractVerticle { public void start(Future future) throws Exception { // The `my-verticle` is deployed using the following convention: // `maven:` + groupId + `:` + artifactId + `:` + version + `::` + verticle name - vertx.deployVerticle("maven:io.vertx:maven-service-factory-verticle:3.1.0::my-verticle", + vertx.deployVerticle("maven:io.vertx:maven-service-factory-verticle:3.2.0-SNAPSHOT::my-verticle", ar -> { if (ar.succeeded()) { future.complete(); diff --git a/maven-service-factory-examples/maven-service-factory-verticle/pom.xml b/maven-service-factory-examples/maven-service-factory-verticle/pom.xml index 0881dfa6d..1dbcdeef8 100644 --- a/maven-service-factory-examples/maven-service-factory-verticle/pom.xml +++ b/maven-service-factory-examples/maven-service-factory-verticle/pom.xml @@ -7,7 +7,7 @@ io.vertx maven-service-factory-examples - 3.1.0 + 3.2.0-SNAPSHOT maven-service-factory-verticle diff --git a/maven-service-factory-examples/pom.xml b/maven-service-factory-examples/pom.xml index 2a85e53a2..e4be7fad1 100644 --- a/maven-service-factory-examples/pom.xml +++ b/maven-service-factory-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx maven-service-factory-examples - 3.1.0 + 3.2.0-SNAPSHOT pom diff --git a/maven-simplest/README.adoc b/maven-simplest/README.adoc index 5d7d6a4a8..cf21ef4d8 100644 --- a/maven-simplest/README.adoc +++ b/maven-simplest/README.adoc @@ -20,7 +20,7 @@ To build a "fat jar" To run the fat jar: - java -jar target/maven-simplest-3.1.0-fat.jar + java -jar target/maven-simplest-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/maven-simplest/pom.xml b/maven-simplest/pom.xml index 4143bd370..8cf0b3a57 100644 --- a/maven-simplest/pom.xml +++ b/maven-simplest/pom.xml @@ -7,7 +7,7 @@ io.vertx maven-simplest - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/maven-verticles/maven-verticle-groovy-compiled/README.adoc b/maven-verticles/maven-verticle-groovy-compiled/README.adoc index a3671d091..4474767ea 100644 --- a/maven-verticles/maven-verticle-groovy-compiled/README.adoc +++ b/maven-verticles/maven-verticle-groovy-compiled/README.adoc @@ -12,7 +12,7 @@ To build a "fat jar" To run the fat jar: - java -jar target/maven-verticle-compiled-groovy-3.1.0-fat.jar + java -jar target/maven-verticle-compiled-groovy-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/maven-verticles/maven-verticle-groovy-compiled/pom.xml b/maven-verticles/maven-verticle-groovy-compiled/pom.xml index 679a0be5e..a2cd6555e 100644 --- a/maven-verticles/maven-verticle-groovy-compiled/pom.xml +++ b/maven-verticles/maven-verticle-groovy-compiled/pom.xml @@ -7,7 +7,7 @@ io.vertx maven-verticle-compiled-groovy - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/maven-verticles/maven-verticle-groovy/README.adoc b/maven-verticles/maven-verticle-groovy/README.adoc index cbd411916..46fd624cc 100644 --- a/maven-verticles/maven-verticle-groovy/README.adoc +++ b/maven-verticles/maven-verticle-groovy/README.adoc @@ -14,7 +14,7 @@ To build a "fat jar" To run the fat jar: - java -jar target/maven-verticle-groovy-3.1.0-fat.jar + java -jar target/maven-verticle-groovy-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/maven-verticles/maven-verticle-groovy/pom.xml b/maven-verticles/maven-verticle-groovy/pom.xml index 75ffdd3fe..1f0f0bedf 100644 --- a/maven-verticles/maven-verticle-groovy/pom.xml +++ b/maven-verticles/maven-verticle-groovy/pom.xml @@ -7,7 +7,7 @@ io.vertx maven-verticle-groovy - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/maven-verticles/maven-verticle-js/README.adoc b/maven-verticles/maven-verticle-js/README.adoc index 29a9e164c..3731ef2eb 100644 --- a/maven-verticles/maven-verticle-js/README.adoc +++ b/maven-verticles/maven-verticle-js/README.adoc @@ -14,7 +14,7 @@ To build a "fat jar" To run the fat jar: - java -jar target/maven-verticle-javascript-3.1.0-fat.jar + java -jar target/maven-verticle-javascript-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/maven-verticles/maven-verticle-js/pom.xml b/maven-verticles/maven-verticle-js/pom.xml index 81c9eb2ad..6e230169c 100644 --- a/maven-verticles/maven-verticle-js/pom.xml +++ b/maven-verticles/maven-verticle-js/pom.xml @@ -7,7 +7,7 @@ io.vertx maven-verticle-javascript - 3.1.0 + 3.2.0-SNAPSHOT MyJavaScriptVerticle.js diff --git a/maven-verticles/maven-verticle-rb/README.adoc b/maven-verticles/maven-verticle-rb/README.adoc index 634b2a4ab..1237a4dfa 100644 --- a/maven-verticles/maven-verticle-rb/README.adoc +++ b/maven-verticles/maven-verticle-rb/README.adoc @@ -14,7 +14,7 @@ To build a "fat jar" To run the fat jar: - java -jar target/maven-verticle-ruby-3.1.0-fat.jar + java -jar target/maven-verticle-ruby-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/maven-verticles/maven-verticle-rb/pom.xml b/maven-verticles/maven-verticle-rb/pom.xml index 2f0684bbb..28a45269e 100644 --- a/maven-verticles/maven-verticle-rb/pom.xml +++ b/maven-verticles/maven-verticle-rb/pom.xml @@ -7,7 +7,7 @@ io.vertx maven-verticle-ruby - 3.1.0 + 3.2.0-SNAPSHOT MyRubyVerticle.rb diff --git a/maven-verticles/maven-verticle/README.adoc b/maven-verticles/maven-verticle/README.adoc index 12979b8d1..f956b1c44 100644 --- a/maven-verticles/maven-verticle/README.adoc +++ b/maven-verticles/maven-verticle/README.adoc @@ -14,7 +14,7 @@ To build a "fat jar" To run the fat jar: - java -jar target/maven-verticle-3.1.0-fat.jar + java -jar target/maven-verticle-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). @@ -24,16 +24,16 @@ Now point your browser at http://localhost:8080 Writing code in verticles allow you to scale it more easily, e.g. let's say you have 8 cores on your server and you want to utilize them all, you can deploy 8 instances as follows: - java -jar target/maven-verticle-3.1.0-fat.jar -instances 8 + java -jar target/maven-verticle-3.2.0-SNAPSHOT-fat.jar -instances 8 You can also enable clustering and ha at the command line, e.g. - java -jar target/maven-verticle-3.1.0-fat.jar -cluster + java -jar target/maven-verticle-3.2.0-SNAPSHOT-fat.jar -cluster - java -jar target/maven-verticle-3.1.0-fat.jar -ha + java -jar target/maven-verticle-3.2.0-SNAPSHOT-fat.jar -ha You can also pass a configuration to the verticle: - java -jar target/maven-verticle-3.1.0-fat.jar -conf src/conf/my-conf.json + java -jar target/maven-verticle-3.2.0-SNAPSHOT-fat.jar -conf src/conf/my-conf.json Please see the docs for a full list of Vert.x command line options. diff --git a/maven-verticles/maven-verticle/pom.xml b/maven-verticles/maven-verticle/pom.xml index 342d71ab9..28383e1c8 100644 --- a/maven-verticles/maven-verticle/pom.xml +++ b/maven-verticles/maven-verticle/pom.xml @@ -7,7 +7,7 @@ io.vertx maven-verticle - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/maven-verticles/pom.xml b/maven-verticles/pom.xml index 4281492e4..e6ed8cc77 100644 --- a/maven-verticles/pom.xml +++ b/maven-verticles/pom.xml @@ -6,7 +6,7 @@ io.vertx maven-verticles-examples - 3.1.0 + 3.2.0-SNAPSHOT pom diff --git a/metrics-examples/README.adoc b/metrics-examples/README.adoc index 94de70b5e..f94666b4a 100644 --- a/metrics-examples/README.adoc +++ b/metrics-examples/README.adoc @@ -30,18 +30,18 @@ export VERTX_OPTS=-Dvertx.metrics.options.enabled=true # java cd src/main/java/io/vertx/example/metrics/dashboard -vertx run io.vertx.example.metrics.dashboard.Dashboard -cp ./../../../../../../../../target/metrics-examples-3.1.0.jar:. +vertx run io.vertx.example.metrics.dashboard.Dashboard -cp ./../../../../../../../../target/metrics-examples-3.2.0-SNAPSHOT.jar:. # javascript cd src/main/js/io/vertx/example/metrics/dashboard -vertx run dashboard.js -cp ./../../../../../../../../target/metrics-examples-3.1.0.jar:. +vertx run dashboard.js -cp ./../../../../../../../../target/metrics-examples-3.2.0-SNAPSHOT.jar:. # groovy cd src/main/groovy/io/vertx/example/metrics/dashboard -vertx run dashboard.groovy -cp ./../../../../../../../../target/metrics-examples-3.1.0.jar:. +vertx run dashboard.groovy -cp ./../../../../../../../../target/metrics-examples-3.2.0-SNAPSHOT.jar:. # ruby cd src/main/rb/io/vertx/example/metrics/dashboard -vertx run dashboard.rb -cp ./../../../../../../../../target/metrics-examples-3.1.0.jar:. +vertx run dashboard.rb -cp ./../../../../../../../../target/metrics-examples-3.2.0-SNAPSHOT.jar:. ---- diff --git a/metrics-examples/pom.xml b/metrics-examples/pom.xml index bba4bf5b8..25da176e5 100644 --- a/metrics-examples/pom.xml +++ b/metrics-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx metrics-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/mongo-examples/README.adoc b/mongo-examples/README.adoc index ee4cb247c..2a4d2c35e 100644 --- a/mongo-examples/README.adoc +++ b/mongo-examples/README.adoc @@ -25,15 +25,15 @@ Once the mongo instance is running, you can launch it using: ---- # java -vertx run io.vertx.examples.mongo.MongoClientVerticle -cp target/mongo-examples-3.1.0.jar -conf my-mongo-config.json +vertx run io.vertx.examples.mongo.MongoClientVerticle -cp target/mongo-examples-3.2.0-SNAPSHOT.jar -conf my-mongo-config.json # javascript -vertx run src/main/js/io/vertx/examples/mongo/mongo_client_verticle.js -cp target/mongo-examples-3.1.0.jar -conf my-mongo-config.json +vertx run src/main/js/io/vertx/examples/mongo/mongo_client_verticle.js -cp target/mongo-examples-3.2.0-SNAPSHOT.jar -conf my-mongo-config.json # groovy -vertx run src/main/groovy/io/vertx/examples/mongo/mongo_client_verticle.groovy -cp target/mongo-examples-3.1.0.jar -conf my-mongo-config.json +vertx run src/main/groovy/io/vertx/examples/mongo/mongo_client_verticle.groovy -cp target/mongo-examples-3.2.0-SNAPSHOT.jar -conf my-mongo-config.json # ruby -vertx run src/main/rb/io/vertx/examples/mongo/mongo_client_verticle.rb -cp target/mongo-examples-3.1.0.jar -conf my-mongo-config.json +vertx run src/main/rb/io/vertx/examples/mongo/mongo_client_verticle.rb -cp target/mongo-examples-3.2.0-SNAPSHOT.jar -conf my-mongo-config.json ---- diff --git a/mongo-examples/pom.xml b/mongo-examples/pom.xml index ef90f8a34..077b0144a 100644 --- a/mongo-examples/pom.xml +++ b/mongo-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx mongo-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/openshift-example/pom.xml b/openshift-example/pom.xml index 472e0bc11..5ffb01136 100644 --- a/openshift-example/pom.xml +++ b/openshift-example/pom.xml @@ -6,7 +6,7 @@ io.vertx openshift-example - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/osgi-examples/pom.xml b/osgi-examples/pom.xml index 19d675087..8e35586a4 100644 --- a/osgi-examples/pom.xml +++ b/osgi-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx osgi-examples - 3.1.0 + 3.2.0-SNAPSHOT bundle diff --git a/pom.xml b/pom.xml index e40096af9..d5d81e766 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ pom - 3.1.0 + 3.2.0-SNAPSHOT maven-simplest diff --git a/redis-examples/README.adoc b/redis-examples/README.adoc index 0452ac8d3..4941f919e 100644 --- a/redis-examples/README.adoc +++ b/redis-examples/README.adoc @@ -27,15 +27,15 @@ Once the redis instance is running, you can launch it using: mvn clean package # java -vertx run io.vertx.examples.redis.RedisClientVerticle -cp target/redis-examples-3.1.0.jar -conf my-redis-config.json +vertx run io.vertx.examples.redis.RedisClientVerticle -cp target/redis-examples-3.2.0-SNAPSHOT.jar -conf my-redis-config.json # javascript -vertx run src/main/js/io/vertx/examples/redis/redis_client_verticle.js -cp target/redis-examples-3.1.0.jar -conf my-redis-config.json +vertx run src/main/js/io/vertx/examples/redis/redis_client_verticle.js -cp target/redis-examples-3.2.0-SNAPSHOT.jar -conf my-redis-config.json # groovy -vertx run src/main/groovy/io/vertx/examples/redis/redis_client_verticle.groovy -cp target/redis-examples-3.1.0.jar -conf my-redis-config.json +vertx run src/main/groovy/io/vertx/examples/redis/redis_client_verticle.groovy -cp target/redis-examples-3.2.0-SNAPSHOT.jar -conf my-redis-config.json # ruby -vertx run src/main/rb/io/vertx/examples/redis/redis_client_verticle.rb -cp target/redis-examples-3.1.0.jar -conf my-redis-config.json +vertx run src/main/rb/io/vertx/examples/redis/redis_client_verticle.rb -cp target/redis-examples-3.2.0-SNAPSHOT.jar -conf my-redis-config.json ---- diff --git a/redis-examples/pom.xml b/redis-examples/pom.xml index cbd40f8ef..fde0f42d5 100644 --- a/redis-examples/pom.xml +++ b/redis-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx redis-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/rx-examples/pom.xml b/rx-examples/pom.xml index f2e6a55de..f5e6d5a45 100644 --- a/rx-examples/pom.xml +++ b/rx-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx rx-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/service-proxy-examples/README.adoc b/service-proxy-examples/README.adoc index 1e4fb34be..ee95d5206 100644 --- a/service-proxy-examples/README.adoc +++ b/service-proxy-examples/README.adoc @@ -75,7 +75,7 @@ Once done, run the verticle using: [source] ---- vertx run io.vertx.examples.service.ProcessorServiceVerticle \ - -cp target/service-provider-3.1.0.jar -cluster + -cp target/service-provider-3.2.0-SNAPSHOT.jar -cluster ---- Depending on your cluster configuration you may have to specify the `cluster-host` and configure Hazelcast. @@ -103,7 +103,7 @@ To run this verticle, package it using: `mvn clean package`, and run it with: ---- vertx run io.vertx.examples.service.consumer.ConsumerVerticle \ - -cp ../service-provider/target/service-provider-3.1.0.jar:target/service-consumer-3.1.0.jar \ + -cp ../service-provider/target/service-provider-3.2.0-SNAPSHOT.jar:target/service-consumer-3.2.0-SNAPSHOT.jar \ -cluster ---- @@ -124,18 +124,18 @@ You can consume the `ProcessorService` in Groovy as shown in this link:service-c To launch this groovy verticle run: ---- -vertx run src/main/groovy/io/vertx/examples/service/consumer/consumer_verticle.groovy -cp ../service-provider/target/service-provider-3.1.0.jar -cluster +vertx run src/main/groovy/io/vertx/examples/service/consumer/consumer_verticle.groovy -cp ../service-provider/target/service-provider-3.2.0-SNAPSHOT.jar -cluster ---- In JavaScript, the consuming verticle is link:service-consumer/src/main/js/io/vertx/examples/service/consumer/consumer_verticle.js[here]. To launch it, just run: ---- -vertx run src/main/js/io/vertx/examples/service/consumer/consumer_verticle.js -cp ../service-provider/target/service-provider-3.1.0.jar -cluster +vertx run src/main/js/io/vertx/examples/service/consumer/consumer_verticle.js -cp ../service-provider/target/service-provider-3.2.0-SNAPSHOT.jar -cluster ---- You can also consume the service in ruby as shown link:service-consumer/src/main/js/io/vertx/examples/service/consumer/consumer_verticle.rb[here]. To launch it, just run: ---- -vertx run src/main/rb/io/vertx/examples/service/consumer/consumer_verticle.rb -cp ../service-provider/target/service-provider-3.1.0.jar -cluster +vertx run src/main/rb/io/vertx/examples/service/consumer/consumer_verticle.rb -cp ../service-provider/target/service-provider-3.2.0-SNAPSHOT.jar -cluster ---- diff --git a/service-proxy-examples/pom.xml b/service-proxy-examples/pom.xml index adc1bd241..87db3d028 100644 --- a/service-proxy-examples/pom.xml +++ b/service-proxy-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx service-proxy-examples - 3.1.0 + 3.2.0-SNAPSHOT pom diff --git a/service-proxy-examples/service-consumer/pom.xml b/service-proxy-examples/service-consumer/pom.xml index 4c9a1b20e..8399b3afa 100644 --- a/service-proxy-examples/service-consumer/pom.xml +++ b/service-proxy-examples/service-consumer/pom.xml @@ -7,7 +7,7 @@ vertx-examples io.vertx - 3.1.0 + 3.2.0-SNAPSHOT ../../pom.xml diff --git a/service-proxy-examples/service-provider/node-client/package.json b/service-proxy-examples/service-provider/node-client/package.json index 02637bb72..3bda4c353 100644 --- a/service-proxy-examples/service-provider/node-client/package.json +++ b/service-proxy-examples/service-provider/node-client/package.json @@ -4,7 +4,7 @@ "private": true, "dependencies": { "sockjs-client": "1.0.0", - "vertx3-eventbus-client": "3.1.0" + "vertx3-eventbus-client": "3.2.0-SNAPSHOT" }, "main": "index.js", "scripts": { diff --git a/service-proxy-examples/service-provider/pom.xml b/service-proxy-examples/service-provider/pom.xml index 5684bc61f..dd20a40fe 100644 --- a/service-proxy-examples/service-provider/pom.xml +++ b/service-proxy-examples/service-provider/pom.xml @@ -7,7 +7,7 @@ io.vertx service-proxy-examples - 3.1.0 + 3.2.0-SNAPSHOT service-provider diff --git a/service-proxy-examples/service-provider/src/main/generated/io/vertx/examples/service/ProcessorServiceVertxProxyHandler.java b/service-proxy-examples/service-provider/src/main/generated/io/vertx/examples/service/ProcessorServiceVertxProxyHandler.java index e2e030a0d..d8509461e 100644 --- a/service-proxy-examples/service-provider/src/main/generated/io/vertx/examples/service/ProcessorServiceVertxProxyHandler.java +++ b/service-proxy-examples/service-provider/src/main/generated/io/vertx/examples/service/ProcessorServiceVertxProxyHandler.java @@ -136,8 +136,7 @@ private Handler> createHandler(Message msg) { if (res.failed()) { msg.fail(-1, res.cause().getMessage()); } else { - msg.reply(res.result()); - } + if (res.result() != null && res.result().getClass().isEnum()) { msg.reply(((Enum) res.result()).name()); } else { msg.reply(res.result()); } } }; } diff --git a/service-proxy-examples/service-provider/src/main/resources/vertx-processor-sample-js/processor_service-proxy.js b/service-proxy-examples/service-provider/src/main/resources/vertx-processor-sample-js/processor_service-proxy.js index 6ef578fdc..c166e545f 100644 --- a/service-proxy-examples/service-provider/src/main/resources/vertx-processor-sample-js/processor_service-proxy.js +++ b/service-proxy-examples/service-provider/src/main/resources/vertx-processor-sample-js/processor_service-proxy.js @@ -54,7 +54,7 @@ */ this.process = function(document, resultHandler) { var __args = arguments; - if (__args.length === 2 && typeof __args[0] === 'object' && typeof __args[1] === 'function') { + if (__args.length === 2 && (typeof __args[0] === 'object' && __args[0] != null) && typeof __args[1] === 'function') { if (closed) { throw new Error('Proxy is closed'); } diff --git a/service-proxy-examples/service-provider/src/main/resources/vertx-processor-sample-js/processor_service.js b/service-proxy-examples/service-provider/src/main/resources/vertx-processor-sample-js/processor_service.js index c95de9eea..f3bda011b 100644 --- a/service-proxy-examples/service-provider/src/main/resources/vertx-processor-sample-js/processor_service.js +++ b/service-proxy-examples/service-provider/src/main/resources/vertx-processor-sample-js/processor_service.js @@ -40,7 +40,7 @@ var ProcessorService = function(j_val) { */ this.process = function(document, resultHandler) { var __args = arguments; - if (__args.length === 2 && typeof __args[0] === 'object' && typeof __args[1] === 'function') { + if (__args.length === 2 && (typeof __args[0] === 'object' && __args[0] != null) && typeof __args[1] === 'function') { j_processorService["process(io.vertx.core.json.JsonObject,io.vertx.core.Handler)"](utils.convParamJsonObject(document), function(ar) { if (ar.succeeded()) { resultHandler(utils.convReturnJson(ar.result()), null); diff --git a/shell-examples/pom.xml b/shell-examples/pom.xml index 5bdd916b4..af8cdd1db 100644 --- a/shell-examples/pom.xml +++ b/shell-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx shell-examples - 3.1.0 + 3.2.0-SNAPSHOT @@ -15,6 +15,11 @@ vertx-shell ${project.version} + + io.vertx + vertx-dropwizard-metrics + ${project.version} + diff --git a/shell-examples/src/main/groovy/io/vertx/example/shell/echokeyboard/echo_keyboard_command.groovy b/shell-examples/src/main/groovy/io/vertx/example/shell/echokeyboard/echo_keyboard_command.groovy index 39e0934a4..b4af062e1 100644 --- a/shell-examples/src/main/groovy/io/vertx/example/shell/echokeyboard/echo_keyboard_command.groovy +++ b/shell-examples/src/main/groovy/io/vertx/example/shell/echokeyboard/echo_keyboard_command.groovy @@ -1,6 +1,6 @@ -import io.vertx.ext.shell.io.EventType import io.vertx.groovy.ext.shell.command.CommandBuilder import io.vertx.groovy.ext.shell.ShellService +import io.vertx.groovy.ext.shell.command.CommandRegistry def starwars = CommandBuilder.command("echokeyboard").processHandler({ process -> @@ -10,11 +10,11 @@ def starwars = CommandBuilder.command("echokeyboard").processHandler({ process - }) // Terminate when user hits Ctrl-C - process.eventHandler(EventType.SIGINT, { v -> + process.interruptHandler({ v -> process.end() }) -}).build() +}).build(vertx) def service = ShellService.create(vertx, [ telnetOptions:[ @@ -22,7 +22,7 @@ def service = ShellService.create(vertx, [ port:3000 ] ]) -service.getCommandRegistry().registerCommand(starwars) +CommandRegistry.get(vertx).registerCommand(starwars) service.start({ ar -> if (!ar.succeeded()) { ar.cause().printStackTrace() diff --git a/shell-examples/src/main/groovy/io/vertx/example/shell/helloworld/hello_world_command.groovy b/shell-examples/src/main/groovy/io/vertx/example/shell/helloworld/hello_world_command.groovy index 633967657..0e32ebfa9 100644 --- a/shell-examples/src/main/groovy/io/vertx/example/shell/helloworld/hello_world_command.groovy +++ b/shell-examples/src/main/groovy/io/vertx/example/shell/helloworld/hello_world_command.groovy @@ -1,10 +1,11 @@ import io.vertx.groovy.ext.shell.command.CommandBuilder import io.vertx.groovy.ext.shell.ShellService +import io.vertx.groovy.ext.shell.command.CommandRegistry def helloWorld = CommandBuilder.command("hello-world").processHandler({ process -> process.write("hello world\n") process.end() -}).build() +}).build(vertx) def service = ShellService.create(vertx, [ telnetOptions:[ @@ -12,7 +13,7 @@ def service = ShellService.create(vertx, [ port:3000 ] ]) -service.getCommandRegistry().registerCommand(helloWorld) +CommandRegistry.get(vertx).registerCommand(helloWorld) service.start({ ar -> if (!ar.succeeded()) { ar.cause().printStackTrace() diff --git a/shell-examples/src/main/groovy/io/vertx/example/shell/starwars/starwars_command.groovy b/shell-examples/src/main/groovy/io/vertx/example/shell/starwars/starwars_command.groovy index b63e4fc12..a7cd5b6dd 100644 --- a/shell-examples/src/main/groovy/io/vertx/example/shell/starwars/starwars_command.groovy +++ b/shell-examples/src/main/groovy/io/vertx/example/shell/starwars/starwars_command.groovy @@ -1,6 +1,6 @@ -import io.vertx.ext.shell.io.EventType import io.vertx.groovy.ext.shell.command.CommandBuilder import io.vertx.groovy.ext.shell.ShellService +import io.vertx.groovy.ext.shell.command.CommandRegistry def starwars = CommandBuilder.command("starwars").processHandler({ process -> @@ -11,7 +11,7 @@ def starwars = CommandBuilder.command("starwars").processHandler({ process -> def socket = ar.result() // Ctrl-C closes the socket - process.eventHandler(EventType.SIGINT, { v -> + process.interruptHandler({ v -> socket.close() }) @@ -32,7 +32,7 @@ def starwars = CommandBuilder.command("starwars").processHandler({ process -> process.write("Could not connect to remote Starwars server\n").end() } }) -}).build() +}).build(vertx) def service = ShellService.create(vertx, [ telnetOptions:[ @@ -40,7 +40,7 @@ def service = ShellService.create(vertx, [ port:3000 ] ]) -service.getCommandRegistry().registerCommand(starwars) +CommandRegistry.get(vertx).registerCommand(starwars) service.start({ ar -> if (!ar.succeeded()) { ar.cause().printStackTrace() diff --git a/shell-examples/src/main/groovy/io/vertx/example/shell/wget/wget_command.groovy b/shell-examples/src/main/groovy/io/vertx/example/shell/wget/wget_command.groovy index 538351e61..5b9e3f93a 100644 --- a/shell-examples/src/main/groovy/io/vertx/example/shell/wget/wget_command.groovy +++ b/shell-examples/src/main/groovy/io/vertx/example/shell/wget/wget_command.groovy @@ -1,6 +1,7 @@ import io.vertx.groovy.core.cli.CLI import io.vertx.groovy.ext.shell.command.CommandBuilder import io.vertx.groovy.ext.shell.ShellService +import io.vertx.groovy.ext.shell.command.CommandRegistry // Create the wget CLI def cli = CLI.create("wget").setSummary("Wget implemented with Vert.x HTTP client").addArgument([ @@ -43,7 +44,7 @@ def helloWorld = CommandBuilder.command(cli).processHandler({ process -> }) req.end() -}).build() +}).build(vertx) def service = ShellService.create(vertx, [ telnetOptions:[ @@ -51,7 +52,7 @@ def service = ShellService.create(vertx, [ port:3000 ] ]) -service.getCommandRegistry().registerCommand(helloWorld) +CommandRegistry.get(vertx).registerCommand(helloWorld) service.start({ ar -> if (!ar.succeeded()) { ar.cause().printStackTrace() diff --git a/shell-examples/src/main/java/io/vertx/example/shell/echokeyboard/EchoKeyboardCommand.java b/shell-examples/src/main/java/io/vertx/example/shell/echokeyboard/EchoKeyboardCommand.java index b941b3075..2c8fb3a11 100644 --- a/shell-examples/src/main/java/io/vertx/example/shell/echokeyboard/EchoKeyboardCommand.java +++ b/shell-examples/src/main/java/io/vertx/example/shell/echokeyboard/EchoKeyboardCommand.java @@ -6,8 +6,9 @@ import io.vertx.ext.shell.ShellServiceOptions; import io.vertx.ext.shell.command.Command; import io.vertx.ext.shell.command.CommandBuilder; -import io.vertx.ext.shell.io.EventType; -import io.vertx.ext.shell.net.TelnetOptions; +import io.vertx.ext.shell.command.CommandRegistry; +import io.vertx.ext.shell.term.TelnetTermOptions; + import java.util.ArrayList; import java.util.Formatter; @@ -35,16 +36,16 @@ public void start() throws Exception { }); // Terminate when user hits Ctrl-C - process.eventHandler(EventType.SIGINT, v -> { + process.interruptHandler(v -> { process.end(); }); - }).build(); + }).build(vertx); ShellService service = ShellService.create(vertx, new ShellServiceOptions().setTelnetOptions( - new TelnetOptions().setHost("localhost").setPort(3000) + new TelnetTermOptions().setHost("localhost").setPort(3000) )); - service.getCommandRegistry().registerCommand(starwars); + CommandRegistry.get(vertx).registerCommand(starwars); service.start(ar -> { if (!ar.succeeded()) { ar.cause().printStackTrace(); diff --git a/shell-examples/src/main/java/io/vertx/example/shell/helloworld/HelloWorldCommand.java b/shell-examples/src/main/java/io/vertx/example/shell/helloworld/HelloWorldCommand.java index 2beb5d1df..4731cd72d 100644 --- a/shell-examples/src/main/java/io/vertx/example/shell/helloworld/HelloWorldCommand.java +++ b/shell-examples/src/main/java/io/vertx/example/shell/helloworld/HelloWorldCommand.java @@ -6,8 +6,8 @@ import io.vertx.ext.shell.ShellServiceOptions; import io.vertx.ext.shell.command.Command; import io.vertx.ext.shell.command.CommandBuilder; -import io.vertx.ext.shell.command.CommandProcess; -import io.vertx.ext.shell.net.TelnetOptions; +import io.vertx.ext.shell.command.CommandRegistry; +import io.vertx.ext.shell.term.TelnetTermOptions; /* * @author Julien Viet @@ -26,12 +26,12 @@ public void start() throws Exception { processHandler(process -> { process.write("hello world\n"); process.end(); - }).build(); + }).build(vertx); ShellService service = ShellService.create(vertx, new ShellServiceOptions().setTelnetOptions( - new TelnetOptions().setHost("localhost").setPort(3000) + new TelnetTermOptions().setHost("localhost").setPort(3000) )); - service.getCommandRegistry().registerCommand(helloWorld); + CommandRegistry.get(vertx).registerCommand(helloWorld); service.start(ar -> { if (!ar.succeeded()) { ar.cause().printStackTrace(); diff --git a/shell-examples/src/main/java/io/vertx/example/shell/run_service_ssh/RunShell.java b/shell-examples/src/main/java/io/vertx/example/shell/run_service_ssh/RunShell.java index ce254a2f2..000d7dd7c 100644 --- a/shell-examples/src/main/java/io/vertx/example/shell/run_service_ssh/RunShell.java +++ b/shell-examples/src/main/java/io/vertx/example/shell/run_service_ssh/RunShell.java @@ -5,10 +5,10 @@ import io.vertx.core.json.JsonObject; import io.vertx.core.net.JksOptions; import io.vertx.example.util.Runner; +import io.vertx.ext.auth.shiro.ShiroAuthOptions; import io.vertx.ext.shell.ShellService; import io.vertx.ext.shell.ShellServiceOptions; -import io.vertx.ext.shell.auth.ShiroAuthOptions; -import io.vertx.ext.shell.net.SSHOptions; +import io.vertx.ext.shell.term.SSHTermOptions; /** * @author Julien Viet @@ -24,7 +24,7 @@ public static void main(String[] args) { public void start(Future startFuture) throws Exception { ShellService service = ShellService.create(vertx, new ShellServiceOptions(). setSSHOptions( - new SSHOptions(). + new SSHTermOptions(). setHost("localhost"). setPort(3000). setKeyPairOptions(new JksOptions(). diff --git a/shell-examples/src/main/java/io/vertx/example/shell/run_service_telnet/RunShell.java b/shell-examples/src/main/java/io/vertx/example/shell/run_service_telnet/RunShell.java index 7eda1e80e..d045ac365 100644 --- a/shell-examples/src/main/java/io/vertx/example/shell/run_service_telnet/RunShell.java +++ b/shell-examples/src/main/java/io/vertx/example/shell/run_service_telnet/RunShell.java @@ -4,7 +4,7 @@ import io.vertx.example.util.Runner; import io.vertx.ext.shell.ShellService; import io.vertx.ext.shell.ShellServiceOptions; -import io.vertx.ext.shell.net.TelnetOptions; +import io.vertx.ext.shell.term.TelnetTermOptions; /** * @author Julien Viet @@ -19,7 +19,7 @@ public static void main(String[] args) { @Override public void start() throws Exception { ShellService service = ShellService.create(vertx, new ShellServiceOptions().setTelnetOptions( - new TelnetOptions().setHost("localhost").setPort(3000) + new TelnetTermOptions().setHost("localhost").setPort(3000) )); service.start(); } diff --git a/shell-examples/src/main/java/io/vertx/example/shell/starwars/StarwarsCommand.java b/shell-examples/src/main/java/io/vertx/example/shell/starwars/StarwarsCommand.java index cfcc1da84..73c2046a3 100644 --- a/shell-examples/src/main/java/io/vertx/example/shell/starwars/StarwarsCommand.java +++ b/shell-examples/src/main/java/io/vertx/example/shell/starwars/StarwarsCommand.java @@ -1,23 +1,15 @@ package io.vertx.example.shell.starwars; import io.vertx.core.AbstractVerticle; -import io.vertx.core.cli.Argument; -import io.vertx.core.cli.CLI; -import io.vertx.core.http.HttpClient; -import io.vertx.core.http.HttpClientRequest; import io.vertx.core.net.NetClient; -import io.vertx.core.net.NetClientOptions; import io.vertx.core.net.NetSocket; import io.vertx.example.util.Runner; import io.vertx.ext.shell.ShellService; import io.vertx.ext.shell.ShellServiceOptions; import io.vertx.ext.shell.command.Command; import io.vertx.ext.shell.command.CommandBuilder; -import io.vertx.ext.shell.io.EventType; -import io.vertx.ext.shell.net.TelnetOptions; - -import java.net.MalformedURLException; -import java.net.URL; +import io.vertx.ext.shell.command.CommandRegistry; +import io.vertx.ext.shell.term.TelnetTermOptions; /** * @author Julien Viet @@ -42,7 +34,7 @@ public void start() throws Exception { NetSocket socket = ar.result(); // Ctrl-C closes the socket - process.eventHandler(EventType.SIGINT, v -> { + process.interruptHandler(v -> { socket.close(); }); @@ -63,12 +55,12 @@ public void start() throws Exception { process.write("Could not connect to remote Starwars server\n").end(); } }); - }).build(); + }).build(vertx); ShellService service = ShellService.create(vertx, new ShellServiceOptions().setTelnetOptions( - new TelnetOptions().setHost("localhost").setPort(3000) + new TelnetTermOptions().setHost("localhost").setPort(3000) )); - service.getCommandRegistry().registerCommand(starwars); + CommandRegistry.get(vertx).registerCommand(starwars); service.start(ar -> { if (!ar.succeeded()) { ar.cause().printStackTrace(); diff --git a/shell-examples/src/main/java/io/vertx/example/shell/top/TopCommand.java b/shell-examples/src/main/java/io/vertx/example/shell/top/TopCommand.java index 0c2d06c09..e5063aea3 100644 --- a/shell-examples/src/main/java/io/vertx/example/shell/top/TopCommand.java +++ b/shell-examples/src/main/java/io/vertx/example/shell/top/TopCommand.java @@ -1,15 +1,13 @@ package io.vertx.example.shell.top; import io.vertx.core.AbstractVerticle; -import io.vertx.core.net.NetClient; -import io.vertx.core.net.NetSocket; import io.vertx.example.util.Runner; import io.vertx.ext.shell.ShellService; import io.vertx.ext.shell.ShellServiceOptions; import io.vertx.ext.shell.command.Command; import io.vertx.ext.shell.command.CommandBuilder; -import io.vertx.ext.shell.io.EventType; -import io.vertx.ext.shell.net.TelnetOptions; +import io.vertx.ext.shell.command.CommandRegistry; +import io.vertx.ext.shell.term.TelnetTermOptions; import java.util.ArrayList; import java.util.Formatter; @@ -66,17 +64,17 @@ public void start() throws Exception { }); // Terminate when user hits Ctrl-C - process.eventHandler(EventType.SIGINT, v -> { + process.interruptHandler(v -> { vertx.cancelTimer(id); process.end(); }); - }).build(); + }).build(vertx); ShellService service = ShellService.create(vertx, new ShellServiceOptions().setTelnetOptions( - new TelnetOptions().setHost("localhost").setPort(3000) + new TelnetTermOptions().setHost("localhost").setPort(3000) )); - service.getCommandRegistry().registerCommand(starwars); + CommandRegistry.get(vertx).registerCommand(starwars); service.start(ar -> { if (!ar.succeeded()) { ar.cause().printStackTrace(); diff --git a/shell-examples/src/main/java/io/vertx/example/shell/wget/WgetCommand.java b/shell-examples/src/main/java/io/vertx/example/shell/wget/WgetCommand.java index 64b04f721..07d361b79 100644 --- a/shell-examples/src/main/java/io/vertx/example/shell/wget/WgetCommand.java +++ b/shell-examples/src/main/java/io/vertx/example/shell/wget/WgetCommand.java @@ -10,7 +10,8 @@ import io.vertx.ext.shell.ShellServiceOptions; import io.vertx.ext.shell.command.Command; import io.vertx.ext.shell.command.CommandBuilder; -import io.vertx.ext.shell.net.TelnetOptions; +import io.vertx.ext.shell.command.CommandRegistry; +import io.vertx.ext.shell.term.TelnetTermOptions; import java.net.MalformedURLException; import java.net.URL; @@ -66,12 +67,12 @@ public void start() throws Exception { }); req.end(); - }).build(); + }).build(vertx); ShellService service = ShellService.create(vertx, new ShellServiceOptions().setTelnetOptions( - new TelnetOptions().setHost("localhost").setPort(3000) + new TelnetTermOptions().setHost("localhost").setPort(3000) )); - service.getCommandRegistry().registerCommand(helloWorld); + CommandRegistry.get(vertx).registerCommand(helloWorld); service.start(ar -> { if (!ar.succeeded()) { ar.cause().printStackTrace(); diff --git a/shell-examples/src/main/js/io/vertx/example/shell/echokeyboard/echo_keyboard_command.js b/shell-examples/src/main/js/io/vertx/example/shell/echokeyboard/echo_keyboard_command.js index 7dfefa9c2..e2bd93fd5 100644 --- a/shell-examples/src/main/js/io/vertx/example/shell/echokeyboard/echo_keyboard_command.js +++ b/shell-examples/src/main/js/io/vertx/example/shell/echokeyboard/echo_keyboard_command.js @@ -1,5 +1,6 @@ var CommandBuilder = require("vertx-shell-js/command_builder"); var ShellService = require("vertx-shell-js/shell_service"); +var CommandRegistry = require("vertx-shell-js/command_registry"); var starwars = CommandBuilder.command("echokeyboard").processHandler(function (process) { @@ -9,11 +10,11 @@ var starwars = CommandBuilder.command("echokeyboard").processHandler(function (p }); // Terminate when user hits Ctrl-C - process.eventHandler('SIGINT', function (v) { + process.interruptHandler(function (v) { process.end(); }); -}).build(); +}).build(vertx); var service = ShellService.create(vertx, { "telnetOptions" : { @@ -21,7 +22,7 @@ var service = ShellService.create(vertx, { "port" : 3000 } }); -service.getCommandRegistry().registerCommand(starwars); +CommandRegistry.get(vertx).registerCommand(starwars); service.start(function (ar, ar_err) { if (!ar_err == null) { ar_err.printStackTrace(); diff --git a/shell-examples/src/main/js/io/vertx/example/shell/helloworld/hello_world_command.js b/shell-examples/src/main/js/io/vertx/example/shell/helloworld/hello_world_command.js index 9147fb9c4..3b9626357 100644 --- a/shell-examples/src/main/js/io/vertx/example/shell/helloworld/hello_world_command.js +++ b/shell-examples/src/main/js/io/vertx/example/shell/helloworld/hello_world_command.js @@ -1,10 +1,11 @@ var CommandBuilder = require("vertx-shell-js/command_builder"); var ShellService = require("vertx-shell-js/shell_service"); +var CommandRegistry = require("vertx-shell-js/command_registry"); var helloWorld = CommandBuilder.command("hello-world").processHandler(function (process) { process.write("hello world\n"); process.end(); -}).build(); +}).build(vertx); var service = ShellService.create(vertx, { "telnetOptions" : { @@ -12,7 +13,7 @@ var service = ShellService.create(vertx, { "port" : 3000 } }); -service.getCommandRegistry().registerCommand(helloWorld); +CommandRegistry.get(vertx).registerCommand(helloWorld); service.start(function (ar, ar_err) { if (!ar_err == null) { ar_err.printStackTrace(); diff --git a/shell-examples/src/main/js/io/vertx/example/shell/starwars/starwars_command.js b/shell-examples/src/main/js/io/vertx/example/shell/starwars/starwars_command.js index 78335db1c..e47f328d4 100644 --- a/shell-examples/src/main/js/io/vertx/example/shell/starwars/starwars_command.js +++ b/shell-examples/src/main/js/io/vertx/example/shell/starwars/starwars_command.js @@ -1,5 +1,6 @@ var CommandBuilder = require("vertx-shell-js/command_builder"); var ShellService = require("vertx-shell-js/shell_service"); +var CommandRegistry = require("vertx-shell-js/command_registry"); var starwars = CommandBuilder.command("starwars").processHandler(function (process) { @@ -10,7 +11,7 @@ var starwars = CommandBuilder.command("starwars").processHandler(function (proce var socket = ar; // Ctrl-C closes the socket - process.eventHandler('SIGINT', function (v) { + process.interruptHandler(function (v) { socket.close(); }); @@ -31,7 +32,7 @@ var starwars = CommandBuilder.command("starwars").processHandler(function (proce process.write("Could not connect to remote Starwars server\n").end(); } }); -}).build(); +}).build(vertx); var service = ShellService.create(vertx, { "telnetOptions" : { @@ -39,7 +40,7 @@ var service = ShellService.create(vertx, { "port" : 3000 } }); -service.getCommandRegistry().registerCommand(starwars); +CommandRegistry.get(vertx).registerCommand(starwars); service.start(function (ar, ar_err) { if (!ar_err == null) { ar_err.printStackTrace(); diff --git a/shell-examples/src/main/js/io/vertx/example/shell/wget/wget_command.js b/shell-examples/src/main/js/io/vertx/example/shell/wget/wget_command.js index 30bb581b3..935da3cdd 100644 --- a/shell-examples/src/main/js/io/vertx/example/shell/wget/wget_command.js +++ b/shell-examples/src/main/js/io/vertx/example/shell/wget/wget_command.js @@ -1,6 +1,7 @@ var CLI = require("vertx-js/cli"); var CommandBuilder = require("vertx-shell-js/command_builder"); var ShellService = require("vertx-shell-js/shell_service"); +var CommandRegistry = require("vertx-shell-js/command_registry"); // Create the wget CLI var cli = CLI.create("wget").setSummary("Wget implemented with Vert.x HTTP client").addArgument({ @@ -43,7 +44,7 @@ var helloWorld = CommandBuilder.command(cli).processHandler(function (process) { }); req.end(); -}).build(); +}).build(vertx); var service = ShellService.create(vertx, { "telnetOptions" : { @@ -51,7 +52,7 @@ var service = ShellService.create(vertx, { "port" : 3000 } }); -service.getCommandRegistry().registerCommand(helloWorld); +CommandRegistry.get(vertx).registerCommand(helloWorld); service.start(function (ar, ar_err) { if (!ar_err == null) { ar_err.printStackTrace(); diff --git a/shell-examples/src/main/rb/io/vertx/example/shell/echokeyboard/echo_keyboard_command.rb b/shell-examples/src/main/rb/io/vertx/example/shell/echokeyboard/echo_keyboard_command.rb index 445efa949..16284fbec 100644 --- a/shell-examples/src/main/rb/io/vertx/example/shell/echokeyboard/echo_keyboard_command.rb +++ b/shell-examples/src/main/rb/io/vertx/example/shell/echokeyboard/echo_keyboard_command.rb @@ -1,19 +1,20 @@ require 'vertx-shell/command_builder' require 'vertx-shell/shell_service' +require 'vertx-shell/command_registry' starwars = VertxShell::CommandBuilder.command("echokeyboard").process_handler() { |process| # Echo - process.set_stdin() { |keys| + process.set_stdin(lambda { |keys| process.write(keys.replace('\r', '\n')) - } + }) # Terminate when user hits Ctrl-C - process.event_handler(:SIGINT) { |v| + process.interrupt_handler() { |v| process.end() } -}.build() +}.build($vertx) service = VertxShell::ShellService.create($vertx, { 'telnetOptions' => { @@ -21,7 +22,7 @@ 'port' => 3000 } }) -service.get_command_registry().register_command(starwars) +VertxShell::CommandRegistry.get($vertx).register_command(starwars) service.start() { |ar_err,ar| if (!ar_err == nil) ar_err.print_stack_trace() diff --git a/shell-examples/src/main/rb/io/vertx/example/shell/helloworld/hello_world_command.rb b/shell-examples/src/main/rb/io/vertx/example/shell/helloworld/hello_world_command.rb index 5a6dfbe23..8abf62bf6 100644 --- a/shell-examples/src/main/rb/io/vertx/example/shell/helloworld/hello_world_command.rb +++ b/shell-examples/src/main/rb/io/vertx/example/shell/helloworld/hello_world_command.rb @@ -1,10 +1,11 @@ require 'vertx-shell/command_builder' require 'vertx-shell/shell_service' +require 'vertx-shell/command_registry' helloWorld = VertxShell::CommandBuilder.command("hello-world").process_handler() { |process| process.write("hello world\n") process.end() -}.build() +}.build($vertx) service = VertxShell::ShellService.create($vertx, { 'telnetOptions' => { @@ -12,7 +13,7 @@ 'port' => 3000 } }) -service.get_command_registry().register_command(helloWorld) +VertxShell::CommandRegistry.get($vertx).register_command(helloWorld) service.start() { |ar_err,ar| if (!ar_err == nil) ar_err.print_stack_trace() diff --git a/shell-examples/src/main/rb/io/vertx/example/shell/starwars/starwars_command.rb b/shell-examples/src/main/rb/io/vertx/example/shell/starwars/starwars_command.rb index eb32f3c2e..50f566992 100644 --- a/shell-examples/src/main/rb/io/vertx/example/shell/starwars/starwars_command.rb +++ b/shell-examples/src/main/rb/io/vertx/example/shell/starwars/starwars_command.rb @@ -1,5 +1,6 @@ require 'vertx-shell/command_builder' require 'vertx-shell/shell_service' +require 'vertx-shell/command_registry' starwars = VertxShell::CommandBuilder.command("starwars").process_handler() { |process| @@ -10,7 +11,7 @@ socket = ar # Ctrl-C closes the socket - process.event_handler(:SIGINT) { |v| + process.interrupt_handler() { |v| socket.close() } @@ -31,7 +32,7 @@ process.write("Could not connect to remote Starwars server\n").end() end } -}.build() +}.build($vertx) service = VertxShell::ShellService.create($vertx, { 'telnetOptions' => { @@ -39,7 +40,7 @@ 'port' => 3000 } }) -service.get_command_registry().register_command(starwars) +VertxShell::CommandRegistry.get($vertx).register_command(starwars) service.start() { |ar_err,ar| if (!ar_err == nil) ar_err.print_stack_trace() diff --git a/shell-examples/src/main/rb/io/vertx/example/shell/wget/wget_command.rb b/shell-examples/src/main/rb/io/vertx/example/shell/wget/wget_command.rb index 81b2279c7..0926aea89 100644 --- a/shell-examples/src/main/rb/io/vertx/example/shell/wget/wget_command.rb +++ b/shell-examples/src/main/rb/io/vertx/example/shell/wget/wget_command.rb @@ -1,6 +1,7 @@ require 'vertx/cli' require 'vertx-shell/command_builder' require 'vertx-shell/shell_service' +require 'vertx-shell/command_registry' # Create the wget CLI cli = Vertx::CLI.create("wget").set_summary("Wget implemented with Vert.x HTTP client").add_argument({ @@ -43,7 +44,7 @@ } req.end() -}.build() +}.build($vertx) service = VertxShell::ShellService.create($vertx, { 'telnetOptions' => { @@ -51,7 +52,7 @@ 'port' => 3000 } }) -service.get_command_registry().register_command(helloWorld) +VertxShell::CommandRegistry.get($vertx).register_command(helloWorld) service.start() { |ar_err,ar| if (!ar_err == nil) ar_err.print_stack_trace() diff --git a/spring-examples/pom.xml b/spring-examples/pom.xml index b47be135f..a23f079b2 100644 --- a/spring-examples/pom.xml +++ b/spring-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx spring-examples - 3.1.0 + 3.2.0-SNAPSHOT pom diff --git a/spring-examples/spring-example/README.adoc b/spring-examples/spring-example/README.adoc index 27b2819c2..090768d0b 100644 --- a/spring-examples/spring-example/README.adoc +++ b/spring-examples/spring-example/README.adoc @@ -21,7 +21,7 @@ To build a "fat jar" To run the fat jar: - java -jar target/spring-example-3.1.0-fat.jar + java -jar target/spring-example-3.2.0-SNAPSHOT-fat.jar (You can take that jar and run it anywhere there is a Java 8+ JDK. It contains all the dependencies it needs so you don't need to install Vert.x on the target machine). diff --git a/spring-examples/spring-example/pom.xml b/spring-examples/spring-example/pom.xml index 8ab54f633..c2c9c72e3 100644 --- a/spring-examples/spring-example/pom.xml +++ b/spring-examples/spring-example/pom.xml @@ -5,7 +5,7 @@ io.vertx spring-example - 3.1.0 + 3.2.0-SNAPSHOT spring-example diff --git a/spring-examples/springboot-example/pom.xml b/spring-examples/springboot-example/pom.xml index a2f1669f9..ea47f22df 100644 --- a/spring-examples/springboot-example/pom.xml +++ b/spring-examples/springboot-example/pom.xml @@ -22,12 +22,12 @@ io.vertx vertx-core - 3.1.0 + 3.2.0-SNAPSHOT io.vertx vertx-web - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/sync-examples/pom.xml b/sync-examples/pom.xml index 775352db8..a77587c10 100644 --- a/sync-examples/pom.xml +++ b/sync-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx sync-examples - 3.1.0 + 3.2.0-SNAPSHOT @@ -25,7 +25,7 @@ io.vertx vertx-sync - 3.1.0 + 3.2.0-SNAPSHOT @@ -37,7 +37,7 @@ io.vertx vertx-sql-common - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/unit-examples/pom.xml b/unit-examples/pom.xml index ba33c915f..f3c55ea2a 100644 --- a/unit-examples/pom.xml +++ b/unit-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx unit-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/web-examples/pom.xml b/web-examples/pom.xml index cdf436496..b9078ff15 100644 --- a/web-examples/pom.xml +++ b/web-examples/pom.xml @@ -6,7 +6,7 @@ io.vertx web-examples - 3.1.0 + 3.2.0-SNAPSHOT diff --git a/web-examples/src/main/groovy/io/vertx/example/web/authorisation/server.groovy b/web-examples/src/main/groovy/io/vertx/example/web/authorisation/server.groovy index c32ffcfe8..2c0344592 100644 --- a/web-examples/src/main/groovy/io/vertx/example/web/authorisation/server.groovy +++ b/web-examples/src/main/groovy/io/vertx/example/web/authorisation/server.groovy @@ -25,7 +25,7 @@ router.get("/api/newToken").handler({ ctx -> ctx.response().putHeader("Content-Type", "text/plain") ctx.response().end(jwt.generateToken([:], [ - expiresInSeconds:60, + expiresInSeconds:60L, permissions:authorities ])) }) diff --git a/web-examples/src/main/groovy/io/vertx/example/web/custom_authorisation/server.groovy b/web-examples/src/main/groovy/io/vertx/example/web/custom_authorisation/server.groovy index 7326080b8..236834c47 100644 --- a/web-examples/src/main/groovy/io/vertx/example/web/custom_authorisation/server.groovy +++ b/web-examples/src/main/groovy/io/vertx/example/web/custom_authorisation/server.groovy @@ -24,7 +24,7 @@ router.get("/api/newToken").handler({ ctx -> ctx.response().putHeader("Content-Type", "text/plain") ctx.response().end(jwt.generateToken([:], [ - expiresInSeconds:60, + expiresInSeconds:60L, permissions:authorities ])) }) diff --git a/web-examples/src/main/groovy/io/vertx/example/web/jwt/server.groovy b/web-examples/src/main/groovy/io/vertx/example/web/jwt/server.groovy index a26672933..9f35d0f81 100644 --- a/web-examples/src/main/groovy/io/vertx/example/web/jwt/server.groovy +++ b/web-examples/src/main/groovy/io/vertx/example/web/jwt/server.groovy @@ -21,7 +21,7 @@ router.route("/api/*").handler(JWTAuthHandler.create(jwt, "/api/newToken")) router.get("/api/newToken").handler({ ctx -> ctx.response().putHeader("Content-Type", "text/plain") ctx.response().end(jwt.generateToken([:], [ - expiresInSeconds:60 + expiresInSeconds:60L ])) }) diff --git a/web-examples/src/main/java/io/vertx/example/web/authorisation/Server.java b/web-examples/src/main/java/io/vertx/example/web/authorisation/Server.java index 01c63b67c..f086bf13f 100644 --- a/web-examples/src/main/java/io/vertx/example/web/authorisation/Server.java +++ b/web-examples/src/main/java/io/vertx/example/web/authorisation/Server.java @@ -44,7 +44,8 @@ public void start() throws Exception { } ctx.response().putHeader("Content-Type", "text/plain"); - ctx.response().end(jwt.generateToken(new JsonObject(), new JWTOptions().setExpiresInSeconds(60).setPermissions(authorities))); + ctx.response().end(jwt.generateToken(new JsonObject(), new JWTOptions().setExpiresInSeconds(60L).setPermissions + (authorities))); }); // protect the API (any authority is allowed) diff --git a/web-examples/src/main/java/io/vertx/example/web/custom_authorisation/Server.java b/web-examples/src/main/java/io/vertx/example/web/custom_authorisation/Server.java index f9ed56585..1f97d2770 100644 --- a/web-examples/src/main/java/io/vertx/example/web/custom_authorisation/Server.java +++ b/web-examples/src/main/java/io/vertx/example/web/custom_authorisation/Server.java @@ -43,7 +43,8 @@ public void start() throws Exception { } ctx.response().putHeader("Content-Type", "text/plain"); - ctx.response().end(jwt.generateToken(new JsonObject(), new JWTOptions().setExpiresInSeconds(60).setPermissions(authorities))); + ctx.response().end(jwt.generateToken(new JsonObject(), new JWTOptions().setExpiresInSeconds(60L).setPermissions + (authorities))); }); router.route("/api/protected*").handler(JWTAuthHandler.create(jwt)); diff --git a/web-examples/src/main/java/io/vertx/example/web/jwt/Server.java b/web-examples/src/main/java/io/vertx/example/web/jwt/Server.java index f70041f0e..2d23af684 100644 --- a/web-examples/src/main/java/io/vertx/example/web/jwt/Server.java +++ b/web-examples/src/main/java/io/vertx/example/web/jwt/Server.java @@ -36,7 +36,7 @@ public void start() throws Exception { // this route is excluded from the auth handler router.get("/api/newToken").handler(ctx -> { ctx.response().putHeader("Content-Type", "text/plain"); - ctx.response().end(jwt.generateToken(new JsonObject(), new JWTOptions().setExpiresInSeconds(60))); + ctx.response().end(jwt.generateToken(new JsonObject(), new JWTOptions().setExpiresInSeconds(60L))); }); // this is the secret API diff --git a/web-examples/src/main/java/io/vertx/example/web/vertxbus/amd/webroot/bower.json b/web-examples/src/main/java/io/vertx/example/web/vertxbus/amd/webroot/bower.json index ac5968c0b..2017378b1 100644 --- a/web-examples/src/main/java/io/vertx/example/web/vertxbus/amd/webroot/bower.json +++ b/web-examples/src/main/java/io/vertx/example/web/vertxbus/amd/webroot/bower.json @@ -8,6 +8,6 @@ ], "dependencies": { "sockjs-client": "1.0.0", - "vertx3-eventbus-client": "3.1.0" + "vertx3-eventbus-client": "3.2.0-SNAPSHOT" } } diff --git a/web-examples/src/main/java/io/vertx/example/web/vertxbus/webpack/client/package.json b/web-examples/src/main/java/io/vertx/example/web/vertxbus/webpack/client/package.json index 1242daf8d..969db7e66 100644 --- a/web-examples/src/main/java/io/vertx/example/web/vertxbus/webpack/client/package.json +++ b/web-examples/src/main/java/io/vertx/example/web/vertxbus/webpack/client/package.json @@ -23,7 +23,7 @@ "sockjs-client": "^1.0.3", "style-loader": "^0.12.3", "url-loader": "^0.5.6", - "vertx3-eventbus-client": "^3.1.0", + "vertx3-eventbus-client": "^3.2.0-SNAPSHOT", "webpack": "^1.10.5", "webpack-dev-server": "^1.10.1", "webpack-merge": "^0.1.2"