Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions api/maven-api-model/src/main/mdo/maven.mdo
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@
<field xdoc.separator="blank">
<name>groupId</name>
<version>3.0.0+</version>
<required>true</required>
<description>
A universally unique identifier for a project. It is normal to
use a fully-qualified package name to distinguish it from other
Expand All @@ -140,7 +139,6 @@
<field>
<name>version</name>
<version>4.0.0+</version>
<required>true</required>
<description>The current version of the artifact produced by this project.</description>
<type>String</type>
</field>
Expand All @@ -167,7 +165,6 @@
<field xdoc.separator="blank">
<name>name</name>
<version>3.0.0+</version>
<required>true</required>
<description>The full name of the project.</description>
<type>String</type>
Comment on lines 165 to 169

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good catch — updated the description to simply say "The full name of the project." without the misleading defaulting claim. The artifactId fallback is a runtime behavior in MavenProject#getName(), not a model-level default.

Claude Opus 4.6, on behalf of Guillaume Nodet

</field>
Expand Down Expand Up @@ -233,7 +230,6 @@
<field>
<name>inceptionYear</name>
<version>3.0.0+</version>
<required>true</required>
<description>The year of the project's inception, specified with 4 digits. This value is
used when generating copyright notices as well as being informational.</description>
<type>String</type>
Expand Down Expand Up @@ -355,7 +351,6 @@
<field xdoc.separator="blank" xml.insertParentFieldsUpTo="pluginRepositories">
<name>build</name>
<version>3.0.0+</version>
<required>true</required>
<description>Information required to build the project.</description>
<association>
<type>Build</type>
Expand Down Expand Up @@ -887,7 +882,6 @@
<field>
<name>sourceDirectory</name>
<version>3.0.0+</version>
<required>true</required>
<description>
This element specifies a directory containing the source of the project. The
generated build system will compile the sources from this directory when the project is
Expand All @@ -904,7 +898,6 @@
<field>
<name>scriptSourceDirectory</name>
<version>4.0.0+</version>
<required>true</required>
<description>
This element specifies a directory containing the script sources of the
project. This directory is meant to be different from the sourceDirectory, in that its
Expand All @@ -922,7 +915,6 @@
<field>
<name>testSourceDirectory</name>
<version>4.0.0+</version>
<required>true</required>
<description>
This element specifies a directory containing the unit test source of the
project. The generated build system will compile these directories when the project is
Expand Down Expand Up @@ -2931,7 +2923,6 @@
<fields>
<field>
<name>id</name>
<required>true</required>
<version>4.0.0+</version>
<type>String</type>
<defaultValue>default</defaultValue>
Expand All @@ -2951,7 +2942,6 @@
<field xml.tagName="build">
<name>build</name>
<version>4.0.0+</version>
<required>true</required>
<description>Information required to build the project.</description>
<association>
<type>BuildBase</type>
Expand Down Expand Up @@ -3290,7 +3280,6 @@
<name>groupId</name>
<version>4.0.0+</version>
<type>String</type>
<required>true</required>
<defaultValue>org.apache.maven.plugins</defaultValue>
<description>The group ID of the reporting plugin in the repository.</description>
</field>
Expand Down Expand Up @@ -3384,7 +3373,6 @@
<field>
<name>id</name>
<type>String</type>
<required>true</required>
<description>The unique id for this report set, to be used during POM inheritance and profile injection
for merging of report sets.
</description>
Expand All @@ -3393,7 +3381,6 @@
<field>
<name>reports</name>
<version>4.0.0+</version>
<required>true</required>
<description>The list of reports from this plugin which should be generated from this set.</description>
<association>
<type>String</type>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -958,4 +958,16 @@ void testConcurrentValidation() throws Exception {
"Concurrent validation failed: " + failure.get().getMessage(), failure.get());
}
}

@Test
void testMinimalWithParent() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/minimal-with-parent.xml");
assertViolations(result, 0, 0, 0);
}

@Test
void testMinimalWithoutParent() throws Exception {
SimpleProblemCollector result = validateRaw("raw-model/minimal-without-parent.xml");
assertViolations(result, 0, 0, 0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.apache.maven.validation</groupId>
<artifactId>parent</artifactId>
<version>1</version>
</parent>

<artifactId>project</artifactId>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<groupId>groupId</groupId>
<artifactId>project</artifactId>
<version>project</version>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ public void setName(String name) {
}

public String getName() {
// TODO this should not be allowed to be null.
if (getModel().getName() != null) {
return getModel().getName();
} else {
Expand Down
Loading