updateapplicationserver ant 任务总是失败 "WAR file is not currently deployed"

updateapplicationserver ant task always fail with "WAR file is not currently deployed"

我使用了从示例配置中获取的非常基本的构建文件-derby.xml:

<property name="worklight.server.install.dir" value="C:/Worklight70"/>
<property name="config.migration.tool.enable" value="true"/>
<target name="minimal-update">
<updateapplicationserver id="" contextroot="/AreaClienti">
<project warfile="C:/temp/AreaClienti.war"/>
<applicationserver>
<websphereapplicationserver installdir="C:/WebSphere85/AppServer"/" profile="AppSrv01" user="wasuser" password="xxxxx">
<server name="server1"/>
</websphereapplicationserver>
</applicationserver>
</updateapplicationserver>
</target>

最近我能够在我的笔记本电脑安装上重现该问题,我相信我找到了原因:请查看以下分析并确认结果。

我最初从 WAS 管理控制台手动安装了 war 文件,当我 运行 Ant minimal-update 使用上面的构建文件时它因上述错误而失败

The MobileFirst Project WAR file is not currently deployed in the WAS profile at ...

然后我删除了手动安装的 war 文件并使用 Ant install 目标重新安装它。 此时minimal-update运行成功

我发现 Ant 安装创建到 WAS 配置结构中

profile_root/config/cells/cell_name/nodes/node_name/servers/server1

一个新的 Worklight 目录 包含 worklight-jee-library.jar 文件和一个 derby 子目录 使用 derby 驱动程序 jar。

显然,minimal-update Ant 任务会初步检查 Worklight 目录 是否存在,如果不存在则失败。 你能确认这是真的吗?

当然,Worklight 目录 不是由标准 WAS 安装过程创建的。 因此,在控制台安装 运行time war 之后,Ant minimal-update 总是失败!

如果我在 WAS 配置中手动添加 Worklight 目录,那么 Ant 最小更新启动 运行ning 就好了。 恕我直言,以这种方式改变标准 WAS 配置结构不是很干净。 也就是说,如果我们最初使用标准 WAS 管理程序安装 运行time war,这是一个有效的解决方法吗?

此外,返回的错误消息也可以更清楚一些:请让我知道是否有任何 调试选项 可以使 Ant 任务更加冗长。

最后再问一个问题

我注意到 Ant 执行在目录中写入日志文件

user_root/.mobilefirst_platform_server

有什么方法可以将这些日志重定向到不同的目录以避免填满用户 root 的风险?

Apparently the minimal-update Ant task makes a preliminary check on the existence of the Worklight directory and it fails if it's missing. Can you please confirm that this is true ?

没错。

Is there any way to redirect those logs into a different dir to avoid the risk of filling up the user root ?

很遗憾没有。