variables:
  MAVEN_CLI_OPTS: "--batch-mode"

build:
  stage: build
  script:
    - mvn $MAVEN_CLI_OPTS compile

test:
  stage: test
  script:
    - mvn $MAVEN_CLI_OPTS test

deploy:
  stage: deploy
  script:
    - rm -r /serv/src/*
    - cp -r ./src/* /serv/src
    - cp ./pom.xml /serv/pom.xml
    - mvn $MAVEN_CLI_OPTS -f /serv package
  only:
    - serv