1 Reply Latest reply on Apr 8, 2015 1:02 PM by dlofthouse

    Hard deployment using wildfly-maven-plugin

    hitts14

      Hi,

       

      We are migrating from JBOSS6 to Wildfly8. We are a new issue which could not be found anywhere in forums,so posting this question here.

       

      For hard deployment we were using the below configuration in pom.xml which actually copy and deploy ear file from ${JBOSS_HOME}/server/default/deploy directory of JBOSS6.

       

      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>jboss-maven-plugin</artifactId>
      <executions>
      <execution>
      <id>deploy_ear</id>
      <phase>pre-integration-test</phase>
      <goals>
      <goal>hard-deploy</goal>
      </goals>
      <configuration>
      <deploySubDir>./</deploySubDir>
      <fileName>target/${project.build.finalName.full}</fileName>
      <unpack>true</unpack>
      </configuration>
      </execution>
      </executions>
      </plugin>

       

      But now as per wildlfy documents, we are using wildfly-maven-plugin to do the above and configured as below:

       

      <plugin>

                       <groupId>org.wildfly.plugins</groupId>

                       <artifactId>wildfly-maven-plugin</artifactId>

      <executions>
      <execution>
      <id>deploy_ear</id>
      <phase>package</phase>
      <goals>
      <goal>deploy</goal>
      </goals>
      <configuration>
      <skip>false</skip>
      <filename>test.ear</filename>
      <targetDir>${project_directory}\target</targetDir>
      <domain>standalone</domain>
      </configuration>
      </execution>
      </executions>

      </plugin>

       

      But this maven configuration deploys into ${JBOSS_HOME}/standalone/data/content and also make an entry into standalone-full-ha.xml file as below

          <deployments>

              <deployment name="test.ear" runtime-name="test.ear">

                  <content sha1="697809d5ebb7658fd7045dd6a8c41542cd3a0e02"/>

              </deployment>

          </deployments>

       

      Ideally it should copy and deploy from into ${JBOSS_HOME}/standalone/deployments folder.

       

      I tried to see the parameters from wildfly documents but could not get any parameter which can do the expected.

      reference: WildFly Maven Plugin - wildfly:deploy

       

      Help will be highly appreciated as we are struck into this stage.

      Thanks.

        • 1. Re: Hard deployment using wildfly-maven-plugin
          dlofthouse

          What is the reason you need the deployment to be in the deployments folder?  If you have a real requirement for it to be in that location then you may be better off with your original plug-in to just make the copy.

           

          The WildFly plug-in that you are using now operates differently, from AS7 it has been possible to remotely connect to the management interfaces of the server and upload a deployment to the server - that is why it is being stored in the data/content folder as the plug-in is uploading it to the server and this is where uploaded content is stored.  Secondly the plug-in itself is not writing the standalone.xml content this is being written by the running server after the content has been uploaded.

           

          The reason the deployments folder still exists is so that we can continue to support hot deployment of deployments, however using the management operations as used by the plug-in is really preferable as it makes it possible to easily switch from a local server to a remote server with minimal configuration changes.