2 Replies Latest reply on Aug 12, 2014 11:15 AM by mylos78

    Help with basic deployment bundle

    mylos78

      Hi all!

      I'm trying to create a Bundle which should deploy a web application across several JBoss EAP servers. The bundle contains the following files:

      • application.war
      • deploy.xml

      I've found a basic ant recipe file for provisioning an application which follows here:

       

      <project name="myProject" default="main"
               xmlns:rhq="antlib:org.rhq.bundle">
      
          <rhq:bundle name="myBundle"
                      version="1.0"
                      description="testing">
      
              <rhq:deployment-unit name="fixedForNow"
                            compliance="filesAndDirectories"
                                   preinstallTarget="preinstall"
                                   postinstallTarget="postinstall">
      
                  <rhq:archive name="application.war">
                         <rhq:replace>
                            <rhq:fileset>
                               <include name="*.jsp"/>
                            </rhq:fileset>
                         </rhq:replace>
                  </rhq:archive>
      
      
              </rhq:deployment-unit>
          </rhq:bundle>
      
      
          <!-- needed by ant, do not remove -->
          <target name="main"/>
      
      
          <target name="preinstall">
              <echo>Installing to ${rhq.deploy.dir}...</echo>
          </target>
      
      
          <target name="postinstall">
              <echo>Done installing to ${rhq.deploy.dir}.</echo>
          </target>
      
      </project>
      

      Once I execute deploy of my bundle into the selected path (/home/jboss/standalone/deployments), the file application.war is unpacked so that the deployments folder contains its files:

      jboss@jbosseap ~/jboss/standalone/deployments $ ls -al

       

      drwxrwxr-x 5 jboss jboss 4096 2014-08-10 21:22 .

      drwxrwxr-x 8 jboss jboss 4096 2014-08-10 21:19 ..

      -rw-rw---- 1 jboss jboss   21 2014-08-10 21:22 index.jsp

      drwxrwx--- 2 jboss jboss 4096 2014-08-10 21:22 META-INF

      drwxrwx--- 3 jboss jboss 4096 2014-08-10 21:22 .rhqdeployments

      drwxrwx--- 2 jboss jboss 4096 2014-08-10 21:22 WEB-INF

       

      How can I correct the recipe so that it's deployed as compressed archive, or at least, it contains the top application directory (application.war) when deployed ?

      Thanks a lot

      Mylos