-1

I'm working on a project called vertx-bigapp-skeleton to make the Vert.x deployment easier.

For that, I decided to create a file called META-INF/vertx.verticle in the verticles (Maven submodules of the example project).

If I compile and run the project with Maven (mvn clean package && java -jar server/target/application.jar) everything works fine and the Maven shade plugin merge's the vertx.verticle file correctly.

I work with Eclipse and if I run the example server artifact it just finds the vertx.verticle file from the healh verticle.

It is possible to merge this META-INF/vertx.verticles file in eclipse too, so that I can develop and debug in Eclipse?

The Loader for the vertx.verticles files can be found here: https://github.com/marcelalburg/vertx-bigapp-skeleton/blob/master/src/main/java/com/weeaar/vertxwebconfig/service/ServiceLoader.java

Thanks for your help

Guss
  • 30,470
  • 17
  • 104
  • 128
Marcel
  • 377
  • 5
  • 16
  • Open a bug at eclipse m2e to handle this...but i think this will help cause maven-shade will in package phase which is usually not running within eclipse... – khmarbaise Apr 10 '16 at 13:14
  • Is there any other method? Because spring boot using almost the same (with spring.verticles) and this works. – Marcel Apr 10 '16 at 15:35

1 Answers1

0

I found the solution.

i used

public static final String FACTORIES_VERTICLES_LOCATION = "META-INF/vertx.verticle";
input = getClass().getClassLoader().getResourceAsStream( FACTORIES_VERTICLES_LOCATION );

but this just found one of the files

if i switched to

Enumeration<URL> urls = ClassLoader.getSystemResources( FACTORIES_VERTICLES_LOCATION );

everything works.

thanks marcel

Marcel
  • 377
  • 5
  • 16