繁体   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