wikipedia

Support Wikipedia

Monday, October 22, 2012

post-download-artifact or post-retrieve-artifact trigger?

Are you having a problem with ivy post-download-artifact trigger? Is the ant call target not firing for you? Then read on.

Here is a sample post-download-artifact trigger for handling a zip artifact.
<triggers>
  <ant -call prefix="dep" target="unzip"          
event="post-download-artifact" filter="type=zip"/>
  </ant>
</triggers> 


Maybe the post-download-artifact event is not firing because the artifact is being fetched from the cache and not getting downloaded from a repository. Well, in that case, post-retrieve-artifact is the solution for you. post-retrieve-artifact will fire after getting the artifact either from a download or from the local cache. Problem solved.

Now does it make post-download-artifact redundant? Yes of course! So you better replace all the post-download-artifact ivy triggers in ivysettings file to post-retrieve-artifact triggers. That will take care of the issue.

This was discovered by my brilliant co-worker Mike. You can browse his blog here.

No comments:

Post a Comment