Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
maven-service-factory-verticle Update for 3.5.3 Jul 11, 2018


Vert.x Maven Service Factory Example

This project demonstrates how to use the Vert.x Maven service factory. The Vertx Maven service factory lets you deploy and runs verticles packaged in Maven artifacts.

Packaging the verticle

The Maven service factory verticle project is an example of verticle that you can deploy using the Maven service factory. The project contains a very simple verticle but also a description specifying the main verticle class.

To build this verticle just launch mvn clean install from the maven-service-factory-verticle project. Install is important as it needs to be stored in the Maven local repository.

Running the verticle

You can run the verticle from anywhere using:

vertx run maven:io.vertx:maven-service-factory-verticle:3.5.3::my-verticle

The identifier is constructed as follows: maven + : + the groupId + : + the artifactId + : + the version + :: + the name of the verticle

The name of the verticle is the name of the json (descriptor) file.

Deploying the verticle using the API

You can also deploy the verticle using the vertx.deployVerticle method. An example is given in the Maven service factory api project. In this verticle, the previous verticle is deployed using:

vertx.deployVerticle("maven:io.vertx:maven-service-factory-verticle:3.5.3::my-verticle", r -> { ... });

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.5.3.jar