Inspired by https://gist.github.com/siepkes/00f0c410933271b4f4e0d5eab18d7469 and https://gist.github.com/ChangdongLi/f354b36ed5f1b92bbb333b811860e0e3
Fill in the values at the beginning of the script. In my case, I'm using an enterprise artifactory so I'm pointing out on remote repository and use a mirror for central dependencies. I also have added a small behavior in the script, it checks for the availability of the dependency before pushing it to the remote repository. For my usecase (generate report that do aggregations and pure printing) it's working, adapt if you need specific functions.
I had issues with the first gist linked, as it was importing too much transitive dependencies. It has broken my slf4j configuration. For the second one some dependencies seemed irrelevant (the birt.runtime specifically).