Riduidel / aadarchi

A maven archetype to generate easily projects allowing architecture description using a mix of C4, agile architecture, Asciidoc and PlantUML
https://riduidel.github.io/aadarchi/
Apache License 2.0
39 stars 12 forks source link

Dynamically fetch the maven popular artifacts #390

Closed Riduidel closed 9 months ago

Riduidel commented 9 months ago

Currently, the list of popular artifacts are downloaded at build time. This is very good in terms of offline experience, but quite poor regarding evolutivity of solution. It would be better to use the local file as a default value, overwritten by a remote version obtained at build start from aadarchi-technology-detector (and it's quite easy to do using commons-vfs).

So, in MvnRepositoryArtifactsProducer replace the reading of the mvnrepository.json file from the classpath by a read from the cache folder, where the cache folder is populated by default using the CLASSPATH version, but can be superseeded by a fetch from the github repository.

HINT: Commons-VFS provides a FileObject#copyFrom(...) method allowing easy copy of a file