Skip to content

Remove BOM_SKIP_ARTIFACT_IDS - #2338

Merged
suztomo merged 11 commits into
GoogleCloudPlatform:masterfrom
suztomo:fix_artifact_exclusions
May 15, 2023
Merged

suztomo merged 11 commits into
GoogleCloudPlatform:masterfrom
suztomo:fix_artifact_exclusions

Conversation

@suztomo

@suztomo suztomo commented May 11, 2023 •

Copy link
Copy Markdown
Contributor

The BOM_SKIP_ARTIFACT_IDS has been hiding the google-cloud-logging-logback artifact from appearing in the release note. https://github.com/googleapis/java-cloud-bom/releases/tag/v26.14.0

@suztomo suztomo added the kokoro:run force run kokoro label May 11, 2023
@cloud-tools-for-java-team cloud-tools-for-java-team removed the kokoro:run force run kokoro label May 11, 2023
@suztomo

suztomo commented May 11, 2023

Copy link
Copy Markdown
Contributor Author

kokoro-windows failed:

C:\tmpfs\src\github\cloud-opensource-java>call mvnw.cmd -V -B -ntp clean install javadoc:jar 

Error: JAVA_HOME is set to an invalid directory. 
JAVA_HOME = "c:\program files\java\jdk1.8.0_152" 
Please set the JAVA_HOME variable in your environment to match the 
location of your Java installation. 

@suztomo suztomo added the kokoro:run force run kokoro label May 11, 2023
@cloud-tools-for-java-team cloud-tools-for-java-team removed the kokoro:run force run kokoro label May 11, 2023
@suztomo suztomo added the kokoro:run force run kokoro label May 11, 2023
@cloud-tools-for-java-team cloud-tools-for-java-team removed the kokoro:run force run kokoro label May 11, 2023
@suztomo suztomo added the kokoro:run force run kokoro label May 12, 2023
Comment on lines -155 to -158
// TODO remove this hack once we get these out of google-cloud-java's BOM
if (BOM_SKIP_ARTIFACT_IDS.contains(artifact.getArtifactId())) {
return true;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the main change.

@cloud-tools-for-java-team cloud-tools-for-java-team removed the kokoro:run force run kokoro label May 12, 2023
@suztomo

suztomo commented May 13, 2023

Copy link
Copy Markdown
Contributor Author

Kokoro-macos passed

@suztomo

suztomo commented May 15, 2023

Copy link
Copy Markdown
Contributor Author

"Build with Sonar" is working in the master branch.
https://github.com/GoogleCloudPlatform/cloud-opensource-java/actions/runs/4978807848/jobs/8909590064
Why is it not working in this pull request?

Comment thread kokoro/continuous.bat
@echo on

set JAVA_HOME=c:\program files\java\jdk1.8.0_152
set JAVA_HOME=c:\program files\java\jdk1.8.0_211

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

_152 was not owrking any more.

Comment on lines -343 to +351
String actual = new String(Files.readAllBytes(output));
String actual = new String(Files.readAllBytes(output)).replaceAll("\\R", "\n");

String expected =
new String(
Files.readAllBytes(
absolutePathOfResource(
"exclusion-sample-rules/expected-exclusion-output-file.xml")),
StandardCharsets.UTF_8);
Files.readAllBytes(
absolutePathOfResource(
"exclusion-sample-rules/expected-exclusion-output-file.xml")),
StandardCharsets.UTF_8)
.replaceAll("\\R", "\n");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Memo: In the new Windows environment, which changed jdk1.8.0_152 to jdk1.8.0_211, the return character was different. This change ignores the difference.

Comment on lines -472 to +473
assertThat(dependencyTreeParagraph).hasSize(38391);
assertThat(dependencyTreeParagraph).hasSize(39649);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The assertion count changes because now the BOM includes a bit more artifacts.

@suztomo

suztomo commented May 15, 2023

Copy link
Copy Markdown
Contributor Author

SonarCloud Analysis / Build with Sonar (pull_request)

Maybe it's not working on pull requests. If this fails on master branch after merge, I'll troubleshoot.

@suztomo
suztomo merged commit d9c56b0 into GoogleCloudPlatform:master May 15, 2023
@suztomo
suztomo deleted the fix_artifact_exclusions branch May 15, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants