Skip to content

Use libraries-bom for snippets - part 2 #1781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 5, 2019

Conversation

kolea2
Copy link
Contributor

@kolea2 kolea2 commented Dec 3, 2019

Towards #1761

@kolea2 kolea2 requested a review from a team December 3, 2019 18:33
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 3, 2019
<!-- [END dependencies] -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- [START dependencies] -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are intentional - the snippet is showing the following:

<dependencyManagement>
 // bom stuff here
</dependencyManagement>

<dependencies>
  <dependency>
    // included dependency
  </dependency>

  // excluded dependencies 

</dependencies>

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's using the same tag name as above in the same file, does that work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kurtisvg can you confirm this is ok to do?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - there are two ways to have "multi-part" snippets. You can use [START_EXCLUDE]/[END_EXCLUDE] or you can just end the tag and start it in the correct place (see http://go/code-snippets-201#including-code-from-multiple-sections-of-a-file)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat, did not know that!

</dependencies>
<!-- [END dependencies] -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

@@ -59,8 +69,9 @@
<version>4.13-beta-3</version>
<scope>test</scope>
</dependency>
<!-- [START fs-maven] -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these and check the rest of your changes for these weird tags, looks like a merge error.

@kolea2
Copy link
Contributor Author

kolea2 commented Dec 5, 2019

@kurtisvg @dzlier-gcp I think all comments are addressed, mind taking another look?

@kolea2 kolea2 merged commit 27346e3 into GoogleCloudPlatform:master Dec 5, 2019
@kolea2 kolea2 deleted the libraries-bom-2 branch December 5, 2019 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants