MaxonT opened a new pull request, #795:
URL: https://github.com/apache/maven-pmd-plugin/pull/795

   The maven-pmd-plugin still calls APIs that Maven 3 deprecated, and issue 
#793 asks to move off them; the patch is attached for you to look over.
   
   ### Description
   
   `PmdProjectStub` built an `ArtifactRepository` (with two 
`ArtifactRepositoryPolicy` objects) in `getRemoteArtifactRepositories()` and 
converted it with `RepositoryUtils.toRepos()` to answer 
`getRemoteProjectRepositories()`. Nothing in the module calls 
`getRemoteArtifactRepositories()`; `ConfigurationService` only uses 
`getRemoteProjectRepositories()`. This change removes the deprecated override 
and the five imports it needed, and builds the same `central` repository 
directly as a Resolver `RemoteRepository` (`https://repo1.maven.org/maven2`, 
type `default`). The default repository policies on a `RemoteRepository` are 
enabled, daily update and warn on checksum failure, which is what `new 
ArtifactRepositoryPolicy()` gave before. One side effect: without the override, 
`getRemoteArtifactRepositories()` falls back to the test harness default, an 
empty list, instead of returning `central`; nothing in the module reads it. 
Only `src/test` is touched, so no public API, config or output cha
 nges.
   
   ### Validation
   
   `mvn -B clean verify` on this head: exit 0, 92 unit tests run, 0 failures, 0 
errors (`spotless` reformatted my builder call to its own style, and that is 
what the diff shows). The existing tests already exercise this stub through 
every `*ProjectStub` subclass, so I did not add a new one; this is a refactor, 
not a behaviour fix. I did not run the build on the unchanged `master` for 
comparison, and I did not run the integration tests (`-Prun-its`). The build 
ran with JDK 23.0.2 and Maven 3.9.9 on macOS.
   
   Closes #793. Part of apache/maven#14157.


-- 
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]

Reply via email to