简体   繁体   English

在Websphere中部署EAR文件

[英]Deploying EAR file in websphere

After building my maven project, the ear file gets created under target folder. 构建我的Maven项目之后,ear文件将在目标文件夹下创建。 Each time I have to login to websphere console and deploy the latest ear file. 每次我必须登录Websphere控制台并部署最新的Ear文件。 Is there is any way so that the latest EAR gets deploy automatically into the server. 有什么办法可以使最新的EAR自动部署到服务器中。

I am using: 我在用:

Tool - Eclipse Indigo Server - Websphere 工具-Eclipse Indigo服务器-Websphere

Let me know if any other information is required. 让我知道是否需要其他信息。

You can use WebSphere Application Server administrative script and ant command. 您可以使用WebSphere Application Server管理脚本和ant命令。

Script will have the very simple command AdminApp.install('application.ear', ['-server', 'server_name']) 脚本将具有非常简单的命令AdminApp.install('application.ear', ['-server', 'server_name'])

Create ant ask to call your script. 创建ant,要求调用您的脚本。 Add ant maven plugin into pom and call created ant task. 将ant maven插件添加到pom中,并调用创建的ant任务。

You can see more options in WebSphere documentation 您可以在WebSphere文档中看到更多选项

You could try the Maven Cargo plugin. 您可以尝试使用Maven Cargo插件。

https://codehaus-cargo.github.io/cargo/Home.html https://codehaus-cargo.github.io/cargo/Home.html

I use the Cargo plugin to deploy to various servers such as Tomcat, JBoss AS and more recently WildFly. 我使用Cargo插件部署到各种服务器,例如Tomcat,JBoss AS和最近的WildFly。

Let me know if it works for you. 请让我知道这对你有没有用。

clean package cargo:deploy

IBM已发布了适用于Websphere的eclipse插件: https : //davanum.wordpress.com/2011/10/10/was-7-0-eclipse-plugin-ibm-websphere-application-server-7-0/在配置I中使用时,Maven不会自己部署耳朵,它应该配置Eclipse项目来解决依赖关系,然后Eclipse负责EAR的构建和部署。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM