Skip to content

arw357/vertx-maven-starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vert.x Maven Starter

This project is a template to start your own Vert.x project using Apache Maven.

Prerequisites

  • Apache Maven

  • JDK 8+

Getting started

Create your project with:

git clone https://github.com/cescoffier/vertx-maven-starter.git PROJECT_NAME

Replace PROJECT_NAME with the name of your project.

On Linux and MacOSx (or Windows with bash), if you want to go faster and generate an already configured project run:

# Bash
curl https://gist.githubusercontent.com/cescoffier/cfd46c2614f54d5e2a88d5fdc4b828ed/raw/c31b5ac5b86f39b93bd8508e80aa40e880e207b5/create-project-maven.sh -o vertx-create-maven-project.sh && bash vertx-create-maven-project.sh

# Fish
curl https://gist.githubusercontent.com/cescoffier/cfd46c2614f54d5e2a88d5fdc4b828ed/raw/c31b5ac5b86f39b93bd8508e80aa40e880e207b5/create-project-maven.sh -o vertx-create-maven-project.sh; bash vertx-create-maven-project.sh

Running the project

Once you have retrieved the project, you can check that everything works with:

mvn test exec:java

The command compiles the project and runs the tests, then it launches the application, so you can check by yourself. Open your browser to http://localhost:8080. You should see a Hello World message.

Anatomy of the project

The project contains:

  • a pom.xml file

  • a main verticle file (src/main/java/io/vertx/starter/MainVerticle.java)

  • an unit test (src/main/test/io/vertx/starter/MainVerticleTest.java)

Start to hack

  1. Delete the .git directory

  2. Open the pom.xml file and customize the groupId, artifactId and version. You can also change the main.verticle property to use your own package name and verticle class.

  3. Run redeploy.sh (or redeploy.bat on Windows) and the project recompiles while editing.

Note
the redeploy script are also configurable

Building the project

To build the project, just use:

mvn clean package

It generates a fat-jar in the target directory.

About

Project template for Vert.x using Maven

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 61.9%
  • Shell 19.6%
  • Batchfile 18.5%