<commit_before>language: java
git:
  depth: 5
  submodules: false # we do this ourselves later with `build.py update`

matrix:
  include:
    - jdk: oraclejdk8
      env: PYTHON=python2
    - jdk: oraclejdk8
      env: PYTHON=python3
    - jdk: openjdk11
      env: PYTHON=python3

install:
  - export TOMCAT_VERSION=8.5.29
  - export BUILD_PY=./build/build.py
  - $PYTHON $BUILD_PY update-shallow
  - travis_retry $PYTHON $BUILD_PY dldeps

script:
  - $PYTHON --version
  - travis_retry $PYTHON $BUILD_PY build
  - $PYTHON $BUILD_PY check
  - $PYTHON $BUILD_PY test
  - $PYTHON $BUILD_PY jar
  - java -jar ./build/dist/vnu.jar ./build/dist/index.html
  - java -jar ./build/dist/vnu.jar ./site/nu-about.html
  - jar xf ./build/dist/vnu.jar && file nu/validator/client/SimpleCommandLineValidator.class | grep "version 52.0"
  - $PYTHON $BUILD_PY war
  - jar xf ./build/dist/vnu.war && file WEB-INF/classes/nu/validator/servlet/VerifierServlet.class | grep "version 52.0"
  - curl -O http://archive.apache.org/dist/tomcat/tomcat-8/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.zip
  - unzip apache-tomcat-$TOMCAT_VERSION.zip
  - chmod a+x apache-tomcat-$TOMCAT_VERSION/bin/*.sh
  - apache-tomcat-$TOMCAT_VERSION/bin/catalina.sh start
  - cp ./build/dist/vnu.war apache-tomcat-$TOMCAT_VERSION/webapps/
  - timeout --preserve-status 15s tail -f apache-tomcat-$TOMCAT_VERSION/logs/catalina.out || true
  - curl -sS 'http://localhost:8080/vnu/?out=gnu&doc=data:text/html;charset=utf-8,%3C%21doctype%20html%3E%3Cmeta%20charset%3Dutf-8%3E%3Ctitle%3ETest%3C%2Ftitle%3E' > RESULTS
  - test -z "$(if [ -t RESULTS ]; then cat RESULTS | grep -v '^$'; fi)"
  - if [ $? != 0 ]; then cat RESULTS; fi

cache:
  directories:
    - dependencies<commit_msg>Travis: Build jar after war, instead of before war<commit_after>language: java
git:
  depth: 5
  submodules: false # we do this ourselves later with `build.py update`

matrix:
  include:
    - jdk: oraclejdk8
      env: PYTHON=python2
    - jdk: oraclejdk8
      env: PYTHON=python3
    - jdk: openjdk11
      env: PYTHON=python3

install:
  - export TOMCAT_VERSION=8.5.29
  - export BUILD_PY=./build/build.py
  - $PYTHON $BUILD_PY update-shallow
  - travis_retry $PYTHON $BUILD_PY dldeps

script:
  - $PYTHON --version
  - travis_retry $PYTHON $BUILD_PY build
  - $PYTHON $BUILD_PY check
  - $PYTHON $BUILD_PY test
  - $PYTHON $BUILD_PY war
  - jar xf ./build/dist/vnu.war && file WEB-INF/classes/nu/validator/servlet/VerifierServlet.class | grep "version 52.0"
  - curl -O http://archive.apache.org/dist/tomcat/tomcat-8/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.zip
  - unzip apache-tomcat-$TOMCAT_VERSION.zip
  - chmod a+x apache-tomcat-$TOMCAT_VERSION/bin/*.sh
  - apache-tomcat-$TOMCAT_VERSION/bin/catalina.sh start
  - cp ./build/dist/vnu.war apache-tomcat-$TOMCAT_VERSION/webapps/
  - timeout --preserve-status 15s tail -f apache-tomcat-$TOMCAT_VERSION/logs/catalina.out || true
  - curl -sS 'http://localhost:8080/vnu/?out=gnu&doc=data:text/html;charset=utf-8,%3C%21doctype%20html%3E%3Cmeta%20charset%3Dutf-8%3E%3Ctitle%3ETest%3C%2Ftitle%3E' > RESULTS
  - test -z "$(if [ -t RESULTS ]; then cat RESULTS | grep -v '^$'; fi)"
  - if [ $? != 0 ]; then cat RESULTS; fi
  - $PYTHON $BUILD_PY jar
  - java -jar ./build/dist/vnu.jar ./build/dist/index.html
  - java -jar ./build/dist/vnu.jar ./site/nu-about.html
  - jar xf ./build/dist/vnu.jar && file nu/validator/client/SimpleCommandLineValidator.class | grep "version 52.0"

cache:
  directories:
    - dependencies
{'fraction_non_alphanumeric': 0.14314115308151093, 'fraction_numerical': 0.024992899744390798, 'mean_word_length': 3.353522867737948, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5641614', 'n_tokens_mistral': 1468, 'n_tokens_neox': 1390, 'n_words': 263}