Short: Given (groupId, artifactId, version, repository URL) can I programmatically have Maven resolve the artifact URL?
Long: Given (groupId, artifactId, version, repository URL), one can download a Maven artifact. Usually the URL to the artifact looks like:
scheme://{repository}/{groupId}/{artifactId}/{version}/{artifactId}-{version}.jar
For (org.apache.maven, maven-core, 3.0.0, http://repo.maven.org/maven2), the artifact URL resolves to:
http://repo.maven.org/maven2/org/apache/maven/maven-core/3.0.0/maven-core-3.0.0.jar
Using the inferred pattern above, I can use string concatenations to produce the artifact URL for any given (groupId, artifactId, version, repository URL). However, I do not want to rely on this inferred pattern since it is subject to change in future versions of Maven.
Can I programmatically have Maven resolve the artifact URL for me given (groupId, artifactId, version, repository URL)?