Skip to content

Handle Maven reactor modules without packaged artifacts in native tests#1

Closed
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-issue-727
Closed

Handle Maven reactor modules without packaged artifacts in native tests#1
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-issue-727

Conversation

Copilot AI commented Dec 25, 2025

Copy link
Copy Markdown

Native Maven tests failed when reactor modules had no packaged jar (e.g., POM-only or source-less modules), causing “Missing jar-file …” or null artifact errors.

  • Dependency resolution

    • Accept reactor output/test-output directories as classpath entries when packaged files are absent.
    • Skip metadata exclusion wiring when no artifact file exists to avoid NPEs.
    • Guard JUnit dependency inference against unresolved artifacts.
  • Repro and coverage

    • Added reproducer project with a source-less module and a consuming test module.
    • Added functional test to assert native tests proceed without missing-jar failures.

Example adjustment:

Optional<Path> reactorOutput = resolveClassesDirectoryFromReactor(artifact);
if (reactorOutput.isPresent()) {
    Path output = reactorOutput.get();
    if (Files.exists(output)) {
        logger.debug("ImageClasspath Entry: " + artifact + " (" + output.toUri() + ")");
        return output; // use reactor output when no jar exists
    }
}
Original prompt

You need to fix graalvm#727 .


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Dec 25, 2025
Copilot AI and others added 2 commits December 25, 2025 12:04
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Co-authored-by: linghengqian <20187731+linghengqian@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with native build tools as per issue 727 Handle Maven reactor modules without packaged artifacts in native tests Dec 25, 2025
Copilot AI requested a review from linghengqian December 25, 2025 12:10
@linghengqian linghengqian deleted the copilot/fix-issue-727 branch January 27, 2026 14:34
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.

Native Build Tools cannot recognize Maven modules that only have pom.xml but no source code

2 participants