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

   The principle is that the DependencyRenderer get the jar file statistics 
ready to render from the JarDataSummary class (which has the contents of the 
jar-data.json file).
   
   The dependencies.getJarDependencyDetails(artifact) call returns the 
JarDataSummary object, instead of getting the JarData object and working the 
needed values from that.
   
   The dependencies.getJarDependencyDetails(artifact) query the cache files 
(jar-data.json) which contain the required totals needed by the 
DependencyRenderer). It only analyzes the jar file data if no cache file is 
found, or if it detects the jar file was modified (the jar-data.json file also 
saves the .jar file size and last modified timestamp). The json file also has a 
version number==1 for future changes.
   
   ITs were are a bit tricky. I had to introduce an execution order so that the 
files are forced to be fully analyzed first (MPIR-625-create-cache). One of the 
dependencies in the test is a snapshot. Also had to simulate the cache 
timestamps to be the same of the downloaded mrm repo time, so the setup.groovy 
file must update the timestamp and file sizes to be the same/different to test 
reading from cache or re-analyzing the jar file again.


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