Get latest build artifact from nexus
<p>i'm using Jenkins and nexus . after release my artifact i store that in nexus artifact repository, and i deploy that artifact using Jenkins while building. now my requirement is change deployment life cycle. i want store artifact to the nexus repository after build from maven(this part already done). than i want to get latest release artifact from nexus repository and deploy that artifact.can i do this using Jenkins ? if not what is the best way.</p>

<p>Current i do,</p>

<ul>
<li>build using Jenkins</li>
<li>store build artifact to the nexus repository.</li>
<li>deploy artifact.</li>
</ul>

<p>what i want ,</p>

<ul>
<li>build using Jenkins.</li>
<li>store build artifact to the nexus repository.</li>
<li>get latest artifact from nexus repository.</li>
<li>deploy latest artifact (fetched previous step). </li>
</ul>