#!/bin/bash
set -x

wget -q -N http://download.eng.bos.redhat.com/rcm-guest/staging/jboss-dg/JDG-6.5.0-ER2/jboss-datagrid-6.5.0.ER2-server.zip
wget -q -N http://download.eng.bos.redhat.com/rcm-guest/staging/jboss-dg/JDG-6.5.0-ER2/jboss-datagrid-6.5.0.ER2-eap-modules-library.zip
wget -q -N http://download.eng.bos.redhat.com/rcm-guest/staging/jboss-dg/JDG-6.5.0-ER2/jboss-datagrid-6.5.0.ER2-eap-modules-remote-java-client.zip

wget -q -N http://porkchop.devel.redhat.com/released/JBossFuse/6.1.0/jboss-fuse-full-6.1.0.redhat-379.zip
wget -q -N http://porkchop.devel.redhat.com/released/JBEAP-6/6.4.0/jboss-eap-6.4.0.zip

unzip -q -o jboss-datagrid-6.5.0.ER2-server.zip
unzip -q -o jboss-datagrid-6.5.0.ER2-eap-modules-library.zip
unzip -q -o jboss-datagrid-6.5.0.ER2-eap-modules-remote-java-client.zip

unzip -q -o jboss-eap-6.4.0.zip

mvn -f tests/pom.xml -s maven-settings.xml -Dmaven.test.failure.ignore=true -Dsurefire.timeout=600 clean install \
   -Dfuse.zip=`pwd`/jboss-fuse-full-6.1.0.redhat-379.zip \
   -Deap.home=`pwd`/jboss-eap-6.4 \
   -Djdg.home=`pwd`/jboss-datagrid-6.5.0-server \
   -Deap.modules.library=`pwd`/jboss-datagrid-6.5.0-eap-modules-library \
   -Deap.modules.hotrod=`pwd`/jboss-datagrid-6.5.0-eap-modules-remote-java-client \
   -Dmaven.repo.local=${HOME}/.m2/jdg-mead-repository 

