version: 0.2

phases:
  install:
    runtime-versions:
      java: "$JAVA_RUNTIME"

  build:
    commands:
      - mvn clean install -P stability-tests -pl :stability-tests --am $MAVEN_OPTIONS
      - echo $MAVEN_OPTIONS
    finally:
      - mkdir -p codebuild-test-reports
      - find ./ -name 'TEST-*.xml' -type f -exec cp {} codebuild-test-reports/ \;
reports:
  StabilityTests:
    files:
      - 'codebuild-test-reports/**/*'
