0

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 应用程序

4

1 回答 1

0

看起来您的输出流为空。观察 vertx3 中的一个错误,但实际上并不值得修复,因为:您会看到以下消息:“[警告] 'onRedeploy' 选项已弃用,将在 vert.x 3.3 中删除。请改用“+”'on-redeploy' 。”

所以请尝试“--on-redeploy”并告诉我它是否有效。

耶尔兹

于 2016-01-23T07:27:35.897 回答