我使用本教程将war文件部署到MobileFirst WAS Liberty服务器: https://www.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.deploy.doc/devref/t_ant_tasks_configure_appserver.html
它表示构建成功,但我无法在服务器配置工具中看到war文件,运行时环境仍为空。
是否因为没有安装tools.jar?或者应该有一个现有的运行时环境?然后运行" ant -f configure-liberty-oracle.xml"战争档案会有更新吗?
这是日志:
C:\IBM\MobileFirst_Platform_Server\shortcuts>ant -f configure-liberty-oracle.xml
install
Unable to locate tools.jar. Expected to find it in C:\IBM\Installation Manager\e
clipse\jre_7.0.9030.20160210_1426\lib\tools.jar
Buildfile: C:\IBM\MobileFirst_Platform_Server\shortcuts\configure-liberty-oracle
.xml
> install:
[configureapplicationserver] Logging output of task <configureApplicationServer>
to file C:\Users\fphmfpdev\Documents\IBM MobileFirst Platform Server Data\Confi
guration Logs\configureApplicationServer_2016_04_14_11_10_19.log
[configureapplicationserver] ** Creating migrated war file
[configureapplicationserver] Apr 14, 2016 11:10:28 AM com.worklight.ant.migratio
n.MigrationTask MigrationTask.execute
[configureapplicationserver] INFO: FWLST2014I: The migration process was bypasse
d, because the project WAR file of version 7.0.0.00.20150312-0731 is compatible
with the server version 7.0.0.00.20150312-0731.
[configureapplicationserver] Apr 14, 2016 11:10:28 AM com.worklight.ant.migratio
n.MigrationTask MigrationTask.execute
[configureapplicationserver] INFO: FWLST2015I: The project WAR file was successf
ully copied to the destination location 'C:\Users\FPHMFP~1\AppData\Local\Temp\wl
a5127457410\Sunlife.war'.
[configureapplicationserver] ** Created migrated war file
[configureapplicationserver] Copying C:\IBM\WebSphere\Liberty\usr\shared\resourc
es\wladmin\oracle\ojdbc6.jar to C:\IBM\WebSphere\Liberty\usr\shared\resources\Su
nlifeTestApp\oracle\ojdbc6.jar
[configureapplicationserver] Copying C:\IBM\WebSphere\Liberty\usr\servers\wrklgh
t\server.xml to C:\IBM\WebSphere\Liberty\usr\servers\wrklght\server.xml.bak161
[configureapplicationserver] Encoding password for Liberty
[configureapplicationserver] Encoding password for Liberty
[configureapplicationserver] Modifying C:\IBM\WebSphere\Liberty\usr\servers\wrkl
ght\server.xml
[configureapplicationserver] Copying C:\Users\FPHMFP~1\AppData\Local\Temp\wla512
7457410\Sunlife.war to C:\IBM\WebSphere\Liberty\usr\servers\wrklght\apps\Sunlife
.war
[configureapplicationserver] *** INFO: ***
[configureapplicationserver] The MobileFirst Project WAR file has been installed
on the application server,
[configureapplicationserver] but it will not work until the application server h
as been restarted.
[configureapplicationserver] You now need to restart it.
[configureapplicationserver] *************
BUILD SUCCESSFUL
Total time: 9 seconds
答案 0 :(得分:3)
创建配置后,该工具会创建在部署此配置时运行的相应Ant脚本。在此操作期间,除非您在创建向导中取消选择该选项,否则admin组件将与控制台一起安装。
创建此配置后,您可以在服务器配置工具中为此配置添加一个或多个运行时,方法是在配置树中选择配置,然后从上下文菜单中选择“添加MobileFirst运行时环境”。通过这样做,将在运行时创建向导的末尾创建并执行新的Ant脚本,以部署此运行时。
关键是服务器配置工具只知道您使用其向导创建的运行时。它绝不与您在此图形环境之外执行的其他Ant脚本的执行同步。这解释了为什么您无法看到部署的运行时,而Ant脚本执行最终会以“Build Success”状态结束。