language: java

jdk:
    - oraclejdk8

cache:
  directories:
    - $HOME/.m2

jobs:
        include:
                - stage: build-with-tests
                  install:
                          mvn --settings .maven.xml install -B 
                - stage: build-profil-MinimizedDependencies
                  install:
                          mvn clean install --settings .maven.xml -B -PMinimizedDependencies
                - stage: deploy-develop-branch
                  install:
                        mvn clean deploy --settings .maven.xml -B
                        mvn clean deploy --settings .maven.xml -B -PMinimizedDependencies
                  on:
                        branch: develop 

language: java

jdk:
    - oraclejdk8

cache:
  directories:
    - $HOME/.m2

jobs:
        include:
                - stage: build-with-tests
                  install:
                          mvn --settings .maven.xml install -B 
                - stage: build-profil-MinimizedDependencies
                  install:
                          mvn clean install --settings .maven.xml -B -PMinimizedDependencies
                - stage: deploy-develop-branch
                  install:
                        mvn clean deploy --settings .maven.xml -B
                        mvn clean deploy --settings .maven.xml -B -PMinimizedDependencies
                  if: branch: develop 

Use if to skip deployment
Use if to skip deployment
