How to specify repository where snapshots have different URL

I have previously built a special version of the redline-rpm jar and relied on deploying it to mavenLocal(). This has a SNAPSHOT version. When other projects want to fetch this dependency it is found just fine in mavenLocal(). But now I want to deploy same to internal nexus. There are different URLs in the Internal nexus for snapshots and non-snapshot releases. How do I specify this repository so that both snapshots and non-snapshot URLs are scanned?

I would create a virtual repository in Nexus which aggregates the snapshot and release repositories then point my build to this virtual repo.

Sounds like a nice idea but I have no idea how to do it, and I’m guessing it’s not allowed in my corporate nexus. Can you direct me at some documentation?

Actually the correct wording is “group repository” (virtual repository is the Artifactory wording).

Please check this documentation chapter: 6.3. Managing Repository Groups

Your Nexus admin will have to create a group repository and add your snapshot and release repositories to it. In your build, you just point to the group repository’s url