0

While trying out Automatic redeployment in IntelliJ IDEA, I'm stuck with onRedeploy, My bash script file has the following code:

#!/usr/bin/env bash
mvn package
java -jar target/Test-1.0-SNAPSHOT-fat.jar \
  --redeploy="src/**/*.js,src/**/*.java,src/**/*.html,src/**/*.jade" \
  --onRedeploy="./run.sh"

So, whenever I run this bash script, I got an error:

Error while executing command run: Cannot inject value for option 'onRedeploy'

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at io.vertx.core.cli.annotations.CLIConfigurator.inject(CLIConfigurator.java:237)
        at io.vertx.core.spi.launcher.DefaultCommandFactory.create(DefaultCommandFactory.java:50)
        at io.vertx.core.impl.launcher.VertxCommandLauncher.getNewCommandInstance(VertxCommandLauncher.java:162)
        at io.vertx.core.impl.launcher.VertxCommandLauncher.execute(VertxCommandLauncher.java:217)
        at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:383)
        at io.vertx.core.impl.launcher.VertxCommandLauncher.dispatch(VertxCommandLauncher.java:328)
        at io.vertx.core.Launcher.main(Launcher.java:48)
Caused by: java.lang.NullPointerException
        at io.vertx.core.impl.launcher.commands.RunCommand.setOnRedeployCommandOld(RunCommand.java:154)
        ... 11 more

I followed up a tutorial from youtube by Clement Escoffier & Paulo Lopes demonstrating how to develop a realtime web application using vert.x 3

Vashum
  • 853
  • 1
  • 10
  • 24
  • 'onRedeploy' option is deprecated and is removed in vert.x 3.3. Using 'on-redeploy' fixed the issue. – Vashum Jan 22 '16 at 08:22

1 Answers1

0

It looks like the Output Stream of yours is null. Obvs a Bug in vertx3 but not really worth fixxing because: You would see this message: "[WARNING] the 'onRedeploy' option is deprecated, and will be removed in vert.x 3.3. Use " + "'on-redeploy' instead."

so try "--on-redeploy" instead and tell me if it works.

Jeerze

Simi
  • 174
  • 1
  • 7