【发布时间】:2019-03-30 02:43:26
【问题描述】:
我目前正在尝试将 war 文件部署到 Websphere Liberty 服务器。
<profile>
<id>integration</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.6.11</version>
<configuration>
<!-- Container configuration -->
<container>
<containerId>websphere85x</containerId>
<type>installed</type>
</container>
<configuration>
<type>existing</type>
<home>WebSphere server location</home>
</configuration>
<deployables>
<deployable>
<artifactId>artifact</artifactId>
<groupId>com.group</groupId>
<type>war</type>
</deployable>
</deployables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
当我跑步时
货物:部署-Pintegration
我收到以下错误
[错误] 无法执行目标 org.codehaus.cargo:cargo-maven2->plugin:1.6.11:deploy (default-cli) on project artifact: Execution >default-cli of goal org.codehaus.cargo: cargo-maven2-plugin:1.6.11:deploy >failed:部署失败:无法执行 jython 脚本。调用命令出错! >Cannot run program "null\bin\wsadmin.bat": CreateProcess error=2, The system >cannot find the file specified
有人知道这是什么原因吗?
我应该使用什么插件\依赖项来获取 wsadmin.bat?
或者我该如何解决这个问题?
提前致谢
更新
我几乎可以让这个工作 新配置如下
<profile>
<id>integration</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.6.11</version>
<configuration>
<!-- Container configuration -->
<container>
<containerId>liberty</containerId>
<type>installed</type>
</container>
<configuration>
<home>LibertyServer</home>
</configuration>
<deployables>
<deployable>
<artifactId>SIS-AM-CONSOL-GSPWeb</artifactId>
<groupId>com.group</groupId>
<type>war</type>
</deployable>
</deployables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
现在的问题是war文件正在部署到
LibertyServer\servers\defaultServer\apps
而正确的位置应该是
LibertyServer\usr\servers\defaultServer\apps
我一直在查看 the reference guide,但我没有看到自定义目录的方法。
我确实尝试添加
<files>
<copy>
<file>war file</file>
<toDir>LibertyServer\usr\servers\defaultServer\apps</toDir>
<overwrite>true</overwrite>
</copy>
</files>
进入配置设置。
但正如预期的那样,这不起作用。
有什么想法吗?
再次感谢。
【问题讨论】:
-
您当前的配置是针对 tWAS 而不是针对 Liberty。对于 Liberty,您应该使用
<containerId>liberty</containerId>。如果它现在可以工作,请将您的工作配置添加为其他人参考的答案。
标签: java maven websphere cargo