language: java
jdk:
  - oraclejdk8
# we want the latest release of JDK8
addons:
  apt:
    packages:
      - oracle-java8-installer

install: '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && mvn --settings .build/deploy-settings.xml -DaltDeploymentRepository=snapshots::default::http://m2.neo4j.org/content/repositories/snapshots clean deploy || mvn clean verify'
script:
  - java -jar tools/grammar/target/grammar-1.0-SNAPSHOT.jar ISO14977 cypher.xml > grammar/generated/cypher.ebnf
  - java -jar tools/grammar/target/grammar-1.0-SNAPSHOT.jar Antlr4 cypher.xml > grammar/generated/Cypher.g4
  - java -DRailRoadDiagrams.outputDir=grammar/generated/railroad -jar tools/grammar/target/grammar-1.0-SNAPSHOT.jar RailRoadDiagrams cypher.xml

language: java
jdk:
  - oraclejdk8
# we want the latest release of JDK8
addons:
  apt:
    packages:
      - oracle-java8-installer

install: 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ] ; then mvn --settings .build/deploy-settings.xml -DaltDeploymentRepository=snapshots::default::http://m2.neo4j.org/content/repositories/snapshots clean deploy ; else mvn clean verify ; fi'
script:
  - java -jar tools/grammar/target/grammar-1.0-SNAPSHOT.jar ISO14977 cypher.xml > grammar/generated/cypher.ebnf
  - java -jar tools/grammar/target/grammar-1.0-SNAPSHOT.jar Antlr4 cypher.xml > grammar/generated/Cypher.g4
  - java -DRailRoadDiagrams.outputDir=grammar/generated/railroad -jar tools/grammar/target/grammar-1.0-SNAPSHOT.jar RailRoadDiagrams cypher.xml

Stop the build in case a test fails
Stop the build in case a test fails
