1 Reply Latest reply on Jan 8, 2015 4:06 AM by K. Golbang

    jboss-as:deploy / war file not present in the deployments directory

    K. Golbang Newbie

      Dear JBoss developers & users,

       

      I'm using the jboss maven plugin to deploy to the JBoss container. The plugin configuration looks like follows (the mechanism is using the deployment feature of JBoss, port is set correctly ...):

       

      <plugin>

         <groupId>org.jboss.as.plugins</groupId>

         <artifactId>jboss-as-maven-plugin</artifactId>

         <version>7.1.1.Final</version>

         <configuration>

              <hostname>${jboss.hostname}</hostname>

                      <port>${jboss.deployment.port}</port>

                      <username>${jboss.admin.username}</username>

                      <password>${jboss.admin.password}</password>

         </configuration>               

      </plugin>       

       

      The problem is that the war file doesn't appear in the deployments directory of the JBoss installation. However, the administration console reports the webservice and everything is working properly. It turns out that the deployable has been exploded directly into the directory [$JBOSS_INSTALLATION]/standalone/tmp/vfs.


      We need to deploy the war file into the deployments directory because the artifact is needed for further redeployments. Does anyone know how to configure Maven (or JBoss) to achieve it?


      Thank you in advance!

      K. Golbang

        • 1. Re: jboss-as:deploy / war file not present in the deployments directory
          K. Golbang Newbie

          It turns out that this is not supported for JBoss 7. Nevertheless, you can omit the maven plugin, copy the war file to the deployments directory and advise JBoss to re-deploy the application as follows:

           

          CLI:

          1. cp target/example.war $AS/standalone/deployments

          2. echo 'example.war' >> $AS/standalone/deployments/example.war.dodeploy

           

          Maven:

          Use antrun plugin to execute bash commands

           

          CI (e.g. Bamboo):

          add SCP task and SSH script to deploy to a remote JBoss.