Build - how to unset "deletion allowed" during a build on a build result
One answer
Nicolas,
I am not aware of an ANT task that does this. You can however use the plain Java client libraries to set the flag. https://rsjazz.wordpress.com/2015/10/28/build-artifacts-publishing-and-automated-build-output-management-using-the-plain-java-client-libraries/ shows an example that works not in the build, but asynchronous. However you could have this in a build as well. The example creates a release, but it is no rocket science to find the API do remove deletion allowed.
You can also create custom ANT tasks for the Java APIs. Either way, you need a custom automation using an API.
Please note, the build automation user who does this must have the permission to do so.