Once you have completed the creation of your script, you need to publish it to the repository manager for execution. This is done by REST API invocations against the endpoint:
This endpoint accepts JSON-formatted payloads with your script as the
Example JSON formatted file
maven.json with a simple repository creation script:
The JSON file
maven.json located in the current directory can be published to the repository manager with an HTTP POST like:
A list of scripts stored on the repository manager can be accessed with:
The same call with a script name appended returns the actual script content.
A script can be executed by sending a POST to the run method of the specific script.
A successful execution should result in a
HTTP/1.1 200 OK.
Scripts can be removed with a HTTP DELETE operation to the specific script:
Scripts can receive run-time parameters via the REST API:
and receive them as arguments that have to be parsed by the script as desired:
Interaction with the REST API for scripts can be done with any scripting language capable of HTTP calls as mentioned above. In the following section you can find some further detailed examples.