Copilot commented on code in PR #12347: URL: https://github.com/apache/maven/pull/12347#discussion_r3470434592
########## impl/maven-impl/src/test/resources/poms/validation/raw-model/minimal-with-parent.xml: ########## @@ -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> Review Comment: This new test POM resource is not referenced anywhere under `impl/maven-impl` (no tests call `validateRaw("raw-model/minimal-with-parent.xml")` in this module). Keeping an unused resource adds maintenance burden; either add an `impl`-side validator test that uses it (similar to `compat`), or drop the file from this module. ########## api/maven-api-model/src/main/mdo/maven.mdo: ########## @@ -167,8 +165,7 @@ <field xdoc.separator="blank"> <name>name</name> <version>3.0.0+</version> - <required>true</required> - <description>The full name of the project.</description> + <description>The full name of the project. If not specified, the artifactId will be used.</description> <type>String</type> Review Comment: The updated `<name>` field description claims that when `<name>` is not specified, the `artifactId` will be used. That fallback is implemented by `MavenProject#getName()`, but the POM/model field itself remains unset (null) when omitted, so this description is misleading for the model descriptor/XSD/documentation generated from the MDO. ########## impl/maven-impl/src/test/resources/poms/validation/raw-model/minimal-without-parent.xml: ########## @@ -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> Review Comment: This new test POM resource is not referenced anywhere under `impl/maven-impl` (no tests call `validateRaw("raw-model/minimal-without-parent.xml")` in this module). If the intent is to validate the 'minimal POM without parent' scenario for the impl-side validator, consider adding a corresponding test; otherwise, removing the unused resource will keep the test data set leaner. -- 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]
