Skip navigation
Toggle Sidebar

Maven Gigapult Plugin Usage Guide

Note
To make the command-line calls shorter, add the following section to the ~/.m2/settings.xml:

<pluginGroups>
    <pluginGroup>org.gigapult</pluginGroup>
  </pluginGroups>

It will allow to use gigapult:<goal> shortcut instead of org.gigapult:maven-gigapult-plugin:<goal>

Configuration

To integrate maven-gigapult-plugin into the project just add the following entry into pom.xml:

<build>
    <plugins>

      <plugin>
        <groupId>org.gigapult</groupId>
        <artifactId>maven-gigapult-plugin</artifactId>
        <version>0.3.3</version>
      </plugin>

    </plugins>
  </build>

Goals

Here is an overview of available goals:

Goal Description
gigapult:gs-instance Starts a space using the SpaceFinder utility
gigapult:gsm Starts the GigaSpaces Grid Service Monitor and autonomous Lookup service
gigapult:gsc Starts the the GigaSpaces Grid Service Container
gigapult:ui Starts GigaSpaces Management Center
gigapult:pudeploy Experimental goal, deploys a processing unit using GS CLI

Configuration

To make some extra configuration or override default parameters create put a valid gigapult configuration file (in this case, example.rb) to the same directory, as pom.xml and add plugin configuration section the following block:

<plugin>
  <groupId>org.gigapult</groupId>
  <artifactId>maven-gigapult-plugin</artifactId>
  <version>0.3.3</version>
  <configuration>
    <commonSettings>example.rb</commonSettings>
  </configuration>
</plugin>

Usage

The common way to use Maven Gigapult plugin is the following:

mvn gigapult:<goal>

The list of appropriate goals can be found in previous section.

Examlpe

This example illustrates how to deploy a replicated cluster using a processing unit. It assumes that you've already created a single-module Maven project. It can be achieved by using Maven Archetype Plugin

  1. Put the following code to the example.rb
    configure {
      system_properties {
        com.gs.jini_lus.groups "example"
      }
    
      cli {
        gs "pudeploy -cluster schema=sync_replicated total_members=2 templates/datagrid"
      }
    }
  2. Add the next section to the pom.xml
    <build>
      <plugins>
        <plugin>
          <groupId>org.gigapult</groupId>
          <artifactId>maven-gigapult-plugin</artifactId>
          <version>0.3.3</version>
          <configuration>
            <commonSettings>example.rb</commonSettings>
          </configuration>
        </plugin>
      </plugins>
    </build>
  1. To deploy the cluster run
    mvn gigapult:gsm gigapult:gsc gigapult:gsc gigapult:pudeploy
  1. To check that the cluster was deployed successfully run GigaSpaces Management Center using the following command:
    mvn gigapult:ui
Adaptavist Theme Builder Powered by Atlassian Confluence