image: maven:latest stages: - build - test # Cache downloaded dependencies and plugins between builds. cache: paths: - /root/.m2/repository/ build: stage: build only: - dev - master - merge_requests script: - echo "BUILDING PROJECT" - mvn clean compile test: stage: test only: - dev - master - merge_requests script: - echo "RUNNING TESTS" - mvn clean test