How to skip an Ivy post without error?

I would like to skip publishing an artifact if it already exists in the repository, but as far as I understand from the documentation, this is not a way to do this. There is an attribute overwrite, but if set to false, which will result in publication failure if the artifact exists. I definitely don't want to rewrite the artifact.

I examined the use of <ivy:info>and <ivy:findrevision>to see if an artifact exists and set a property that I can use for my publishing purpose (for example, as an attribute unless), but none of these tasks allows me to specify a repository for verification.

I would prefer not to use an external taskdef, for example, antcontrib try / catch tasks.

Does anyone have any other suggestions?

+3
source share
2 answers

Info and findrevision allow the settingsRef attribute. Thus, you can use an additional settings file that only refers to the recognizer you need (via ivy: settings and ivy: configure) and use these Ref parameters in your task.

0
source

Why would you run the publish task if you are not going to save what you created?

I use the buildnumber task to ensure that my version number will automatically increase depending on what was previously published.

0
source

All Articles