0

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.

Accessdenier
  • 185
  • 1
  • 2
  • 10
  • You can write a Maven plugin to deploy your jars to JBoss, or you can configure a [continuous integration server](http://en.wikipedia.org/wiki/Continuous_integration) to do that for you. – Gilberto Torrezan Feb 13 '13 at 15:47

2 Answers2

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

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
josh-cain
  • 4,997
  • 7
  • 35
  • 55