2016-01-21 18 views
0

雖然的IntelliJ IDEA嘗試自動調配,我堅持用onRedeploy,我的bash腳本文件具有下面的代碼:IntelliJ IDEA的 - 不能爲選項注入價值 '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 

我跟進了一個YouTube教程由Clement Escoffier & Paulo Lopes demonstr討論如何使用vert.x 3

+0

'onRedeploy'選項已被棄用,並在vert.x 3.3中被刪除。 '重新部署'使用 解決了問題。 – Vashum

回答

0

開發實時Web應用程序它看起來像你的輸出流爲空。 obvs在vertx3中存在一個Bug,但並不值得修復,因爲: 您會看到以下消息:「[警告]'onRedeploy'選項已被棄用,並將在vert.x 3.3中被刪除。 '而是。「

所以請嘗試「--on-redeploy」來代替,並告訴我它是否有效。

Jeerze

+0

- 重新部署作品。 – Vashum