Intellij docker在Websphere中实时更新EAR

Intellij docker在Websphere中实时更新EAR

问题描述:

我有一个运行着Websphere libery配置文件的docker容器.通常,每当我更改代码时,我都会构建应用程序并将其手动部署到Websphere中.但是,这非常繁琐.

I have a docker container with Websphere libery profile running inside. In general when ever i change code i build my application and deploy manually into websphere. However this is very tedious.

我是否有任何方法可以在每次更改代码时将更改动态地部署到Docker容器内的Websphere中?我希望它可以作为直接在Intellij内部配置的本地服务器.

Is there any way i could deploy changes dynamically into websphere inside Docker container everytime i do changes in the code? I want this to work as a local server configured directly inside Intellij.

执行此操作的一种方法可能是创建远程WebSphere Liberty服务器,但是在尝试执行此操作时,Intellij似乎不支持WebSphere Liberty的远程部署.您是否考虑过使用在Docker容器中完全支持Liberty的WebSphere Developer Tools(请参阅 https://developer.ibm.com/wasdev/docs/developing-applications-using-wdt-liberty-docker/)?另一种涉及一些设置的方法是在docker容器中添加卷-一种从/opt/ibm/wlp/usr/servers/defaultServer映射到服务器配置的本地副本的卷(以便您可以修改服务器本地配置),以及从新路径映射到您的应用程序项目在计算机上所处位置的根目录的配置.然后,您可以在服务器配置的apps目录中为每个应用程序创建一个松散的配置xml文件.有关宽松的配置文件的更多信息,请参见:

One way to do this might have been to create a remote WebSphere Liberty server but on trying this it looks like Intellij does not support remote deployment for WebSphere Liberty. Have you thought about using WebSphere Developer Tools which fully support Liberty in a Docker container (see https://developer.ibm.com/wasdev/docs/developing-applications-using-wdt-liberty-docker/)? One other way that involves a bit of setup would be to add volumes in your docker container - one that maps from /opt/ibm/wlp/usr/servers/defaultServer to a local copy of the server configuration (so you can modify the server configuration locally), and one that maps from a new path to the root of where your application projects are located on your machine. You could then create a loose configuration xml file in the apps directory of the server configuration for each application. More information about loose configuration files is here: https://www.ibm.com/support/knowledgecenter/en/SSEQTP_liberty/com.ibm.websphere.wlp.doc/ae/rwlp_loose_applications.html.