0

I would like your help here as i am writing my first vert.x Project in java. I am using maven. I have 4 different verticle and one of the is my Main verticle (MainVerticle.java). I am using a programatical deployment and my MainVerticle.java contains the deployment of my 3 other verticles. I am having hard tine to run my MainVerticle on command line. I did some search at i have found it is possible to run a jar file. The problem I have is that as it is a vert.x project my jar that i built by using intellij does not contain the other 3 verticles. I always use my ide to create a jar for all my java project but I do not know why I cannot get the 3 other verticles in my jar in order to run my MainVeeticle with the 3 others. Thank you for your help

Thibault
  • 31
  • 3

2 Answers2

0

I suggest to refer to either of these project setup:

And there is also this blogpost that may helps you

taygetos
  • 3,005
  • 2
  • 21
  • 29
0

You can run them using intelliJ, edit your run configurations as follows:

  • Main Class: io.vertx.core.Launcher
  • VM Options: <up to you, or leave blank>
  • Program Arguments: run com.main.MainVerticle

In the Program Arguments specify the correct package that contains your MainVerticle.java verticle

If you are using a json config file you can do the following:

Program Arguments: run com.main.MainVerticle -conf /path/to/my_config.json

Source: How to start Vert.x server from IntelliJ IDEA?

Mohamed Ibrahim Elsayed
  • 2,734
  • 3
  • 23
  • 43