diff --git a/synthtool/gcp/templates/java_library/README.md b/synthtool/gcp/templates/java_library/README.md index b51889433..e849a9714 100644 --- a/synthtool/gcp/templates/java_library/README.md +++ b/synthtool/gcp/templates/java_library/README.md @@ -34,11 +34,35 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: {{ metadata['snippets'][metadata['repo']['api_shortname'] + '_install_with_bom'] }} ``` -If you are using Maven without BOM, add this to your dependencies: +If you are using Maven without the BOM, add this to your dependencies: +{% elif monorepo %} +If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file: + +```xml + + + + com.google.cloud + libraries-bom + {{ metadata['latest_bom_version'] }} + pom + import + + + + + + + {{ group_id }} + {{ artifact_id }} + +``` + +If you are using Maven without the BOM, add this to your dependencies: {% else %} If you are using Maven, add this to your pom.xml file: - {% endif %} + ```xml {% if 'snippets' in metadata and metadata['snippets'][metadata['repo']['api_shortname'] + '_install_without_bom'] -%} @@ -248,7 +272,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [developer-console]: https://console.developers.google.com/ [create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects [cloud-cli]: https://cloud.google.com/cli -[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting +[troubleshooting]: https://github.com/googleapis/google-cloud-java/blob/main/TROUBLESHOOTING.md [contributing]: https://github.com/{{metadata['repo']['repo']}}/blob/main/CONTRIBUTING.md [code-of-conduct]: https://github.com/{{metadata['repo']['repo']}}/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct [license]: https://github.com/{{metadata['repo']['repo']}}/blob/main/LICENSE diff --git a/synthtool/languages/java.py b/synthtool/languages/java.py index 12cfe24aa..7eaee015c 100644 --- a/synthtool/languages/java.py +++ b/synthtool/languages/java.py @@ -490,6 +490,7 @@ def common_templates( # Generate flat to tell this repository is a split repo that have migrated # to monorepo. The owlbot.py in the monorepo sets monorepo=True. monorepo = kwargs.get("monorepo", False) + kwargs["monorepo"] = monorepo split_repo = not monorepo repo_metadata = metadata["repo"] repo_short = repo_metadata["repo_short"]