Skip to content

Commit

Permalink
Add missing modules in parent and make upgrades (#448)
Browse files Browse the repository at this point in the history
* Add missing modules in parent and make upgrades

- vert.x 4.4.4
- gradlew 8.1.1

Signed-off-by: Thomas Segismont <[email protected]>

* Upgrade web-examples to 4.4.4

Signed-off-by: Thomas Segismont <[email protected]>

* Update or remove deprecated examples

Signed-off-by: Thomas Segismont <[email protected]>

* Upgrade to Kotlin 1.7.21

Signed-off-by: Thomas Segismont <[email protected]>

---------

Signed-off-by: Thomas Segismont <[email protected]>
  • Loading branch information
tsegismont authored Jun 22, 2023
1 parent cb30d83 commit e43a2ab
Show file tree
Hide file tree
Showing 124 changed files with 196 additions and 1,204 deletions.
2 changes: 1 addition & 1 deletion amqp-proton-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>amqp-proton-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<dependencies>
<!-- primary deps -->
Expand Down
4 changes: 2 additions & 2 deletions camel-bridge-examples/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Launch it by running the `main` method in your IDE or, after having build the pr


----
java -jar target/camel-bridge-examples-4.3.1.jar run io.vertx.example.camel.feed.FeedExample
java -jar target/camel-bridge-examples-4.4.4.jar run io.vertx.example.camel.feed.FeedExample
----

== RMI example
Expand All @@ -45,7 +45,7 @@ This example demonstrates:
Launch it by running the `main` method in your IDE , after having build the project with `mvn clean package`, with:

----
java -jar target/camel-bridge-examples-4.3.1.jar run io.vertx.example.camel.rmi.RMIExample
java -jar target/camel-bridge-examples-4.4.4.jar run io.vertx.example.camel.rmi.RMIExample
----

Then open your browser to: `http://localhost:8080/?name=world`
2 changes: 1 addition & 1 deletion camel-bridge-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>camel-bridge-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion cassandra-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>cassandra-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<build>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion circuit-breaker-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>circuit-breaker-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<build>
<plugins>
Expand Down
2 changes: 1 addition & 1 deletion consul-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>consul-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<dependencies>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion core-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>core-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<dependencies>

Expand Down
2 changes: 1 addition & 1 deletion grpc-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repositories {
def grpcVersion = '1.1.2' // CURRENT_GRPC_VERSION

dependencies {
compile "io.vertx:vertx-grpc:4.3.1"
implementation "io.vertx:vertx-grpc:$vertxVersion"
}

protobuf {
Expand Down
1 change: 1 addition & 0 deletions grpc-examples/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vertxVersion=4.4.4
Binary file added grpc-examples/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Jun 22 15:25:30 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
53 changes: 20 additions & 33 deletions kotlin-examples/koin-example/gradlew → grpc-examples/gradlew
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
#!/usr/bin/env sh

#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

##############################################################################
##
## Gradle start up script for UN*X
Expand Down Expand Up @@ -44,7 +28,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
Expand Down Expand Up @@ -82,7 +66,6 @@ esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar


# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
Expand Down Expand Up @@ -126,11 +109,10 @@ if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin or MSYS, switch paths to Windows format before running java
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`

JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
Expand All @@ -156,19 +138,19 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
else
eval `echo args$i`="\"$arg\""
fi
i=`expr $i + 1`
i=$((i+1))
done
case $i in
0) set -- ;;
1) set -- "$args0" ;;
2) set -- "$args0" "$args1" ;;
3) set -- "$args0" "$args1" "$args2" ;;
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

Expand All @@ -177,9 +159,14 @@ save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=`save "$@"`
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"
43 changes: 19 additions & 24 deletions kotlin-examples/web/gradlew.bat → grpc-examples/gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
Expand All @@ -29,18 +13,15 @@ if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -54,7 +35,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute
if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -64,14 +45,28 @@ echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
Expand Down
2 changes: 1 addition & 1 deletion grpc-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>grpc-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<properties>
<grpc.version>1.44.0</grpc.version>
Expand Down
13 changes: 4 additions & 9 deletions http2-showcase/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
plugins {
id 'java'
id 'application'
// id 'com.github.johnrengelman.shadow' version '1.2.4'
}

repositories {
mavenCentral()
}

dependencies {
compile "io.vertx:vertx-core:$vertxVersion"
compile "io.vertx:vertx-web:$vertxVersion"
compile "io.vertx:vertx-web-templ-handlebars:$vertxVersion"
implementation "io.vertx:vertx-core:$vertxVersion"
implementation "io.vertx:vertx-web:$vertxVersion"
implementation "io.vertx:vertx-web-templ-handlebars:$vertxVersion"

runtime "io.netty:netty-tcnative-boringssl-static:2.0.34.Final"
runtimeOnly "io.netty:netty-tcnative-boringssl-static:2.0.34.Final"
}

mainClassName = 'io.vertx.core.Launcher'
Expand All @@ -22,7 +21,3 @@ def mainVerticle = 'io.vertx.examples.http2.Http2ServerVerticle'
run {
args = ['run', mainVerticle]
}

task wrapper(type: Wrapper) {
gradleVersion = '4.0'
}
2 changes: 1 addition & 1 deletion http2-showcase/gradle.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vertxVersion=4.3.1
vertxVersion=4.4.4
Binary file modified http2-showcase/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions http2-showcase/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun Jun 18 19:04:08 CEST 2017
#Thu Jun 22 15:25:30 CEST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
2 changes: 1 addition & 1 deletion jpms-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>jpms-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<dependencies>

Expand Down
2 changes: 1 addition & 1 deletion junit5-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<groupId>io.vertx</groupId>
<artifactId>junit5-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<properties>
<junit-jupiter.version>5.6.2</junit-jupiter.version>
Expand Down
2 changes: 1 addition & 1 deletion kafka-examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.vertx</groupId>
<artifactId>kafka-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<properties>
<kafka.version>2.6.0</kafka.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void start() {
// The event bus bridge handler
SockJSBridgeOptions options = new SockJSBridgeOptions();
options.addOutboundPermitted(new PermittedOptions().setAddress("dashboard"));
router.mountSubRouter("/eventbus", SockJSHandler.create(vertx).bridge(options));
router.route("/eventbus*").subRouter(SockJSHandler.create(vertx).bridge(options));

// The web server handler
router.route().handler(StaticHandler.create().setCachingEnabled(false));
Expand Down
13 changes: 0 additions & 13 deletions kotlin-examples/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,3 @@ Here you can find the Vert.x https://kotlinlang.org/[Kotlin] examples
== Coroutines examples

The link:coroutines/README.md[Kotlin coroutines example] is a sample JDBC application demontrating Kotlin coroutines.

== Web

The link:web/README.md[Kotlin web example] is a basic JSON API written in Kotlin to
demonstrate how it can be used with Vert.x.

== kotlintest

The link:kotlintest/README.md[Kotlintest example] shows how to test Vert.x code using https://github.com/kotlintest/kotlintest[KotlinTest].

== Koin

The link:koin-example/README.adoc[Koin example] shows how to use a Kotlin based DI framework.
4 changes: 2 additions & 2 deletions kotlin-examples/coroutines/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@

<groupId>io.vertx</groupId>
<artifactId>kotlin-coroutines-examples</artifactId>
<version>4.3.1</version>
<version>4.4.4</version>

<properties>
<slf4j.version>1.7.21</slf4j.version>
<kotlin.version>1.5.10</kotlin.version>
<kotlin.version>1.7.21</kotlin.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
Expand Down
Loading

0 comments on commit e43a2ab

Please sign in to comment.