Skip to content
GigaSpaces Logo GigaSpaces Logo
  • Products
    • InsightEdge Portfolio
      • Smart Cache
      • Smart ODS
      • Smart Augmented Transactions
    • GigaSpaces Cloud
  • Roles
    • Architects
    • CXOs
    • Product Teams
  • Solutions
    • Industry Solutions
      • Financial Services
      • Insurance
      • Retail and eCommerce
      • Telecommunications
      • Transportations
    • Technical Solutions
      • Operational BI
      • Mainframe & AS/400 Modernization
      • In Memory Data Grid
      • Transactional and Analytical Processing (HTAP)
      • Hybrid Cloud Data Fabric
      • Multi-Tiered Storage
      • Kubernetes Deployment
      • Streaming Analytics for Stateful Apps
  • Customers
  • Company
    • About GigaSpaces
    • Customers
    • Partners
    • Support & Services
      • University
      • Services
      • Support
    • News
    • Contact Us
    • Careers
  • Resources
    • Webinars
    • Blog
    • Demos
    • Solution Briefs & Whitepapers
    • Case Studies
    • Benchmarks
    • ROI Calculators
    • Analyst Reports
    • eBooks
    • Technical Documentation
  • Contact Us
  • Try Free

GigaSpaces & Maven Setup : a mini-recipe

Subscribe to our blog!

Subscribe for Updates
Close
Back

GigaSpaces & Maven Setup : a mini-recipe

Owen August 28, 2008
3 minutes read

When trying out the bundled Maven tool that now ships with GigaSpaces, I found it friendly to my sensibilities to create a couple of new scripts:

I placed both of these in the GS_HOME/tools/maven directory:

  • The first one sets up the necessary paths before calling the installmavenrep.bat that comes with GigaSpaces:


mavensetup.cmd

set M2_HOME=%~dp0apache-maven-2.0.9
set PATH=%PATH%;%M2_HOME%\bin
call installmavenrep.bat

 

  • The second one starts up a new shell with the paths set so that maven commands will function as expected by the GigaSpaces documentation:


mavenshell.cmd

set M2_HOME=%~dp0apache-maven-2.0.9
set GS_HOME=%~dp0..\..
set PATH=%PATH%;%M2_HOME%\bin;%GS_HOME%\bin

start “MAVEN SHELL”

 

Once in my “MAVEN SHELL”, I can create a new application that uses the mirror service by executing:
C:\gigaspaces-xap-6.6.0-m3\tools\maven>mvn os:create dashDgroupId=com.test.mirror dash
DartifactId=MyFirstMirrorApp dashDtemplate=basic-async-persistency

With the project created – and quickly too! I now add another script to the mix:

  • This script lives in the root directory of the newly generated project.

In this example that would be the MyFirstMirrorApp directory found on my machine here:

C:\gigaspaces-xap-6.6.0-m3\tools\maven\MyFirstMirrorApp>

  • The purpose of this script is to start up each of the aspects of the project in the proper order and demonstrate that it all works:

(Note: I execute this from within my “MAVEN SHELL” after CD‘ing into the MyFirstMirrorApp directory)


runmyproject.cmd

rem note you must setup mvn before trying to run this project in this way…

start mvn compile os:run dashDmodule=mirror

echo sleep
ping 1.1.1.1 -n 1 -w 60000 > NUL

start mvn compile os:run -Dcluster=“total_members=2,1” -Dmodule=processor

echo sleep
ping 1.1.1.1 -n 1 -w 60000 > NUL

start mvn compile os:run -Dmodule=feeder

 

Once everything is running, I can start the GigaSpaces management User Interface by executing: the following from within my “MAVEN SHELL“

>start gs-ui

Now comes the time for the final script of the day:

  • I store this script in the tools/maven directory.
  • This is once again executed from within the same “MAVEN SHELL” that I have been using up until now.
  • This script starts up the HSQL Viewer and connects to the database being used by the mirror service to store data:


lookatmydb.cmd

mvn os:hsql-ui
dashDdriver=org.hsqldb.jdbcDriver
dashDurl=jdbc:hsqldb:hsql://localhost/testDB

executing the following query while in that viewer shows the data stored there :


select * from PUBLIC.DATA

CATEGORIES

  • GigaSpaces
  • syndicated
Owen

All Posts (36)

YOU MAY ALSO LIKE

January 3, 2019

Real-Time Analytics Meets Kubernetes –…
8 minutes read

February 2, 2011

Distributed Java Application Deployment –…
2 minutes read

November 5, 2007

QCon, Drinks on Tuesday
1 minutes read
  • Copied to clipboard

PRODUCTS, SOLUTIONS & ROLES

  • Products
  • InsightEdge Portfolio
    • Smart Cache
    • Smart ODS
    • Smart Augmented Transactions
    • Compare InsightEdge Products
  • GigaSpaces Cloud
  • Roles
  • Architects
  • CXOs
  • Product Teams
  • Solutions
  • Industry
    • Financial Services
    • Insurance
    • Retail and eCommerce
    • Telecommunications
    • Transportation
  • Technical
    • Operational BI
    • Mainframe & AS/400 Modernization
    • In Memory Data Grid
    • HTAP
    • Hybrid Cloud Data Fabric
    • Multi-Tiered Storage
    • Kubernetes Deployment
    • Streaming Analytics for Stateful Apps

RESOURCES

  • Resource Hub
  • Webinars
  • Blogs
  • Demos
  • Solution Briefs & Whitepapers
  • Case Studies
  • Benchmarks
  • ROI Calculators
  • Analyst Reports
  • eBooks
  • Technical Documentation
  • Featured Case Studies
  • Mainframe Offload with Groupe PSA
  • Digital Transformation with Avanza Bank
  • High Peak Handling with PriceRunner
  • Optimizing Business Communications with Avaya

COMPANY

  • About
  • Customers
  • Management
  • Board Members
  • Investors
  • News
  • Events
  • Careers
  • Contact Us
  • Book A Demo
  • Try GigaSpaces For Free
  • Partners
  • OEM Partners
  • System Integrators
  • Value Added Resellers
  • Technology Partners
  • Support & Services
  • University
  • Services
  • Support
Copyright © GigaSpaces 2021 All rights reserved | Privacy Policy
LinkedInTwitterFacebookYouTube

Contact Us