# Use docker-based infrastructure
sudo: false

language: java

jdk:
  - oraclejdk7

notifications:
  irc: "chat.freenode.net#seedstack-dev"

cache:
  directories:
    - "$HOME/.m2/repository"

install: /bin/true

script:
  - mvn -B -U -T 4 -Pjavadoc install jacoco:report
  - mvn -B coveralls:report -DrepoToken=$COVERALLS_TOKEN

after_success:
  - chmod +x deploy_ghpages.sh && ./deploy_ghpages.sh
  - echo "<settings><servers><server><id>sonatype-nexus-snapshots</id><username>\${env.SONATYPE_USER}</username><password>\${env.SONATYPE_PASS}</password></server></servers></settings>" > ~/settings.xml
  - "[[ $TRAVIS_PULL_REQUEST == \"false\" && $TRAVIS_BRANCH == \"master\" ]] && mvn deploy --settings ~/settings.xml -DskipTests=true -Pjavadoc"

# Use docker-based infrastructure
sudo: false

language: java

jdk:
  - oraclejdk7

notifications:
  irc: "chat.freenode.net#seedstack-dev"

cache:
  directories:
    - "$HOME/.m2/repository"

install: /bin/true

script:
  - mvn -B -U -T 4 -Pjavadoc install jacoco:report
  - mvn -B coveralls:report -DrepoToken=$COVERALLS_TOKEN

after_success:
  - echo "<settings><servers><server><id>sonatype-nexus-snapshots</id><username>\${env.SONATYPE_USER}</username><password>\${env.SONATYPE_PASS}</password></server></servers></settings>" > ~/settings.xml
  - "[[ $TRAVIS_PULL_REQUEST == \"false\" && $TRAVIS_BRANCH == \"master\" ]] && mvn deploy --settings ~/settings.xml -DskipTests=true -Pjavadoc"
  - "[[ $TRAVIS_PULL_REQUEST == \"false\" && $TRAVIS_BRANCH == \"master\" ]] && chmod +x deploy_ghpages.sh && ./deploy_ghpages.sh"

Deploy javadoc only on master
Deploy javadoc only on master