#!/usr/bin/env bash # Reproduces the unnamed @PathVariable failure: compile WITHOUT -parameters and run the test that # calls UnnamedPathVariableClient. Writes the real failure to output/09-no-parameters.txt. set -u cd "$(dirname "$0")/.." OUT=output/09-no-parameters.txt mvn -B -Pnoparams clean test -Dtest=UnnamedPathVariableTest test > /tmp/noparams.log 2>&1 { echo "mvn -Pnoparams -Dtest=UnnamedPathVariableTest test (maven-compiler-plugin false)" echo grep -E 'Tests run:.*Fail|IllegalStateException|PathVariable annotation was empty|Caused by' /tmp/noparams.log \ | sed -E 's/^\[ERROR\] +//' | sort -u | head -12 } > "$OUT" cat "$OUT" mvn -B -q clean test-compile > /dev/null 2>&1 # restore normal (-parameters) classes