Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions private/outdated.sh

This file was deleted.

25 changes: 9 additions & 16 deletions private/rules/coursier.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,21 @@ sh_binary(
"""

_BUILD_OUTDATED = """
sh_binary(
java_binary(
name = "outdated",
srcs = ["outdated.sh"],
runtime_deps = [
"@rules_jvm_external//private/tools/java/com/github/bazelbuild/rules_jvm_external/maven:outdated_deploy.jar",
],
main_class = "com.github.bazelbuild.rules_jvm_external.maven.Outdated",
data = [
"@rules_jvm_external//private/tools/prebuilt:outdated_deploy.jar",
"outdated.artifacts",
"outdated.repositories",
],
args = [
"$(location @rules_jvm_external//private/tools/prebuilt:outdated_deploy.jar)",
"$(location outdated.artifacts)",
"$(location outdated.repositories)",
"--artifacts-file",
"$(execpath outdated.artifacts)",
"--repositories-file",
"$(execpath outdated.repositories)",
],
visibility = ["//visibility:public"],
)
Expand Down Expand Up @@ -386,16 +389,6 @@ def _add_outdated_files(repository_ctx, artifacts, repositories):
executable = False,
)

repository_ctx.template(
"outdated.sh",
repository_ctx.attr._outdated,
{
"{repository_name}": repository_ctx.name,
"{proxy_opts}": " ".join([_shell_quote(arg) for arg in _get_java_proxy_args(repository_ctx)]),
},
executable = True,
)

def is_repin_required(repository_ctx):
env_var_names = repository_ctx.os.environ.keys()
return "RULES_JVM_EXTERNAL_REPIN" not in env_var_names and "REPIN" not in env_var_names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ public static void main(String[] args) throws IOException {
continue;
}
String[] artifactParts = artifact.split(":");

// If there is no version, then skip this particular coordinate
if (artifactParts.length < 3) {
continue;
}

String groupId = artifactParts[0];
String artifactId = artifactParts[1];
String version = artifactParts[2];
Expand Down
1 change: 0 additions & 1 deletion private/tools/prebuilt/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ exports_files([
"hasher_deploy.jar", # built from //private/tools/java/com/github/bazelbuild/rules_jvm_external:hasher-tool_deploy.jar
"index_jar_deploy.jar", # built from //private/tools/java/com/github/bazelbuild/rules_jvm_external/jar:IndexJar_deploy.jar
"lock_file_converter_deploy.jar", # built from //private/tools/java/com/github/bazelbuild/rules_jvm_external/coursier:LockFileConverter_deploy.jar
"outdated_deploy.jar", # built from //private/tools/java/com/github/bazelbuild/rules_jvm_external/maven:outdated_deploy.jar
])
Binary file removed private/tools/prebuilt/outdated_deploy.jar
Binary file not shown.