Sitelet https://github.com/apache/maven/pull/11985
Skip to content

Remove redundant required attributes from Maven model - #11985

Merged
slawekjaranowski merged 3 commits into
apache:maven-3.10.xfrom
slawekjaranowski:model-required
Apr 29, 2026
Merged

slawekjaranowski merged 3 commits into
apache:maven-3.10.xfrom
slawekjaranowski:model-required

Conversation

@slawekjaranowski

Copy link
Copy Markdown
Member

After the fix in the modello plugin required fields are propagated to documentation and xsd.

We should remove reduntant one which is not effectively required.

Also add additional test for validator.

After the fix in the modello plugin required fields are propagated to documentation and xsd.

We should remove reduntant one which is not effectively required.

Also add additional test for validator.
@slawekjaranowski slawekjaranowski added this to the 3.10.0 milestone Apr 26, 2026
@slawekjaranowski slawekjaranowski added the bug Something isn't working label Apr 29, 2026
@slawekjaranowski
slawekjaranowski merged commit 33720e7 into apache:maven-3.10.x Apr 29, 2026
18 checks passed
@slawekjaranowski
slawekjaranowski deleted the model-required branch April 29, 2026 21:17
gnodet added a commit that referenced this pull request Jun 25, 2026
…2347)

* Forward-port #11985: remove redundant required MDO attrs (#11979)

Remove <required>true</required> from 13 metadata/defaulted fields in maven.mdo
(forward-port of PR #11985 from maven-3.10.x).
Update Model.name description to document artifactId fallback.
Add minimal POM validation tests.

* Address Copilot review comments

- Fix <name> field description in maven.mdo to not claim the model field
  defaults to artifactId (the fallback is a runtime behavior in
  MavenProject#getName(), not a model-level default)
- Remove unused test POM resources minimal-with-parent.xml and
  minimal-without-parent.xml from impl/maven-impl (only referenced in
  compat/maven-model-builder tests which have their own copies)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
gnodet added a commit that referenced this pull request Jun 25, 2026
…ion coordinate validation (#11979) (#12346)

* Forward-port #11985: remove redundant required MDO attrs + add extension coordinate validation (#11979)

- Remove <required>true</required> from 13 metadata/defaulted fields in maven.mdo
  (forward-port of PR #11985 from maven-3.10.x)
- Update Model.name description to document artifactId fallback
- Add WARNING-level validation for missing extension groupId/artifactId
- Add unit tests for extension coordinate validation and minimal POM validation

* Address Copilot review comments (port from #12347)

- Fix <name> field description in maven.mdo to not claim the model field
  defaults to artifactId (the fallback is a runtime behavior in
  MavenProject#getName(), not a model-level default)

Note: unlike the 4.0.x branch, the test POM resources minimal-with-parent.xml
and minimal-without-parent.xml are actually referenced by tests in
impl/maven-impl on master, so they are kept.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants