jonahkh
2020-05-29 5eeffe88821b8fa7427a4d92b44a88cefec1e700
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
= Vert.x Simplest Maven project
 
This project shows a very simple hello world Vert.x project using Maven, 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 pom.xml uses the Maven shade plugin to assemble the application and all it's dependencies into a single "fat" jar.
 
To run with maven
 
    mvn compile exec:java
 
To build a "fat jar"
 
    mvn package
 
To run the fat jar:
 
    java -jar target/maven-simplest-3.9.0-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).
 
You can also run the fat jar with maven:
 
    mvn package exec:exec@run-app
 
Now point your browser at http://localhost:8080