How to deploy WAR of Maven Project to JBoss server from Eclipse?

后端 未结 9 1575
太阳男子
太阳男子 2020-12-23 12:11

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

9条回答
  •  执念已碎
    2020-12-23 12:50

    Simply adding below plugin to POM.xml worked for me.

    
        ...
        
            ...
            
                org.jboss.as.plugins
                jboss-as-maven-plugin
                7.9.Final
            
            ...
        
        ...
    
    

    Using command prompt one can deploy or undeploy the artifact.

      mvn jboss-as:redeploy
      mvn jboss-as:undeploy
    

    Note: The above option uses http://localhost:9999 url to deploy the artifact to server. The Jboss server should be running in background before the command is executed.

    Also one can use eclipse to execute above goals.

    Step 1: Click on run configuration.

    Step 2:Create a new Maven Build

    Step 3:Update build details as shown.

    More option can be found at

    https://docs.jboss.org/jbossas/7/plugins/maven/latest/examples/deployment-example.html

提交回复
热议问题