Vert.X 2.0.0 in IntelliJ IDEA
July 18, 2013 1 Comment
Well, that was fast. After posting my last post I saw that vert.x 2.0.0.final came out last night. Tough luck but sitting on the train I got time enough to provide an update.
Follow these to create a basic gradle-project with an example verticle. After doing a gradle clean build idea you can now import the project into Idea.
The examples provided only show how to run this project from the command line. I am a lazy ass and like to run my stuff from the IDE.
To achieve this add a new java-module using File>New Module. Open Open Module Settings, select the newly created module and add contents of the lib-directory from your freshly downloaded vert.x-2.0.0-final-archive in the Dependencies-tab.
Create a new Run-Config and:
- set Main Class to org.vertx.java.platform.impl.cli.Starter
- set Program arguments to runmod com.yourcompany~your-module~1.0 -cp <path-to-your-project>/out/production/<module-name>
- set Use classpath of module to the module we just created and added the vert.x-libs to