This project is a template to start your own Vert.x project using Gradle with Groovy.
Create your project with:
git clone git@github.com:Itaqua/vertx-gradle-groovy-starter.git PROJECT_NAME
Replace PROJECT_NAME
with the name of your project.
Once you have retrieved the project, you can check that everything works with:
./gradlew test vertxRun
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.
The project contains:
-
the Gradle project using the Groovy DSL (see
build.gradle
) with auto-reloading and fat-jar building -
a main verticle file (
src/main/java/io/vertx/starter/MainVerticle.groovy
) -
a unit test (
src/main/test/io/vertx/starter/MainVerticleTest.groovy
)
-
Delete the
.git
directory -
Open the
build.gradle
file and customizevertxVersion
. You can also change themainVerticleName
variable to use your own package name and verticle class. -
Run
./gradlew vertxRun
.
This last command relaunches Gradle and the application as soon as you change something under src/main
.