We are using maven. I want to set up infrastructure, so that automatically built artifacts would go to Nexus repository. And then they could be used by developers.
I
If this is a Jenkins question rather than a Maven question, I'd recommend using the inbuilt Jenkins "Deploy Artifacts to Maven repository" Post build Action for most cases.
Advantages in my opinion: