Skip to content

Hosted Maven and VEX treat a Maven 4 implicit-subproject root as one pom #1809

Open

Description

[agent] Split out of the review of #1807 (the vendored fix for #622).

Summary

Maven 4 discovers the subprojects of a 4.1.0 pom-packaged root that lists no <subprojects>/<modules>: every direct subdirectory holding a pom.xml (checked against Maven 4.0.0-rc-7's DefaultModelBuilder and a real mvn validate). #1807 teaches the vendored reactor planner this. Every other caller still decides "is this a reactor?" with maven_reactor::declares_modules, which only sees declared lists:

  • patch/redirect/mod.rs (rewrite_maven_pom): the redirect_maven_multimodule_unsupported refusal (Hosted Maven mode edits only the root pom of a multi-module build, leaves child literals unpatched, and still attests VEX #261) doesn't fire. Hosted mode may pin only the root pom while a discovered module's literal <version> wins.
  • vex/discover/maven.rs:158: reactor is false, so the root's hosted pin can be attested instead of being reported UnattestedKind::MavenReactorRoot.
  • vendor/jvm/sbt.rs:261: the vendor_jvm_build_ambiguous guard next to build.sbt is skipped. sbt.rs:98 and jvm/mod.rs:350 (MavenShape) also classify the root as a single pom.
  • crawlers/maven_scope.rs: the project-mode scope seeds only declared modules.

Expected

The same discovery rule (model version not 4.0.0, literal pom packaging, no top-level list, maven.project.discoverSubprojects not set to anything but true) decides reactor-ness everywhere. The hosted callers need the child directories in their file view to apply it.

Not verified

Code-path analysis only. No hosted repro has been run yet. The first step is a failing hosted test (scan --mode hosted + vex on the #622 tree).


Generated by Claude Code

Activity

  1. mikolalysenko commented on Oct 30, 2026

    @mikolalysenko
    CollaboratorAuthor

    [agent] Claiming this issue (shared root cause: every caller outside the vendored reactor planner decides reactor-ness with maven_reactor::declares_modules, which misses Maven 4's implicit subprojects). Branch: agent/fix-maven4-implicit-subprojects. Claim-ID: 2026-10-30T06:20:54Z-83256b


    Generated by Claude Code

  2. mikolalysenko commented on Oct 30, 2026

    @mikolalysenko
    CollaboratorAuthor

    [agent] Draft PR: #1886


    Generated by Claude Code

  3. added 2 commits that reference this issue on Oct 30, 2026
    e5086ee
    b57c4a5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions