how to deploy projects with maven and jboss?

风格不统一 提交于 2019-12-12 02:25:26

问题


I am new to maven and Jboss(actually, never used other server as well)

I have a flex/blazDS/Java project with maven and jboss server. How can i deploy it?

PS: When i do the development, I used maven to build the project(using mvn clean install package ...).

then, go to my eclipse, right click the main app, let it run on my server.


回答1:


You could use the Maven JBoss Plugin. Once configured properly, you can use it to start and stop the server as well as deploy via JMX (for remote instances) and by hard-copying (for local instances). As the guide states, first you would add the plugin to your pom:

       <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jboss-maven-plugin</artifactId>
        <version>1.5.0</version>
        <configuration>
          <jbossHome>/usr/jboss-4.2.3.GA</jbossHome>
          <serverName>all</serverName>
          <fileName>target/my-project.war</fileName>
        </configuration>
      </plugin>

Make sure you customize the fields in the configuration section appropriately. Then you can deploy to your JBoss server using (for remote)

mvn jboss deploy

or (for local)

mvn jboss hard-deploy



回答2:


The command is not jboss hard-deploy as given in above comment. The correct command to deploy using maven in jboss is jboss:hard-deploy



来源:https://stackoverflow.com/questions/14857253/how-to-deploy-projects-with-maven-and-jboss

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!