I want to outline, what we do.
We have to cope with an ivy custom layout and artefacts which are put into it. We need to find all available versions in a certain directory. Since we can’t properly use the search api because GAV search is only supported for maven artifacts and not for custom ivy layouts, we have implemented an mechanism to fetch all assets using pagination from the nexus 3 api. Unfortunately, when run, this takes too much of time because the selection of which assets have to be looked for, is not reducable. That is, you seem to have to consume all artefacts using pagination, which is already taking too much time.
Our general goal is to collect all versions in a certain group directory and prepare them to get into a selection box in jenkins on a manual startup.
I’m thinking of the following procedures:
a) Using a script to prepare the collection directly on the server? (Is it faster? How can I find about the API that can be used within such a script?)
b) Writing some kind of “plugin” to perform the task. (Is it possible at all, how to get into it?)
c) Possible extension of the assets api to support server side file system based reduction of results? Or extending search api to custom ivy layouts?
d) Possibly the most simple: Support custom ivy layout by defining it in the nexus administration? (May be I missed a switch…)
I’m happy for all your suggestions.
If nothing works, possibly we have to run some scheduled tooling which performs the long running pagination fetch and saves the results, so our jenkins pipeline can consume it from there. (We would avoid such an overhead.)
Thanks,
Fred