簡體   English   中英

IzPack-執行shell腳本文件以啟動mvn命令

[英]IzPack - Execute shell script file to launch mvn command

首先,我有這樣的內容db_migration.sh

#!/bin/sh
eval "mvn compile flyway:migrate"

很簡單。 只是為了減輕用戶自己在終端中執行此命令的負擔。 由於“ mvn”,當然,此命令需要使用pom文件執行,我已經將它們放置在同一目錄中。

其次,我在install.xml文件中有此代碼段。 要在安裝后標記為可執行文件,請修復Unix系統中的拒絕權限問題

<executable targetfile="$INSTALL_PATH/Database/orchestra-db/db_migration.sh" os="unix" stage="never" failure="warn" keep="true" />

然后,在ProcessPanel中,我有這個; 運行我的db_migration.sh

<job name="do xyz">
  <executeForPack name="Orchestra Runtime"/>
  <os family="unix" />
  <executefile name="$INSTALL_PATH/Database/orchestra-db/db_migration.sh">
    <arg>doit</arg>
  </executefile>
</job>

但是,當我測試安裝程序時,我在ProcessPanel中收到此錯誤消息

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.300 s
[INFO] Finished at: 2018-07-19T15:51:52+02:00
[INFO] Final Memory: 5M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/home/tanyagorn/Documents/OrchestraInstaller/installer/target). Please verify you invoked Maven from the correct directory. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException

似乎IzPack正在尋找pom文件並嘗試在“目標”目錄中執行.sh文件。 但是,我需要在用戶的安裝路徑上執行此腳本。 誰能告訴我我做錯了什么?

先感謝您。

用戶論壇是繼續討論並討論IzPack問題的合適地方: https : //groups.google.com/d/msg/izpack-user/eN8wdvE-UIc/Verjnuh0BAAJ

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM