class ArtifactUtil {

	public static Path download(Path directory, String gav) throws IOException {
		checkNotNull(directory);
		checkNotNull(gav);

		var coordinate = ParsedCoordinate.fromCoordinate(gav);
		String url = MAVEN_HOST + "/maven2/" // Base URL
				+ coordinate.groupId.replaceAll("\\.", "/") + "/"// Group name
				+ coordinate.artifactId + "/" // Artifact name
				+ coordinate.version + "/" // Artifact version
				+ coordinate.filename; // Artifact filename
		log.debug("Downloading artifact: {}", url);

		Path output = directory.resolve(coordinate.filename);
		NetUtil.download(url, output.toFile());
		return output;
	}

	private  ArtifactUtil();

}