From 9eab61ede7f7eff23296dd97f41599dbd95fad2b Mon Sep 17 00:00:00 2001 From: Peter Laird Date: Sat, 13 Mar 2021 00:00:46 -0700 Subject: [PATCH] v2.0.0 major repackaging of rule #30 --- .gitignore | 3 + README.md | 41 ++++++---- WORKSPACE | 6 +- examples/helloworld/BUILD | 4 +- examples/helloworld/README.md | 2 +- makerelease.sh | 12 +-- external_deps.bzl => repositories.bzl | 7 +- {tools/springboot => springboot}/BUILD | 0 {tools/springboot => springboot}/README.md | 13 ++- .../check_dupe_classes.py | 0 {tools/springboot => springboot}/empty.txt | 0 springboot/import_bundles/BUILD | 29 +++++++ springboot/import_bundles/README.md | 11 +++ .../springboot => springboot}/springboot.bzl | 16 ++-- .../springboot_pkg.sh | 0 .../testing_springboot.md | 0 .../tests/check_dupe_classes_test.py | 0 .../unwanted_classes.md | 0 .../write_gitinfo_properties.sh | 0 .../write_manifest.sh | 2 +- tools/buildstamp/README.md | 6 +- tools/buildstamp/get_workspace_status | 4 +- tools/formatter/README.md | 2 +- tools/springboot/import_bundles/BUILD | 79 ------------------- tools/springboot/import_bundles/README.md | 17 ---- 25 files changed, 106 insertions(+), 148 deletions(-) rename external_deps.bzl => repositories.bzl (95%) rename {tools/springboot => springboot}/BUILD (100%) rename {tools/springboot => springboot}/README.md (91%) rename {tools/springboot => springboot}/check_dupe_classes.py (100%) rename {tools/springboot => springboot}/empty.txt (100%) create mode 100644 springboot/import_bundles/BUILD create mode 100644 springboot/import_bundles/README.md rename {tools/springboot => springboot}/springboot.bzl (95%) rename {tools/springboot => springboot}/springboot_pkg.sh (100%) rename {tools/springboot => springboot}/testing_springboot.md (100%) rename {tools/springboot => springboot}/tests/check_dupe_classes_test.py (100%) rename {tools/springboot => springboot}/unwanted_classes.md (100%) rename {tools/springboot => springboot}/write_gitinfo_properties.sh (100%) rename {tools/springboot => springboot}/write_manifest.sh (94%) delete mode 100644 tools/springboot/import_bundles/BUILD delete mode 100644 tools/springboot/import_bundles/README.md diff --git a/.gitignore b/.gitignore index 569d5c7..c2a29f5 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ bin # after running the //tools/codecoverage tooling you will be left with this root level folder # it contains your test results, so do not checkin coverage-reports + +# release zips +rules-spring-*.zip diff --git a/README.md b/README.md index e35a4ef..502bbd8 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -## Salesforce Spring Boot Rule for Bazel +## Salesforce Spring Rules for Bazel This repository contains the [Spring Boot](https://spring.io/guides/gs/spring-boot/) rule for the [Bazel](https://bazel.build/) build system. It enables Bazel to build Spring Boot applications and package them as an executable jar file. The executable jar is the best way to deploy your Spring Boot application in production environments. The Salesforce *springboot* rule can be found, along with documentation, in this location: -- [bazel-springboot-rule](tools/springboot): a Bazel extension to build and package Spring Boot applications +- [springboot](springboot): a Bazel extension to build and package Spring Boot applications The *springboot* rule runs on any version of Bazel 1.2.1 or higher. Please do not link to the *master* branch of this rule in your Bazel workspace, use an official release instead: -- [bazel-springboot-rule releases](https://github.com/salesforce/bazel-springboot-rule/releases) +- [rules-spring releases](https://github.com/salesforce/bazel-springboot-rule/releases) ### Support and Ongoing Development @@ -22,35 +22,33 @@ To see what bug fixes and new features are planned, consult the roadmaps located :octocat: Please do us a **huge favor**. If you think this project could be useful for you, now or in the future, please hit the **Star** button at the top. That helps us advocate for more time and resources on this project. Thanks! -### Loading the Rule in your WORKSPACE +### Loading the Spring Rules in your WORKSPACE Before you can use the rule in your BUILD files, you need to add it to your workspace. There are two approaches to doing this. **Reference an official release** This loads a pre-built version of this rule into your workspace during the build. -It may or may not work for you, as it does not allow you to customize it. -On [our roadmap](https://github.com/salesforce/bazel-springboot-rule/projects/2) we have work items to upgrade this rule to use more modern packaging idioms. +This is the recommended approach for most users. ```starlark http_archive( - name = "bazel_springboot_rule", - sha256 = "94b0227d73c10fe7566e1faf12e101a8ea18b57322debe90d4ff3494e017592f", + name = "rules_spring", + sha256 = "7d4f12748df340397559decd8348289a6f85ae32dae344545b6d08ad036a9cfe", urls = [ - "https://github.com/salesforce/bazel-springboot-rule/releases/download/1.1.1/bazel-springboot-rule-1.1.1.zip", + "https://github.com/salesforce/bazel-springboot-rule/releases/download/2.0.0/rules-spring-2.0.0.zip", ], ) ``` **Copy the rule into your workspace (aka vendoring)** -This may be the quickest option. -It allows you to bring in the rule, and make customizations as necessary. +This approach allows you to bring in the rule, and make customizations as necessary. We recommend copying it into location *//tools/springboot* in your workspace but you are free to change this if you like. Once it is copied in, add this to your WORKSPACE: ```starlark local_repository( - name = "bazel_springboot_rule", + name = "rules_spring", path = "tools/springboot", ) ``` @@ -65,7 +63,22 @@ That approach is sufficient if Bazel and your Bazel workspace (i.e. source code) At Salesforce, Bazel is not available in production environments, and so this alternate approach is not viable. -### Are you refreshing your fork for the first time since September 29, 2020? +### Migrations + +#### Are you refreshing your Spring Boot archive/fork for the first time since March X, 2021? + +On that date I merged in the major repackaging of the Spring Boot rule into the *master* branch. +This was to comply with the standardized Bazel rule layout conventions. +When the Spring Boot rule was originally written, the conventions did not exist. +This repackaging makes the rule more modern. + +For rule 1.x users, you will need to do the following: +- All WORKSPACE and BUILD file references to *bazel_springboot_rule* must be changed to *rules_spring* +- All BUILD and .bzl file references to *//tools/springboot* must be changed to *//springboot* + +See [Repackaging work item](https://github.com/salesforce/bazel-springboot-rule/issues/30) for more details. + +#### Are you refreshing your Spring Boot archive/fork for the first time since September 29, 2020? On that date I switched the repo to use *maven_install* style dependencies, instead of the obsolete *maven_jar* ([removed as of Bazel 2.x](https://github.com/bazelbuild/bazel/issues/6799)). I tagged the old code line as 1.0.2. @@ -73,7 +86,7 @@ To restore the old style, please use the following stanza in your WORKSPACE (to ```starlark git_repository( - name = "bazel_springboot_rule", + name = "rules_spring", tag = "1.0.2", remote = "https://github.com/salesforce/bazel-springboot-rule", verbose = False, diff --git a/WORKSPACE b/WORKSPACE index 1a21806..b49041e 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,7 +4,7 @@ # Licensed under the BSD 3-Clause license. # For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause # -workspace(name = "bazel_springboot_rule") +workspace(name = "rules_spring") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") @@ -18,8 +18,8 @@ http_archive( url = "https://github.com/bazelbuild/rules_jvm_external/archive/%s.zip" % RULES_JVM_EXTERNAL_TAG, ) -load("//:external_deps.bzl", "external_maven_jars") -external_maven_jars() +load("//:repositories.bzl", "rules_spring_deps") +rules_spring_deps() load("@maven//:defs.bzl", "pinned_maven_install") pinned_maven_install() diff --git a/examples/helloworld/BUILD b/examples/helloworld/BUILD index ad58935..3bbf70e 100644 --- a/examples/helloworld/BUILD +++ b/examples/helloworld/BUILD @@ -6,7 +6,7 @@ # # load our Spring Boot rule -load("//tools/springboot:springboot.bzl", "springboot") +load("//springboot:springboot.bzl", "springboot") # dependencies from other packages in the workspace lib_deps = [ @@ -16,7 +16,7 @@ lib_deps = [ # create our deps list for Spring Boot springboot_deps = [ - "//tools/springboot/import_bundles:springboot_required_deps", + "//springboot/import_bundles:springboot_required_deps", "@maven//:org_springframework_boot_spring_boot_starter_jetty", "@maven//:org_springframework_boot_spring_boot_starter_web", "@maven//:org_springframework_spring_webmvc", diff --git a/examples/helloworld/README.md b/examples/helloworld/README.md index 5db28c5..d499c40 100644 --- a/examples/helloworld/README.md +++ b/examples/helloworld/README.md @@ -15,4 +15,4 @@ To run: bazel run //examples/helloworld ``` -For full documentation, see the [//tools/springboot](../../tools/springboot) package documentation. +For full documentation, see the [//springboot](../../springboot) package documentation. diff --git a/makerelease.sh b/makerelease.sh index 4a43807..439b383 100755 --- a/makerelease.sh +++ b/makerelease.sh @@ -5,22 +5,22 @@ # For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause # -RELEASE_VERSION=1.1.2 +RELEASE_VERSION=2.0.0 rm -rf bazel-* -TMPDIR=/tmp/bazel-springboot-rule-release +TMPDIR=/tmp/rules-spring-release mkdir $TMPDIR mv tools/python_interpreter/bin $TMPDIR mv tools/python_interpreter/captive_python3 $TMPDIR -rm -rf tools/springboot/tests/__pycache__ -rm -rf tools/springboot/__pycache__ +rm -rf springboot/tests/__pycache__ +rm -rf springboot/__pycache__ -jar -cvf bazel-springboot-rule-${RELEASE_VERSION}.zip * +jar -cvf rules-spring-${RELEASE_VERSION}.zip * mv $TMPDIR/bin tools/python_interpreter mv $TMPDIR/captive_python3 tools/python_interpreter -echo "RELEASE built: bazel-springboot-rule-${RELEASE_VERSION}.zip" +echo "RELEASE built: rules-spring-${RELEASE_VERSION}.zip" echo "Remember to update the http_archive stanza in the top level README.md" diff --git a/external_deps.bzl b/repositories.bzl similarity index 95% rename from external_deps.bzl rename to repositories.bzl index a4fbc2e..5d25bf1 100644 --- a/external_deps.bzl +++ b/repositories.bzl @@ -21,7 +21,7 @@ repositories = [ "https://repo1.maven.org/maven2", ] -def external_maven_jars(): +def rules_spring_deps(): maven_install( artifacts = [ "org.slf4j:jcl-over-slf4j:1.7.26", @@ -79,7 +79,7 @@ def external_maven_jars(): version_conflict_policy = "pinned", strict_visibility = True, generate_compat_repositories = False, - maven_install_json = "@bazel_springboot_rule//:maven_install.json", + maven_install_json = "@rules_spring//:maven_install.json", resolve_timeout = 1800, ) @@ -96,7 +96,6 @@ def external_maven_jars(): version_conflict_policy = "pinned", strict_visibility = True, generate_compat_repositories = False, - maven_install_json = "@bazel_springboot_rule//:spring_boot_starter_jetty_install.json", + maven_install_json = "@rules_spring//:spring_boot_starter_jetty_install.json", resolve_timeout = 1800, ) - diff --git a/tools/springboot/BUILD b/springboot/BUILD similarity index 100% rename from tools/springboot/BUILD rename to springboot/BUILD diff --git a/tools/springboot/README.md b/springboot/README.md similarity index 91% rename from tools/springboot/README.md rename to springboot/README.md index a5b78a2..81a69c5 100644 --- a/tools/springboot/README.md +++ b/springboot/README.md @@ -11,11 +11,11 @@ This is a *BUILD* file code snippet of how to invoke the rule: ```starlark # load our Spring Boot rule -load("//tools/springboot:springboot.bzl", "springboot",) +load("//springboot:springboot.bzl", "springboot",) # create our deps list for Spring Boot, we have some convenience targets for this springboot_deps = [ - "//tools/springboot/import_bundles:springboot_required_deps", + "//springboot/import_bundles:springboot_required_deps", "@maven//:org_springframework_boot_spring_boot_starter_jetty", "@maven//:org_springframework_boot_spring_boot_starter_web", "@maven//:org_springframework_spring_webmvc", @@ -45,7 +45,7 @@ The required *springboot* rule attributes are as follows: ## Build and Run -After installing the rule into your workspace at *tools/springboot*, you are ready to build. +After installing the rule into your workspace, you are ready to build. Add the rule invocation to your Spring Boot application *BUILD* file as shown above. ```bash # Build @@ -71,16 +71,15 @@ The executable jar file is ready to be copied to your production environment. ### Manage External Dependencies in your WORKSPACE -This repository has an example [WORKSPACE](../../external_deps.bzl) file that lists necessary and some optional Spring Boot dependencies. +This repository has an example [WORKSPACE](../../WORKSPACE) file that lists necessary and some optional Spring Boot dependencies. These will come from a Nexus/Artifactory repository, or Maven Central. Because the version of each dependency needs to be explicitly defined, it is left for you to review and add to your *WORKSPACE* file. You will then need to follow an iterative process, adding external dependencies to your *BUILD* and *WORKSPACE* files until it builds and runs. ### Convenience Import Bundles -The [//tools/springboot/import_bundles](import_bundles) package contains some example bundles of imports. -There are bundles for the Spring Boot framework, as well as bundles for the various starters. -The ones provided in this repository are just examples. +The [//springboot/import_bundles](import_bundles) package contains a list of core set of Spring Boot dependencies. +We recommend starting with this list, and then creating your own bundles if it helps. ### Detecting, Excluding and Suppressing Unwanted Classes diff --git a/tools/springboot/check_dupe_classes.py b/springboot/check_dupe_classes.py similarity index 100% rename from tools/springboot/check_dupe_classes.py rename to springboot/check_dupe_classes.py diff --git a/tools/springboot/empty.txt b/springboot/empty.txt similarity index 100% rename from tools/springboot/empty.txt rename to springboot/empty.txt diff --git a/springboot/import_bundles/BUILD b/springboot/import_bundles/BUILD new file mode 100644 index 0000000..cc99ad7 --- /dev/null +++ b/springboot/import_bundles/BUILD @@ -0,0 +1,29 @@ +# +# Copyright (c) 2017-2021, salesforce.com, inc. +# All rights reserved. +# Licensed under the BSD 3-Clause license. +# For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause +# + +# List of standard imports bundles that most/all Spring Boot app will need. + +java_import( + name = "springboot_required_deps", + jars = [], + visibility = ["//visibility:public"], + exports = [ + "@maven//:org_springframework_boot_spring_boot", + "@maven//:org_springframework_boot_spring_boot_actuator", + "@maven//:org_springframework_boot_spring_boot_actuator_autoconfigure", + "@maven//:org_springframework_boot_spring_boot_autoconfigure", + "@maven//:org_springframework_boot_spring_boot_loader", + "@maven//:org_springframework_boot_spring_boot_starter", + "@maven//:org_springframework_boot_spring_boot_starter_logging", + "@maven//:org_springframework_spring_aop", + "@maven//:org_springframework_spring_beans", + "@maven//:org_springframework_spring_context", + "@maven//:org_springframework_spring_core", + "@maven//:org_springframework_spring_expression", + "@maven//:org_springframework_spring_web", + ], +) diff --git a/springboot/import_bundles/README.md b/springboot/import_bundles/README.md new file mode 100644 index 0000000..eac1c7e --- /dev/null +++ b/springboot/import_bundles/README.md @@ -0,0 +1,11 @@ +## Import Bundles for Spring Boot Starters + +This is a scheme for providing convenience bundles of dependencies for each open source Spring Boot starter. +*springboot_required_deps* is a convenience bundle that contains the core list that all Spring Boot apps need. +We used to maintain others, but have since removed all other bundles. + +```starlark +deps = [ + "//springboot/import_bundles:springboot_required_deps", +] +``` diff --git a/tools/springboot/springboot.bzl b/springboot/springboot.bzl similarity index 95% rename from tools/springboot/springboot.bzl rename to springboot/springboot.bzl index 4e52ae0..1343f06 100644 --- a/tools/springboot/springboot.bzl +++ b/springboot/springboot.bzl @@ -315,9 +315,9 @@ def springboot( native.genrule( name = genmanifest_rule, srcs = [":" + dep_aggregator_rule], - cmd = "$(location @bazel_springboot_rule//tools/springboot:write_manifest.sh) " + boot_app_class + " $@ $(SRCS)", + cmd = "$(location @rules_spring//springboot:write_manifest.sh) " + boot_app_class + " $@ $(SRCS)", # message = "SpringBoot rule is writing the MANIFEST.MF...", - tools = ["@bazel_springboot_rule//tools/springboot:write_manifest.sh"], + tools = ["@rules_spring//springboot:write_manifest.sh"], outs = [genmanifest_out], tags = tags, ) @@ -326,8 +326,8 @@ def springboot( gengitinfo_out = "git.properties" native.genrule( name = gengitinfo_rule, - cmd = "$(location @bazel_springboot_rule//tools/springboot:write_gitinfo_properties.sh) $@", - tools = ["@bazel_springboot_rule//tools/springboot:write_gitinfo_properties.sh"], + cmd = "$(location @rules_spring//springboot:write_gitinfo_properties.sh) $@", + tools = ["@rules_spring//springboot:write_gitinfo_properties.sh"], outs = [gengitinfo_out], tags = tags, stamp = 1, @@ -335,7 +335,7 @@ def springboot( # SUBRULE 2C: CLASSPATH INDEX if classpath_index == None: - classpath_index = "@bazel_springboot_rule//tools/springboot:empty.txt" + classpath_index = "@rules_spring//springboot:empty.txt" # see https://github.com/salesforce/bazel-springboot-rule/issues/81 _appjar_locator_rule( @@ -368,11 +368,11 @@ def springboot( classpath_index, ":" + dep_aggregator_rule, ], - cmd = "$(location @bazel_springboot_rule//tools/springboot:springboot_pkg.sh) " + + cmd = "$(location @rules_spring//springboot:springboot_pkg.sh) " + "$(location @bazel_tools//tools/jdk:singlejar) " + boot_app_class + " $(JAVABASE) " + name + " " + str(use_build_dependency_order) + " $@ $(SRCS)", tools = [ - "@bazel_springboot_rule//tools/springboot:springboot_pkg.sh", + "@rules_spring//springboot:springboot_pkg.sh", "@bazel_tools//tools/jdk:singlejar", ], tags = tags, @@ -388,7 +388,7 @@ def springboot( if fail_on_duplicate_classes: _dupeclasses_rule( name = dupecheck_rule, - script = "@bazel_springboot_rule//tools/springboot:check_dupe_classes", + script = "@rules_spring//springboot:check_dupe_classes", springbootjar = genjar_rule, allowlist = duplicate_class_allowlist, fail_on_duplicate_classes = fail_on_duplicate_classes, diff --git a/tools/springboot/springboot_pkg.sh b/springboot/springboot_pkg.sh similarity index 100% rename from tools/springboot/springboot_pkg.sh rename to springboot/springboot_pkg.sh diff --git a/tools/springboot/testing_springboot.md b/springboot/testing_springboot.md similarity index 100% rename from tools/springboot/testing_springboot.md rename to springboot/testing_springboot.md diff --git a/tools/springboot/tests/check_dupe_classes_test.py b/springboot/tests/check_dupe_classes_test.py similarity index 100% rename from tools/springboot/tests/check_dupe_classes_test.py rename to springboot/tests/check_dupe_classes_test.py diff --git a/tools/springboot/unwanted_classes.md b/springboot/unwanted_classes.md similarity index 100% rename from tools/springboot/unwanted_classes.md rename to springboot/unwanted_classes.md diff --git a/tools/springboot/write_gitinfo_properties.sh b/springboot/write_gitinfo_properties.sh similarity index 100% rename from tools/springboot/write_gitinfo_properties.sh rename to springboot/write_gitinfo_properties.sh diff --git a/tools/springboot/write_manifest.sh b/springboot/write_manifest.sh similarity index 94% rename from tools/springboot/write_manifest.sh rename to springboot/write_manifest.sh index c2775ba..3a71fc3 100755 --- a/tools/springboot/write_manifest.sh +++ b/springboot/write_manifest.sh @@ -20,7 +20,7 @@ do done if [[ $FOUND_SPRING_JAR -ne 1 ]]; then - echo "ERROR: //tools/springboot/write_manifest.sh could not find spring-boot jar" + echo "ERROR: //springboot/write_manifest.sh could not find spring-boot jar" exit 1 fi diff --git a/tools/buildstamp/README.md b/tools/buildstamp/README.md index 978e5a1..ca459d0 100644 --- a/tools/buildstamp/README.md +++ b/tools/buildstamp/README.md @@ -56,15 +56,15 @@ The way to signal to Bazel to stamp a particular artifact is to add an attribute stamp = 1 ``` -This is done automatically for you in the [Spring Boot rule](../springboot/springboot.bzl) +This is done automatically for you in the [Spring Boot rule](../../springboot/springboot.bzl) when it generates the *git.properties* file, as seen in this snippet: ```starlark gengitinfo_out = "git.properties" native.genrule( name = gengitinfo_rule, - cmd = "$(location //tools/springboot:write_gitinfo_properties.sh) $@", - tools = ["//tools/springboot:write_gitinfo_properties.sh"], + cmd = "$(location //springboot:write_gitinfo_properties.sh) $@", + tools = ["//springboot:write_gitinfo_properties.sh"], outs = [gengitinfo_out], tags = tags, stamp = 1, diff --git a/tools/buildstamp/get_workspace_status b/tools/buildstamp/get_workspace_status index 4341b41..a5c39f2 100755 --- a/tools/buildstamp/get_workspace_status +++ b/tools/buildstamp/get_workspace_status @@ -20,7 +20,7 @@ # # More information: # Bazel stamping: https://docs.bazel.build/versions/master/user-manual.html#flag--workspace_status_command -# Spring Boot git.properties: //tools/springboot/write_gitinfo_properties.sh +# Spring Boot git.properties: //springboot/write_gitinfo_properties.sh # Spring Boot info actuator endpoint: ttps://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-features.html#production-ready-endpoints # First, make sure the current working directory is the Bazel workspace root. @@ -56,7 +56,7 @@ echo "Full Bazel build stamping enabled. Adding Git properties to stamp. See //t # GIT # ******************************** -# This data is then later consumed by the //tools/springboot rule (perhaps other rules as well) to write +# This data is then later consumed by the //springboot rule (perhaps other rules as well) to write # a git.properties file into the Spring Boot jar, which is then surfaced in the Spring Boot # actuator info endpoint. diff --git a/tools/formatter/README.md b/tools/formatter/README.md index 1787239..e1143e3 100644 --- a/tools/formatter/README.md +++ b/tools/formatter/README.md @@ -4,7 +4,7 @@ This script runs the Bazel buildifier tool on all of our Bazel files (BUILD, \*. Execute it from the root of the repo. ```bash -cd bazel-springboot-rule +cd rules-spring ./tools/formatter/format_bazel_files.sh ``` diff --git a/tools/springboot/import_bundles/BUILD b/tools/springboot/import_bundles/BUILD deleted file mode 100644 index 399663e..0000000 --- a/tools/springboot/import_bundles/BUILD +++ /dev/null @@ -1,79 +0,0 @@ -# -# Copyright (c) 2017-2021, salesforce.com, inc. -# All rights reserved. -# Licensed under the BSD 3-Clause license. -# For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause -# - -# List of standard imports bundles that tend to be used together in Spring Boot. - -# HISTORY -# In the early days, with maven_jar, we needed to explicitly identify all dependencies -# so this package was created to help curate the repetitive lists across many Spring Boot services. -# But now with maven_install, transitives are managed so this isn't as useful. - -# SUPPORT -# We will maintain the springboot_required_deps bundle, but otherwise please stop -# using these targets. - -java_import( - name = "springboot_required_deps", - jars = [], - visibility = ["//visibility:public"], - exports = [ - "@maven//:org_springframework_boot_spring_boot", - "@maven//:org_springframework_boot_spring_boot_actuator", - "@maven//:org_springframework_boot_spring_boot_actuator_autoconfigure", - "@maven//:org_springframework_boot_spring_boot_autoconfigure", - "@maven//:org_springframework_boot_spring_boot_loader", - "@maven//:org_springframework_boot_spring_boot_starter", - "@maven//:org_springframework_boot_spring_boot_starter_logging", - "@maven//:org_springframework_spring_aop", - "@maven//:org_springframework_spring_beans", - "@maven//:org_springframework_spring_context", - "@maven//:org_springframework_spring_core", - "@maven//:org_springframework_spring_expression", - "@maven//:org_springframework_spring_web", - ], -) - -# DEPRECATED - -# deprecated -java_import( - name = "springboot_jetty_starter_deps", - jars = [], - visibility = ["//visibility:public"], - exports = [ - "@maven//:org_springframework_boot_spring_boot_starter_jetty", - ], -) - -# deprecated -java_import( - name = "springboot_web_starter_deps", - jars = [], - visibility = ["//visibility:public"], - exports = [ - "@maven//:org_springframework_boot_spring_boot_starter_web", - "@maven//:org_springframework_spring_webmvc", - ], -) - -# deprecated -java_import( - name = "springboot_logging_deps", - jars = [], - visibility = ["//visibility:public"], - exports = [ - ], -) - -# deprecated -java_import( - name = "springboot_jackson_deps", - jars = [], - visibility = ["//visibility:public"], - exports = [ - ], -) diff --git a/tools/springboot/import_bundles/README.md b/tools/springboot/import_bundles/README.md deleted file mode 100644 index e6d16e6..0000000 --- a/tools/springboot/import_bundles/README.md +++ /dev/null @@ -1,17 +0,0 @@ -## Import Bundles for Spring Boot Starters - -This is a scheme for providing convenience bundles of dependencies for each - open source Spring Boot starter. - -In the early days of Bazel, the way to import a Maven dependency was with *maven_jar*. -With *maven_jar* we needed to explicitly identify all dependencies as it didn't follow transitive relationships. -This import bundles package was created to help curate the repetitive lists of bundles of dependencies across many Spring Boot services. - -But now with *maven_install*, transitives are managed so this isn't as useful. -We will maintain the *springboot_required_deps* bundle, but otherwise please stop using these targets. - -```starlark -deps = [ - "//tools/springboot/import_bundles:springboot_required_deps", -] -```