Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish ivy artifacts to multiple resolvers at once

Tags:

ant

ivy

Our main problem is this: We have two ivy repositories and we want them to be mirrors of each other. So anytime we publish an artifact, we want the artifacts to go to both repositories. We previously only had one repository, so we have many existing projects that already publish to that one repository. We don't want to have to go into those many projects and add a second publish target, so we are trying to see if we can accomplish this though the ivy settings.

So I'm trying to find out if it is possible to make Ivy publish artifacts to multiple repositories at the same time. My best guess was to use a chain resolver to publish to, but ivy seems to only choose the first resolver in the chain and then stops. So does anyone know how we can accomplish this without calling publish twice?

like image 926
Andrew Serff Avatar asked Nov 13 '22 18:11

Andrew Serff


1 Answers

The doc says following about chain-resolvers:

Handle publish  delegates to first sub resolver in chain

The dual-resolver is not up to the task, too.

So it won't be possible to use a chain for multiple publishing. Which I expected to work, too.

Therefore you have to call the <publish /> task twice. Once for each destination.

Or maybe you need a different mirroring approach, that does not involve ivy .

like image 87
oers Avatar answered Feb 23 '23 13:02

oers