Files
JUnit_Tutorials/testcontainers2/docs/output/04-legacy-pom-compiles-under-1.21.4.txt
T
asmhatre fd3434c42d Add testcontainers2 module: Testcontainers 2.0 artifact renames, JUnit 4 removal, and the Docker API version bump
Verifies five claims against primary sources rather than release-note prose: the
org.testcontainers:junit-jupiter -> testcontainers-junit-jupiter rename (and the other 60 like
it, per OpenRewrite's own Testcontainers2Migration recipe), that GenericContainer no longer
implements org.junit.rules.TestRule anywhere in the 2.0.5 jar (confirmed exhaustively, not just
for this one class), the real compiler/dependency-resolution breaks from bumping only a version
number on existing JUnit 4 @ClassRule code, the literal 1.32 -> 1.44 default Docker API version
bump in DockerClientProviderStrategy's bytecode (tied to the real Docker Engine 29 compatibility
issue), and Spring Boot 4.1.1's BOM pinning 2.0.5. Built and tested with no Docker daemon
available; one test class demonstrates a clean @EnabledIfDockerAvailable skip, guarded at the
class level after the method-level guard was caught failing first.
2026-10-08 13:19:23 +00:00

44 lines
2.1 KiB
Plaintext

Module: /tmp/legacy-check (a throwaway Maven project, not part of this repo - built only to
capture these two transcripts; see the post for why).
pom.xml dependencies at this point:
junit:junit:4.13.2
org.testcontainers:testcontainers:1.21.4
org.testcontainers:postgresql:1.21.4
src/test/java/com/ankurm/legacy/ClassicJUnit4RuleTest.java:
@ClassRule
public static PostgreSQLContainer<?> postgres = new PostgreSQLContainer<>("postgres:17");
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.ankurm:legacy-check >-----------------------
[INFO] Building legacy-check 1.0.0
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ legacy-check ---
[INFO] Deleting /tmp/post46/legacy-check/target
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ legacy-check ---
[INFO] skip non existing resourceDirectory /tmp/post46/legacy-check/src/main/resources
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ legacy-check ---
[INFO] No sources to compile
[INFO]
[INFO] --- resources:3.3.1:testResources (default-testResources) @ legacy-check ---
[INFO] skip non existing resourceDirectory /tmp/post46/legacy-check/src/test/resources
[INFO]
[INFO] --- compiler:3.13.0:testCompile (default-testCompile) @ legacy-check ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 1 source file with javac [debug target 21] to target/test-classes
[WARNING] location of system modules is not set in conjunction with -source 21
not setting the location of system modules may lead to class files that cannot run on JDK 21
--release 21 is recommended instead of -source 21 -target 21 because it sets the location of system modules automatically
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.016 s
[INFO] Finished at: 2026-10-08T18:40:55+05:30
[INFO] ------------------------------------------------------------------------