name: Java CI with Maven

on: [ push ]

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Maven
      run: mvn -B package test install checkstyle:checkstyle -f pom.xml
    - name: SonarQube scan
      run: mvn -B -f pom.xml sonar:sonar -Dsonar.login=$SONARQUBE_TOKEN -Dsonar.host.url=$SONARQUBE_HOST
      env:
        SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }}
        SONARQUBE_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
    - name: Deployment
      if:  ( github.ref == 'refs/heads/master' ) || ( github.ref == 'refs/heads/develop' )
      run: mvn -B -f pom.xml -s .CI/maven-settings.xml deploy -Pci-deploy -DskipTests=true
      env:
        NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
        NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

name: Java CI with Maven

on: [ push ]

jobs:
  build:
    name: Build
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Maven
      run: mvn -B -f pom.xml install checkstyle:checkstyle
    - name: SonarQube scan
      run: mvn -B -f pom.xml sonar:sonar -Dsonar.login=$SONARQUBE_TOKEN -Dsonar.host.url=$SONARQUBE_HOST
      env:
        SONARQUBE_HOST: ${{ secrets.SONARQUBE_HOST }}
        SONARQUBE_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
    - name: Deployment
      if:  ( github.ref == 'refs/heads/master' ) || ( github.ref == 'refs/heads/develop' )
      run: mvn -B -f pom.xml -s .CI/maven-settings.xml deploy -Pci-deploy -DskipTests=true
      env:
        NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
        NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

Reorder Maven command line args and remove useless args
Reorder Maven command line args and remove useless args
