Tries to determine the URL to the pom.xml.

@param artifactId the artifact id
@param version the version
@param artifactUrl the artifact URL
@return the string representation of the URL
491034
public static String derivePomUrl(String artifactId, String version, String artifactUrl) {
        return artifactUrl.substring(0, artifactUrl.lastIndexOf('/')) + '/' + artifactId + '-' + version + ".pom";
    }
944095
public static String getRepositorySubpath(MavenCoordinates artifact) {
		StringBuffer buf = new StringBuffer();
		String[] groupDirs = artifact.getGroupId().split("\\.");
		for (String dir : groupDirs) {
			buf.append(dir).append("/");
		}
		buf.append(artifact.getArtifactId()).append("/").append(artifact.getVersion());
		return buf.toString();
	}
1087865
public static MavenArtifactProvisionOption mavenBundle(final String groupId,
        final String artifactId) {
        return mavenBundle().groupId(groupId).artifactId(artifactId);
    }
355269
protected static function getUrlFileDependencyVersion(AssetTypeInterface $assetType, $url, $version)
    {
        if ('#' !== $version) {
            return substr($version, 1);
        }

        if (preg_match('/(\d+)(\.\d+)(\.\d+)?(\.\d+)?/', $url, $match)) {
            return $assetType->getVersionConverter()->convertVersion($match[0]);
        }

        return '0.0.0.0';
    }
534686
def versioned_url(self):
        ''''''
        if self.url is None:
            return None
        return self.url.format(version=self.version)
249248
public Artifact createArtifact(final String groupId,
            final String artifactId, final String version, final String type) {
        return createArtifact(groupId, artifactId, version, null, type);
    }
265560
public static ManifestVersion of(final URL url)
	{
		final ManifestVersion version = new ManifestVersion();
		if (url != null)
		{
			URLConnection urlConnection = null;
			try
			{
				urlConnection = url.openConnection();
				version.setLastModified(LocalDateTime.ofInstant(
					Instant.ofEpochMilli(urlConnection.getLastModified()), ZoneId.systemDefault()));
				version.setManifest(new Manifest(urlConnection.getInputStream()));
				version
					.setTitle(version.getManifestAttribute(Attributes.Name.IMPLEMENTATION_TITLE));
				version.setVersion(
					version.getManifestAttribute(Attributes.Name.IMPLEMENTATION_VERSION));
			}
			catch (final IOException e)
			{
				throw new RuntimeException("Error while try to load manifest file from " + url, e);
			}
		}
		return version;
	}
42110
public static RepositoryId extractRepositoryFromScmUrl(String url) {
		if (StringUtils.isEmpty(url))
			return null;
		int ghIndex = url.indexOf(HOST_DEFAULT);
		if (ghIndex == -1 || ghIndex + 1 >= url.length())
			return null;
		if (!url.endsWith(SUFFIX_GIT))
			return null;
		url = url.substring(ghIndex + HOST_DEFAULT.length() + 1, url.length()
				- SUFFIX_GIT.length());
		return RepositoryId.createFromId(url);
	}
450382
public static MozuUrl deleteOrderDraftUrl(String orderId, String version)
	{
		UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/draft?version={version}");
		formatter.formatUrl("orderId", orderId);
		formatter.formatUrl("version", version);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
	}
1338146
protected String getArtifactId(String artifactId) {
        return this.artifactId == null || this.artifactId.length() == 0
                ? artifactId
                : this.artifactId;
    }
254227
public static String getFileName(MavenCoordinates artifact, Constants.ArtifactType type) {
		return artifact.getArtifactId() + "-" + artifact.getVersion() + type.getMavenFileExtension();
	}
51119
public static String getZooBaseUrl(String urlPrefix, String app, String env, String version) {

        StringBuffer sb = new StringBuffer();
        sb.append(urlPrefix);

        sb.append(Constants.SEP_STRING);
        sb.append(app);

        sb.append("_");
        sb.append(version);

        sb.append("_");
        sb.append(env);

        return sb.toString();
    }
1270511
private Path getHost( String id, long version ) {
        Path ret = root;
        for( String part : id.split( "-" ) ) {
            ret = ret.resolve( part );
        }

        return ret.resolve( "" + version );
    }
1125894
def get_version_url(self, version):
        
        for each_version in self.other_versions():
            if version == each_version['version'] and 'location' in each_version:
                return each_version.get('location')
        raise VersionNotInHive(version)
344225
public boolean match( Artifact artifact )
        throws InvalidVersionSpecificationException
    {
        for ( Pattern pattern : patterns )
        {
            if ( pattern.match( artifact ) )
            {
                for ( Pattern ignorePattern : ignorePatterns )
                {
                    if ( ignorePattern.match( artifact ) )
                    {
                        return false;
                    }
                }
                return true;
            }
        }
        return false;
    }
222764
private File getArtifactFile(MavenBuild build, MavenArtifact mavenArtifact) throws IOException {
        String fileName = mavenArtifact.fileName;
        if (isArchiveJenkinsVersion) {
            fileName = mavenArtifact.canonicalName;
        }
        File file = new File(new File(new File(new File(build.getArtifactsDir(), mavenArtifact.groupId),
                mavenArtifact.artifactId), mavenArtifact.version), fileName);
        if (!file.exists()) {
            throw new FileNotFoundException("Archived artifact is missing: " + file + " " + getAdditionalMessage());
        }
        return file;
    }
1196973
private void downloadExtension(Artifact versionedArtifact, File toLocation)
  {
    final CollectRequest collectRequest = new CollectRequest();
    collectRequest.setRoot(new Dependency(versionedArtifact, JavaScopes.RUNTIME));
    final DependencyRequest dependencyRequest = new DependencyRequest(
        collectRequest,
        DependencyFilterUtils.andFilter(
            DependencyFilterUtils.classpathFilter(JavaScopes.RUNTIME),
            new DependencyFilter()
            {
              @Override
              public boolean accept(DependencyNode node, List<DependencyNode> parents)
              {
                String scope = node.getDependency().getScope();
                if (scope != null) {
                  scope = StringUtils.toLowerCase(scope);
                  if ("provided".equals(scope)) {
                    return false;
                  }
                  if ("test".equals(scope)) {
                    return false;
                  }
                  if ("system".equals(scope)) {
                    return false;
                  }
                }
                if (accept(node.getArtifact())) {
                  return false;
                }

                for (DependencyNode parent : parents) {
                  if (accept(parent.getArtifact())) {
                    return false;
                  }
                }

                return true;
              }

              private boolean accept(final Artifact artifact)
              {
                return exclusions.contains(artifact.getGroupId());
              }
            }
        )
    );

    try {
      log.info("Start downloading extension [%s]", versionedArtifact);
      final List<Artifact> artifacts = aether.resolveArtifacts(dependencyRequest);

      for (Artifact artifact : artifacts) {
        if (!exclusions.contains(artifact.getGroupId())) {
          log.info("Adding file [%s] at [%s]", artifact.getFile().getName(), toLocation.getAbsolutePath());
          FileUtils.copyFileToDirectory(artifact.getFile(), toLocation);
        } else {
          log.debug("Skipped Artifact[%s]", artifact);
        }
      }
    }
    catch (Exception e) {
      log.error(e, "Unable to resolve artifacts for [%s].", dependencyRequest);
      throw new RuntimeException(e);
    }
    log.info("Finish downloading extension [%s]", versionedArtifact);
  }