slachiewicz commented on PR #627:
URL: 
https://github.com/apache/maven-project-info-reports-plugin/pull/627#issuecomment-5743492563

   Please follow Hervé's advice above: the local repository is not the place 
for this cache, and the PR needs to say what problem it solves and at what 
cost, not only that it is faster. I'd still like to keep the optimisation, 
since re-analysing 600+ jars on every `site` run is a real cost and the size + 
mtime check is a sound invalidation rule. What needs to change:
   
   - **Cache location.** Don't write into `<localRepo>/.cache`; Resolver owns 
that directory and its layout can change under us. Default to 
`${project.build.directory}/mpir-cache` and expose it as a mojo parameter 
(`dependencyDetailsCacheDirectory`, `@since 3.9.1`) so users who want it to 
survive `clean` can point it at a stable path. An empty value should mean "no 
cache", which keeps today's behaviour reachable.
   - **No Jackson.** This plugin has no JSON dependency and one flat record 
doesn't justify adding `jackson-databind` plus its transitive tree. A 
`java.util.Properties` file per artifact carries the same fields.
   - **Check `v` on read.** `JarDataSummary.VERSION` is written but never 
compared when loading; a mismatch should fall through to re-analysis.
   - **Keep the public API.** `Dependencies` is public in a released artifact. 
Keep the three-argument constructor (deprecated, delegating with no cache) and 
keep `getJarDependencyDetails(Artifact)` returning `JarData`; add the summary 
as a new method rather than changing the return type in a patch release.
   
   The ITs are good and can stay apart from the directory. `pom.xml` conflicts 
with the `maven-archiver` dependency that landed on master; CI has not run on 
this branch yet, so the rebase push will be its first run.
   


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