diff --git a/build.properties b/build.properties new file mode 100644 index 0000000..180cd4b --- /dev/null +++ b/build.properties @@ -0,0 +1,11 @@ +src.dir=src/main/java +res.dir=src/main/resources +web.dir=src/main/webapp +test.dir=src/test/java +build.dir=build +dist.dir=dist +lib.dir=lib +war.name=jsf.war + +history.diff.file=history.sh +history.script=history.diff \ No newline at end of file diff --git a/build.xml b/build.xml index 4307a6e..bf51090 100644 --- a/build.xml +++ b/build.xml @@ -1,33 +1,21 @@ - - - - - - - - - + - - - - - + + + + - - - @@ -39,9 +27,8 @@ - - + @@ -60,7 +47,6 @@ - @@ -77,110 +63,17 @@ - - - + + - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/history.sh b/history.sh new file mode 100644 index 0000000..ce11c21 --- /dev/null +++ b/history.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# You can override with env vars when invoking from Ant +DIFF_FILE="${DIFF_FILE:-history.diff}" + +# Remember where we started, so we can optionally restore later +ORIG_HEAD="$(git rev-parse HEAD)" +BROKEN_COMMIT="" + +# Compile target to test (defaults to 'compile', change if necessary) +ANT_TARGET="${ANT_TARGET:-compile}" + +while true; do + echo "[history.sh] Trying to build commit $(git rev-parse --short HEAD) …" + if ant -q "${ANT_TARGET}"; then + echo "[history.sh] Build succeeded on commit $(git rev-parse --short HEAD)" + break + fi + + if [[ -z "${BROKEN_COMMIT}" ]]; then + BROKEN_COMMIT="$(git rev-parse HEAD)" + fi + + # If this is the first commit, stop the search + if [[ "$(git rev-list --count HEAD)" -eq 1 ]]; then + echo "[history.sh] Reached the first commit without a successful build. Aborting." + exit 1 + fi + + # Step back one commit + git reset --hard HEAD^ + +done + +# If we discovered a broken commit, emit the diff +if [[ -n "${BROKEN_COMMIT}" ]]; then + echo "[history.sh] Saving diff between working HEAD and first broken commit ${BROKEN_COMMIT:0:7} → ${DIFF_FILE}" + git diff HEAD "${BROKEN_COMMIT}" > "${DIFF_FILE}" +fi + +# Restore original state (comment this line if you prefer to stay on the good commit) +# git checkout -q "${ORIG_HEAD}" + +exit 0 diff --git a/lib/ant-contrib-1.0b2.jar b/lib/ant-contrib-1.0b2.jar new file mode 100644 index 0000000..ea817cd Binary files /dev/null and b/lib/ant-contrib-1.0b2.jar differ diff --git a/lib/js-22.3.1.jar b/lib/js-22.3.1.jar new file mode 100644 index 0000000..136cfc0 Binary files /dev/null and b/lib/js-22.3.1.jar differ diff --git a/lib/js-scriptengine-23.1.2.jar b/lib/js-scriptengine-23.1.2.jar new file mode 100644 index 0000000..e75ee09 Binary files /dev/null and b/lib/js-scriptengine-23.1.2.jar differ