version: 0.2

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

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