Skip to content

Instantly share code, notes, and snippets.

@ruseel
Last active December 21, 2021 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ruseel/e7bebdfd8f87adb140fbbe9a7f559ea6 to your computer and use it in GitHub Desktop.
Save ruseel/e7bebdfd8f87adb140fbbe9a7f559ea6 to your computer and use it in GitHub Desktop.
varticle/bazel-distribution deploy_maven example
load('@vaticle_bazel_distribution//maven:rules.bzl', "assemble_maven", "deploy_maven")
java_library(
name = "some_lib",
resources = glob(["src/test/resources/**/*"]),
tags = ["maven_coordinates=group_id:artifact:{pom_version}"],
)
assemble_maven(
name = "assemble",
target="some_lib",
version_file = ":version.txt",
workspace_refs = ":workspace_refs.json",
)
# can be used with `github maven packages`
# env var 'DEPLOY_MAVEN_USERNAME', 'DEPLOY_MAVEN_PASSWORD' is needed.
#
# bazel run //:deploy (release|snapshot)
deploy_maven(
name = "deploy",
target = ":assemble",
release = "https://maven.pkg.github.com/organization_id/project_id",
snapshot = "https://maven.pkg.github.com/organization_id/project_id",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment