Vert.x 3.1 Simplest Gradle project
This project shows a very simple hello world Vert.x 3.1 project using Gradle, which has a simple HTTP server which simply returns "Hello World!" to every request.
In this example Vert.x is used embedded. I.e. we use the Vert.x APIs directly in our own classes rather than deploying the code in verticles.
You can run or debug the example in your IDE by just right clicking the main class and run as.. or debug as…
The build.gradle uses the Gradle shadowJar plugin to assemble the application and all it’s dependencies into a single "fat" jar.
To build the "fat jar"
Because the application plugin is being used, you may directly run the application:
You may also run the fat jar as a standalone runnable jar:
java -jar build/libs/gradle-simplest-3.3.3-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).
Now point your browser at http://localhost:8080