Skip to content

Conversation

@mashraf-222
Copy link
Contributor

Summary

The Java Maven test fixture in tests/test_languages/fixtures/java_maven/ was missing a pom.xml file, causing Maven build tool detection to fail.

Problem

The test_detect_fixture_project test was failing because:

  • Build tool detection checks for pom.xml to identify Maven projects
  • The fixture directory had no pom.xml, so detection returned BuildTool.UNKNOWN instead of BuildTool.MAVEN
  • Test expected BuildTool.MAVEN but got BuildTool.UNKNOWN

Solution

Added a standard Maven pom.xml with:

  • JUnit 5 dependencies (junit-jupiter-api, junit-jupiter-engine v5.9.3)
  • Maven Surefire plugin (v2.22.2) for test execution
  • Java 11 compiler configuration
  • UTF-8 encoding
  • Project metadata (groupId: com.example, artifactId: calculator)

Impact

  • ✅ Fixes test_detect_fixture_project test
  • ✅ All 323 Java tests now pass (7 skipped)
  • ✅ Enables proper Maven project detection in test suite
  • ✅ No changes to production code, test-only fix

The java_maven test fixture directory was missing a pom.xml file,
causing BuildTool detection to fail and return UNKNOWN instead of MAVEN.
This broke the test_detect_fixture_project test.

Added a standard Maven POM with:
- JUnit 5 dependencies (junit-jupiter-api, junit-jupiter-engine)
- Maven Surefire plugin for test execution
- Java 11 compiler configuration
- UTF-8 encoding

This enables proper Maven project detection and allows all Java
configuration tests to pass.
Resolved conflicts in pom.xml by accepting the omni-java version which has:
- Updated artifactId: codeflash-test-fixture
- Newer JUnit version: 5.10.0
- Simplified dependencies: junit-jupiter + junit-jupiter-params
- Newer maven-surefire-plugin: 3.1.2

This brings the branch up to date with the latest changes from omni-java
including the Comparator schema fix from PR #1272.
@mashraf-222
Copy link
Contributor Author

Closing PR - Changes Already Merged

This PR is no longer needed because the changes have already been incorporated into omni-java through other PRs.

What Happened:

  1. Original Goal: Add missing pom.xml to tests/test_languages/fixtures/java_maven/
  2. Current State: The file was already added to omni-java (likely through PR feat: add import-based test discovery for Java #1268 or a related fix)
  3. After Merge Conflict Resolution: This branch now has 0 diffs compared to omni-java

Verification:

$ git diff origin/omni-java..HEAD
# No output - zero differences

Conclusion:

✅ The bug is fixed - pom.xml exists in omni-java
✅ All tests pass (336 passed, 7 skipped)
✅ This PR is now redundant

Closing as the work is already complete through other merged PRs. Thank you for the review and approval!

@mashraf-222 mashraf-222 closed this Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants