slachiewicz opened a new pull request, #182:
URL: https://github.com/apache/maven-doap-plugin/pull/182

   Stacked on #181 — removes deprecated-API compiler warnings from `DoapMojo`, 
split into two commits:
   
   1. **plexus `ReaderFactory`/`WriterFactory` and the dead blacklist check.** 
`ReaderFactory.newXmlReader(File)`/`WriterFactory.newXmlWriter(File)` are thin 
deprecated wrappers around `XmlStreamReader`/`XmlStreamWriter` (both already on 
the classpath via `plexus-xml`) — calling the constructors directly is a 
drop-in swap. `ArtifactRepository.isBlacklisted()` is deprecated and, per 
`javap` on maven-core 3.9.16's two runtime implementations, hardcoded to return 
`false`, so the check in `writeReleases()` never fired; removed rather than 
replaced.
   
   2. **The deprecated `ArtifactFactory` component.** Its 
`createArtifact`/`createArtifactWithClassifier`/`createProjectArtifact` methods 
are thin wrappers that resolve an `ArtifactHandler` and call the constructor 
`DefaultArtifact` (not itself deprecated). None of the three call sites in this 
mojo ever read the built artifact's scope, so the wrapper's scope-inference 
quirks don't matter here. Both `@Inject ArtifactFactory` fields collapse into 
one `ArtifactHandlerManager` field.
   
   `org.apache.maven.artifact.repository.ArtifactRepository` stays: 
`ProjectBuildingRequest.setLocalRepository`/`setRemoteRepositories` (maven-core 
3.9.16) have no aether-native overload, so 
`localRepository`/`remoteRepositories` and everything that iterates them are 
pinned to the deprecated type by maven-core's own API surface, not by anything 
fixable in this plugin. 10 of the original 13 deprecation warnings are 
eliminated; the remaining 7 are all `ArtifactRepository` and, on the evidence 
above, aren't currently removable.
   
   Verified with `mvn compile` (warning-by-warning diff), `mvn test` (13/13, 
including the two tests that exercise the rewritten `getMavenProject` 
artifact-resolution path), and `mvn spotless:check`. Not run against 
`-Prun-its` — this plugin has no such profile; noting it because 
`DefaultArtifact`/`ArtifactHandlerManager` being exported to plugin realms was 
verified by checking maven-core's package export rules, not by an 
integration-test run.
   
   *This change was created with AI assistance.*
   


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