3 Replies Latest reply on Aug 10, 2012 9:21 AM by Keith Babo

    A handy method for quickstarts deployment

    Tadayoshi Sato Novice

      Hello everyone,

       

      While playing with the quickstarts, I found a handy method for their deployment is missing which we have in JBoss ESB. In JBoss ESB, you can deploy its quickstarts by just typing 'ant deploy.' In SwitchYard, however, you need to copy manually target/switchyard-quickstart-*.jar to ${AS7}/standalone/deployments after running 'mvn package,' which I find a bit tedious. I'd love for SY quickstarts to have this kind of handy deployment method.

       

      Here is my humble proposal; use cargo-maven2-plugin and add the plugin's settings to each quickstart's pom.xml. The deployment path can be specified in the quickstarts parent pom.xml. The pom.xmls would look like below:

       

      [quickstarts/bean-service/pom.xml]

        <build>
          <plugins>
            ...
            <plugin>
              <groupId>org.codehaus.cargo</groupId>
              <artifactId>cargo-maven2-plugin</artifactId>
              <version>1.2.3</version>
              <configuration>
                <container>
                  <containerId>jboss71x</containerId>
                </container>
                <configuration>
                  <type>existing</type>
                  <home>${jboss.as7.home}/standalone</home>
                </configuration>
                <deployables>
                  <deployable>
                    <location>${project.build.directory}/${project.build.finalName}.jar</location>
                    <type>file</type>
                  </deployable>
                </deployables>
              </configuration>
            </plugin>
           </plugins>
        </build>
      

       

      [quickstarts/pom.xml]

           <properties>
            <jboss.as7.home>/opt/switchyard-as7-0.5.0</jboss.as7.home>
          </properties>
      

       

      In this way, you can deploy quickstarts by just typing 'mvn package cargo:deploy.'

       

      Please tell me how you would think.

       

      Best regards,

      Tadayoshi