Commits
Tarun Sukhani authored 09c768be853
fix: depend on agent-jar from compile-tests so cold test runs work (PF-79)
Running ant integration-test, ant test-single, or ant debug-test-single
after ant clean failed with "agent library failed Agent_OnLoad: instrument
... Error opening zip file or JAR manifest missing" because all three
targets fork a JVM with -javaagent:play-${version}.jar but only depend on
compile-tests, which itself depended only on version+compile — the
agent-jar target that builds play-${version}.jar was never pulled in.
The unittest target avoided the bug by listing agent-jar in its own deps.
The fix is symmetric: add agent-jar to compile-tests so all three test
targets that ride on it get the jar before the test JVM forks.
agent-jar already depends on version+compile, so the cascade is consistent
and does not double-compile.
Discovered while implementing PF-77 in a fresh worktree — the
implementation agent had to manually run ant jar before ant integration-test
worked.
Verified
- ant clean && ant integration-test — passes (was failing)
- ant clean && ant test-single -Dtestclass=play.server.SecurityHeadersPolicyTest — passes
- ant unittest — still passes (no regression on the path that already worked)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>