I want to deploy WAR of Maven project to JBoss server. I know that from Eclipse Export->War deploy the WAR file to JBoss. But How can I do this for Maven Project. Any step b
I found the solution and I am sharing as it might be helpful to someone. My configuration is:
You also need to
Now you are ready to start to create project.
Note: there are some possibilities of overlapping jar(s) of your WAR with the jar(s) of JBoss's lib. Then you should take appropriate action. Like remove the jar(s) from your WAR (in case the version of your jar is same or lower than that of JBoss's) or replace the jar(s) of JBoss and remove that jar(s) from your WAR(in case the version of your jar is higher than that of JBoss's). I should be careful about this and gather well knowledge before doing anything.
Thank you.
If it is a maven application (EAR) or (JAR) or what ever, you have just to add to your pom.xml:
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<configuration>
<filename>${artifactId}-${project.version}.ear</filename>
<port>9999</port> <!-- you change it following what you have on your server config -->
</configuration>
</plugin>
And in your eclipse run configurations you make for the goals : jboss-as:deploy
Of course i am talking her about Jboss AS7 or EAP6
You can right click on the pom.xml file and choose Run As
-> Maven Build
. Set the build goals to clean package
. When that completes go into the target directory of your project, right click on the war and export as you are currently doing.
EDIT:
To do this from within your pom.xml use the jboss maven plugin: http://mojo.codehaus.org/jboss-maven-plugin/examples/deploy-undeploy-examples.html