Java does this pretty well, at least if you use Gradle, I think. You specify the location of the repository in the
repositories { ... }
block and then specify (with maven naming scheme) dependencies { compile "group:name:version" }
where group might be something like org.apache, name might be apache-commons and version might be 2.5.