Skip to content

forge/vertx-addon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vertx-forge-addon

This JBoss Forge addon lets you create Vert.x projects.

It lets you:

  • create new Vert.x project

  • add verticles in Java, Groovy, JavaScript and Ruby

In the current state it only support Maven and the generated project is packaged as a fat jar.

This addon is now an official JBoss Forge addon (https://github.com/forge/vertx-addon).

Installation

addon-install --coordinate org.jboss.forge.addon:vertx

Create project

To create a project, just create a Maven project packaged as a jar file, without a technical stack:

[foo]$ project-new
***INFO*** Required inputs not satisfied, entering interactive mode
* Project name:  my-project
? Top level package [org.my.project]:
? Version [1.0.0-SNAPSHOT]:
? Final name:
? Project location [/Users/clement/tmp/foo]:
? Use Target Location Root? (If specified, it won't create a subdirectory inside the specified Project location) [y/N]:

[0] (x) war
[1] ( ) vert.x              <------
[2] ( ) jar
[3] ( ) parent
[4] ( ) forge-addon
[5] ( ) resource-jar
[6] ( ) ear
[7] ( ) from-archetype
[8] ( ) generic

Press <ENTER> to confirm, or <CTRL>+C to cancel.
* Project type: [0-8] 1     <------ choose Vert.x

[0] (x) Maven
[1] ( ) None

Press <ENTER> to confirm, or <CTRL>+C to cancel.
* Build system: [0-1]
Configuring the vertx-maven-plugin...
maven-compiler-plugin already configured in the `pom.xml`, updating configuration...
vertx-maven-plugin is already configured in the `pom.xml` file - skipping its configuration
***SUCCESS*** Project named 'my-project' has been created.
***SUCCESS*** Vert.x project created successfully
[my-project]$

Here you go you have your vert.x project with a java verticle

Build and Run

Build the project using:

build

Run it using:

build vertx:run

This command starts the Vert.x application in "redeploy" mode. If you change the files, it redeploys the up to date application. Check the https://reactiverse.io/vertx-maven-plugin for further details about the redeployment.

Hit CTRL+C to quit the application

Add verticle

You can add a verticle using:

vertx-add-verticle --main --name=MyVerticle.js

--main describes whether or not the verticle is going to be the main-verticle of the application. name define the name of the verticle, the type is detected from the extension.

The addon configures the project to use the right dependencies and directory structure.

About

A JBoss Forge addon to create and manage Vert.x 3 project

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.2%
  • Other 0.8%