gnodet-bot commented on code in PR #13094: URL: https://github.com/apache/maven/pull/13094#discussion_r4274418057
########## its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng8766SpiWorkspaceReaderTest.java: ########## @@ -0,0 +1,91 @@ +/* + * 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. + */ +package org.apache.maven.it; + +import java.nio.file.Path; +import java.util.List; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.assertTrue; + +/** + * Integration test for the {@code WorkspaceReader} SPI in maven-api-spi (MNG-8766). + * + * <p>Verifies that SPI workspace readers are: + * <ol> + * <li>Discovered via DI and active during the build session</li> + * <li>Consulted for regular artifact resolution (findArtifact, findVersions)</li> + * <li>Consulted for model resolution via findModel() — the path wired through + * {@code SpiWorkspaceReaderAdapter} implementing {@code MavenWorkspaceReader}</li> Review Comment: Stale Javadoc after the `Optional<Model>` refactor — `findModel()` no longer returns a path. ```suggestion * <li>Consulted for model resolution via findModel() — the pre-built {@link org.apache.maven.api.model.Model} * returned by the SPI is passed directly through {@code SpiWorkspaceReaderAdapter} * to the resolver, bypassing {@code ModelProcessor} entirely</li> ``` -- 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]
