slawekjaranowski opened a new issue, #11979:
URL: https://github.com/apache/maven/issues/11979
### Affected version
all
### Bug description
### Validated fields (15 / 25)
| Path | Stage | Notes |
|---|---|---|
| `project.modelVersion` | raw + effective | |
| `project.groupId` | raw | Conditionally required — only when `<parent>`
is absent |
| `project.artifactId` | raw + effective | |
| `project.version` | raw + effective | Conditionally required — only when
`<parent>` is absent |
| `project.parent.groupId` | raw | |
| `project.parent.artifactId` | raw | |
| `project.dependencies.dependency.groupId` | effective | |
| `project.dependencies.dependency.artifactId` | effective | |
| `project.dependencies.dependency.exclusions.exclusion.groupId` |
effective | |
| `project.dependencies.dependency.exclusions.exclusion.artifactId` |
effective | |
| `project.repositories.repository.id` | raw | |
| `project.repositories.repository.url` | raw | |
| `project.build.plugins.plugin.artifactId` | raw | |
| `project.reporting.plugins.plugin.groupId` | effective | Marked required
but has default `org.apache.maven.plugins` |
| `project.reporting.plugins.plugin.artifactId` | effective | |
### Missing validations (8 / 25)
| Path | Notes |
|---|---|
| `project.inceptionYear` | Not validated anywhere |
| `project.build.sourceDirectory` | Has SuperPOM default — may be
intentional |
| `project.build.scriptSourceDirectory` | Has SuperPOM default — may be
intentional |
| `project.build.testSourceDirectory` | Has SuperPOM default — may be
intentional |
| `project.build.extensions.extension.groupId` | No validation at all |
| `project.build.extensions.extension.artifactId` | No validation at all |
| `project.profiles.profile.activation.property.name` | Not validated |
| `project.reporting.plugins.plugin.reportSets.reportSet.reports` | Not
validated |
### Fields incorrectly marked as `required` in MDO — optional when
`<parent>` is present
These fields can be inherited from the parent POM.
The MDO definition should be corrected.
| Path | Notes |
|---|---|
| `project.groupId` | Optional when `<parent>` is present — inherited from
parent |
| `project.version` | Optional when `<parent>` is present — inherited from
parent |
### Fields incorrectly marked as `required` in MDO — always have a default
value
These fields are marked `<required>true</required>` but also define a
`<defaultValue>`,
so they are never actually empty. The `required` annotation is misleading.
| Path | Default value | Validated |
|---|---|---|
| `project.profiles.profile.id` | `"default"` | no — unnecessary given the
default |
| `project.reporting.plugins.plugin.groupId` | `"org.apache.maven.plugins"`
| yes — unnecessary given the default |
| `project.reporting.plugins.plugin.reportSets.reportSet.id` | `"default"`
| no — unnecessary given the default |
### Most actionable gaps
- **`project.build.extensions.extension.groupId/artifactId`** — build
extensions have no coordinate
validation at all, unlike plugins which do validate coordinates.
- **`project.profiles.profile.activation.property.name`** — an activation
property without a name
silently has no effect.
- **`project.reporting.plugins.plugin.reportSets.reportSet.reports`** —
report sets are not
validated.
### Fields validated but NOT marked `required` in MDO
These are likely intentional and should remain as-is:
| Path | Default value | Reason |
|---|---|---|
| `project.parent.version` | — | Effectively required for resolution |
| `project.build.plugins.plugin.groupId` | `"org.apache.maven.plugins"` |
Validated for safety even though it has a default |
---
generated by copilot - to check again
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]