Skip to content

Java: test Maven Enforcer project property expansion - #22347

Merged
andersfugmann merged 2 commits into
mainfrom
andersfugmann/fix-maven-enforcer-property-version
Aug 14, 2026
Merged

Java: test Maven Enforcer project property expansion#22347
andersfugmann merged 2 commits into
mainfrom
andersfugmann/fix-maven-enforcer-property-version

Conversation

@andersfugmann

Copy link
Copy Markdown
Contributor

Summary

Adds Java integration test coverage for Maven projects where the Maven Enforcer Plugin's requireMavenVersion rule references a project property, for example ${maven.version}.

The tests also verify that the Java Autobuilder selects Maven 3.9.16 when it satisfies the configured version requirement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 77fc65d2-e1bb-46b1-a73d-aed6101a7596
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: e435859b-f4ed-442f-b649-5e1002031780
@andersfugmann
andersfugmann requested a review from a team as a code owner August 14, 2026 12:10
Copilot AI balanced review requested due to automatic review settings August 14, 2026 12:10
@github-actions github-actions Bot added the Java label Aug 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Maven Enforcer integration coverage for project-property expansion and Maven 3.9.16 selection.

Changes:

  • Adds a ${maven.version} fixture.
  • Verifies Maven 3.9.16 selection.
  • Adds fixture sources, resources, settings, and archive expectations.
Show a summary per file
File Description
maven-enforcer-single-version/test.py Asserts selected Maven version.
maven-enforcer-property-version/test.py Configures the new integration test.
maven-enforcer-property-version/pom.xml Defines the property-based Maven requirement.
maven-enforcer-property-version/settings.xml Configures the Maven mirror.
maven-enforcer-property-version/source_archive.expected Records expected archived sources.
maven-enforcer-property-version/src/main/java/com/example/App.java Checks the selected Maven installation.
maven-enforcer-property-version/src/test/java/com/example/AppTest.java Supplies a sample unit test.
maven-enforcer-property-version/src/main/resources/my-app.properties Supplies a sample properties resource.
maven-enforcer-property-version/src/main/resources/page.xml Supplies a sample page resource.
maven-enforcer-property-version/src/main/resources/struts.xml Supplies a sample Struts resource.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 10/10 changed files
  • Comments generated: 1
  • Review effort level: Balanced

@jketema jketema left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this code copied and modified from a test we already had?

@andersfugmann

Copy link
Copy Markdown
Contributor Author

Is this code copied and modified from a test we already had?

No. Is a copy, except the maven version is replaced with ${maven.version} in the pom

@jketema

jketema commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

I think you mean "Yes" 😂

@andersfugmann

Copy link
Copy Markdown
Contributor Author

I think you mean "Yes" 😂

I think I do. Yes - its a slightly modified copy 😄

@jketema jketema left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andersfugmann
andersfugmann merged commit b196f0c into main Aug 14, 2026
13 of 20 checks passed
@andersfugmann
andersfugmann deleted the andersfugmann/fix-maven-enforcer-property-version branch August 14, 2026 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants