image: maven:3-jdk-8

environment:
  - GPG_PASSPHRASE
  - GITHUB_OAUTH_TOKEN
  - NEXUS_PASSWORD

files:
  - etc/settings.xml:/root/.m2/settings.xml

targets:
  build: mvn -B verify -Dgpg.skip=true

  clean: mvn -B clean

  site: mvn -B clean site

  snapshot:
    files:
      - $GPG_PUBLIC_KEY:/root/.gnupg/public.key
      - $GPG_PRIVATE_KEY:/root/.gnupg/private.key
    run:
      - gpg --import /root/.gnupg/public.key
      - gpg --import --allow-secret-key-import /root/.gnupg/private.key
      - mvn -B deploy


image: maven:3-jdk-8

environment:
  - GPG_PASSPHRASE
  - GITHUB_OAUTH_TOKEN
  - NEXUS_PASSWORD

files:
  - etc/settings.xml:/root/.m2/settings.xml

targets:
  build: mvn -B verify -Dgpg.skip=true

  clean: mvn -B clean

  site: mvn -B -e clean site

  snapshot:
    files:
      - $GPG_PUBLIC_KEY:/root/.gnupg/public.key
      - $GPG_PRIVATE_KEY:/root/.gnupg/private.key
    run:
      - gpg --import /root/.gnupg/public.key
      - gpg --import --allow-secret-key-import /root/.gnupg/private.key
      - mvn -B deploy


Add -e for mvn on site
Add -e for mvn on site
