Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
src/main/java/org/vertx/demo
README.md
pom.xml

README.md

Custom Main Example

This project illustrates how to your own main class to start the application.

Redeployment

First, launch the application in redeploy mode using:

mvn compile vertx:run

Then, open a browser to http://localhost:8040, you should see Ola World, it works !. The Vert.x instance and the verticle are managed in our own main class (org.vertx.demo.MyMain). You can change this class, it triggers the redeployment.

The main class is configured in the pom.xml file using the vertx.launcher property:

<vertx.launcher>org.vertx.demo.MyMain</vertx.launcher>

When done with development, hit CTRL+C.

Packaging

Package the application using:

mvn clean package

The fat-jar is executable, so run it using:

java -jar target/custom-main-example-0.1-SNAPSHOT.jar 

Hit CTRL+C to stop the process.