[Users] Best way to deploy SAs on many Petals

vjao petals-components at ebmwebsourcing.com
Wed Mar 16 10:28:50 CET 2011


Hi,

thank you for your answers, it's always good to have feedback !

Unfortunatly, the solutions you both mentioned cannot help me because of the specific needs for my project (that I can't discuss on an open forum like this one).

I found a solution that uses the maven-resources-plugin. In a few words, I moved my jbi.xml file from 'src/main/jbi' to 'scr/main/pre-jbi' and I configured maven to filter the files from 'src/main/pre-jbi' one to 'src/main/jbi' before the petals-maven-plugin is started.

Here's my pom.xml

Code:

  (...)
  <!--
     - Properties (may be override at runtime by 
     -            (passing -Dagr_name=arg_value paramters to the command line)
     -->
  <properties>
    <node_id>126</node_id>
  </properties>


  <!--
     - Build
     -->
  <build>

    <pluginManagement>
      <plugins>
        <groupId>org.apache.maven.plugins</groupId>
        <artefactId>maven-resources-plugin</artefactId>
        <version>2.3</version>
      </plugins>
    </pluginManagement>

    <plugins>
        <!--
         - JBI pre-processing
         -
         - Used to pre-process the jbi.xml in 'src/main/pre-jbi' so that 
         - the ${node_id} can be set in the endpoint name. 
         -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <id>copy-resources</id>
            <phase>validate</phase>
            <goals>
              <goal>copy-resources</goal>
            </goals>
            <configuration>
              <outputDirectory>${basedir}/src/main/jbi</outputDirectory>
              <resources>
                <resource>
                  <directory>src/main/pre-jbi</directory>
                  <includes>
                    <include>**/*</include>
                  </includes>
                  <filtering>true</filtering>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- to make sure all the src/main.jbi is cleaned -->
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <configuration>
          <filesets>
            <fileset>
              <directory>src\main\jbi</directory>
              <includes>
                <include>**/*</include>
              </includes>             
            </fileset>
          </filesets>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.ow2.petals</groupId>
        <artifactId>maven-petals-plugin</artifactId>
        <version>1.4</version>
        <extensions>true</extensions>
          <configuration>
            <verbose>true</verbose>
            <host>localhost</host>
            <port>7700</port>
            <username>petals</username>
            <password>petals</password>
            <protocol>file</protocol>
          </configuration>
      </plugin>

  </build>
  (...)




And in my my 'src/main/pre-jbi/jbi.xml', I changed the endpoint name to 'myEndPointName_${node_id}'.


Cheers,

Vincent




-------------------- m2f --------------------

Read this forum topic online here:
http://petals.ebmwebsourcing.com/forum/viewtopic.php?p=654#654

-------------------- m2f --------------------


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/dc2af0be/attachment.htm>


More information about the Users mailing list