在IntelliJ IDEA中尝试自动重新部署时,我被困住了,我的 bash 脚本文件具有以下代码:onRedeploy
#!/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"
因此,每当我运行此 bash 脚本时,都会出现错误:
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
我跟进了Clement Escoffier 和 Paulo Lopes的 youtube 教程, 演示了如何使用vert.x 3开发实时 Web 应用程序