#!/bin/bash
set -x

wget -q -N http://download.eng.bos.redhat.com/rcm-guest/staging/jboss-dg/JDG-6.5.0-Final/jboss-datagrid-6.5.0.Final-server.zip
wget -q -N http://download.eng.bos.redhat.com/rcm-guest/staging/jboss-dg/JDG-6.5.0-Final/jboss-datagrid-6.5.0.Final-eap-modules-library.zip
wget -q -N http://download.eng.bos.redhat.com/rcm-guest/staging/jboss-dg/JDG-6.5.0-Final/jboss-datagrid-6.5.0.Final-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.Final-server.zip
unzip -q -o jboss-datagrid-6.5.0.Final-eap-modules-library.zip
unzip -q -o jboss-datagrid-6.5.0.Final-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 

