Upload sub-projects for a specific version to a maven repository

We use continuous delivery operations on a multi module project. Each module is built independently and each version is stored into a centralized JSON file. For each release the JSON file is suffixed by a version number and stored.

My goal is to make a task able to parse the JSON file to get the version for each composant, get them from mavenLocal repository and upload to another maven repo (a remote one).

I am able to parse the JSON file, get the version for each componant but I don’t know how to get the right componants with the right version from mavenLocal and then upload them to the other repository.