#!/bin/bash

set -e
set -o pipefail

cd "$(dirname "$0" )"

SCRIPT_DIR_ABS="$PWD"

TEST_RESOURCES_DIR_ABS="$SCRIPT_DIR_ABS/toolbox/src/test/resources"

mvn clean package

copy_for_aspect() {
    local ASPECT="$1"
    ASPECT_TARGET_DIR_ABS="$SCRIPT_DIR_ABS/test-data-$ASPECT/target"
    cp -v "$ASPECT_TARGET_DIR_ABS/jacoco.exec" "$TEST_RESOURCES_DIR_ABS/jacoco-$ASPECT.exec"
    cp -v "$ASPECT_TARGET_DIR_ABS/TestDataGroup${ASPECT^}-"*".jar" "$TEST_RESOURCES_DIR_ABS/TestDataGroup${ASPECT^}.jar"
}

for ASPECT in merged foo bar
do
    copy_for_aspect "$ASPECT"
done
Add script to copy test resources into place
Add script to copy test resources into place

Change-Id: I66e84c1e932da8818b652e4edc41c5cbd2bf33e4
