[英]Deploy a web-application on Websphere 8.5 using maven 3
我正在嘗試使用JSF從現有的Web應用程序創建Maven項目。 該項目應部署在Web Sphere 8.5上。
由於我是Web Sphere的新手,因此不知道如何構建“ear”模塊,以便可以在Web Sphere 8.5上進行部署。
有誰知道,在哪里可以找到有關使用Maven 3.0.3在Web Sphere 8.5上部署Web應用程序的更多信息?
莫森,感謝你的期待
為了打包* .ear,您不需要Websphere。 這可以通過maven本身完成。
pom.xml:
<project>
...
<artifactId>YourApp</
<packaging>ear</packaging>
...
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<modules>
<jarModule>
<groupId>${project.parent.groupId}</groupId>
<artifactId>configurationApp</artifactId>
</jarModule>
<ejbModule>
<groupId>${project.parent.groupId}</groupId>
<artifactId>AnEjbModule</artifactId>
</ejbModule>
</modules>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
...
</project>
然后添加依賴項。 在命令行上轉到您的項目並運行mvn包。 由於您在pom.xml中定義了包,因此將創建耳朵並可在YourApp / target目錄中找到。
在websphere管理控制台上,您只需安裝耳朵即可。 登錄后,轉到:
Applications->Websphere enterprise applications and install a new application.
選擇YourApp.ear並通過快速路徑輕松安裝應用程序。 要檢查的端口可能是
yourServerName:9080/YourApp.
祝好運。
我從未使用過WebSphere Application Server 8.5; 但是在我使用IBM WAS 6.1的那些日子里, WAS6 Maven插件工作得非常好(它似乎也適用於WAS7 )。 這是來自插件站點的POM片段,允許自動EAR部署:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>was6-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<id>integration-test</id>
<phase>integration-test</phase>
<goals>
<goal>installApp</goal>
</goals>
</execution>
</executions>
<configuration>
<wasHome>${was61home}</wasHome>
<host>deploymentmanager.your.domain</host>
<username>admin</username>
<password>adminpassword</password>
<targetCluster>nameOfCluster</targetCluster>
<profileName>Dmgr01</profileName>
<conntype>SOAP</conntype>
<port>8879</port>
<verbose>true</verbose>
<updateExisting>false</updateExisting>
</configuration>
</plugin>
該插件用於部署和其他管理任務,對於EAR生成,您可以使用Maven EAR插件 ,如20InchMovement中所述。
希望這可以幫助:
<plugin>
<groupId>com.orctom.mojo</groupId>
<artifactId>was-maven-plugin</artifactId>
<version>1.0.8</version>
<executions>
<execution>
<id>deploy</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<wasHome>${env.WAS_HOME}</wasHome>
<applicationName>${project.build.finalName}</applicationName>
<host>${local or remote address}</host>
<server>server01</server>
<node>node01</node>
<virtualHost>default_host</virtualHost>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
請參閱http://code.google.com/p/websphere-maven-plugin/
Websphere Maven插件提供以下目標:
在websphere上部署ear 7啟動應用程序停止應用程序卸載需要websphere應用程序客戶端。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.