Skip to content

Commit 06b6ee5

Browse files
authored
Use PackageInfo ArtifactName instead of Name when fetching Namespaces (Azure#44772)
1 parent 92c3944 commit 06b6ee5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

eng/scripts/Language-Settings.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ function Get-java-DocsMsDevLanguageSpecificPackageInfo($packageInfo, $packageSou
367367
if ($packageInfo.DevVersion) {
368368
$version = $packageInfo.DevVersion
369369
}
370-
$namespaces = Fetch-Namespaces-From-Javadoc $packageInfo.Name $packageInfo.Group $version
370+
$namespaces = Fetch-Namespaces-From-Javadoc $packageInfo.ArtifactName $packageInfo.Group $version
371371
# If there are namespaces found from the javadoc.jar then add them to the packageInfo which
372372
# will later update the metadata json file in the docs repository. If there aren't any namespaces
373373
# then don't add the namespaces member with an empty list. The reason being is that the

eng/scripts/Save-Package-Namespaces-Property.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,20 +70,20 @@ foreach($packageInfoFile in $packageInfoFiles) {
7070
# if the library's jar file exists. If the jar doesn't exist then skip this library.
7171
# From the $packageInfo piece together the path to the javadoc jar file
7272
# BEGIN-GreedyPackageInfoSkip
73-
$jarFile = Join-Path $ArtifactStagingDirectory $packageInfo.Group $packageInfo.Name "$($packageInfo.Name)-$($version).jar"
73+
$jarFile = Join-Path $ArtifactStagingDirectory $packageInfo.Group $packageInfo.ArtifactName "$($packageInfo.ArtifactName)-$($version).jar"
7474
if (!(Test-Path $jarFile -PathType Leaf)) {
7575
Write-Host "Jar $jarFile doesn't exist, skipping..."
7676
continue
7777
}
7878
# END-GreedyPackageInfoSkip
7979

80-
$javadocJar = Join-Path $ArtifactStagingDirectory $packageInfo.Group $packageInfo.Name "$($packageInfo.Name)-$($version)-javadoc.jar"
80+
$javadocJar = Join-Path $ArtifactStagingDirectory $packageInfo.Group $packageInfo.ArtifactName "$($packageInfo.ArtifactName)-$($version)-javadoc.jar"
8181
if (!(Test-Path $javadocJar -PathType Leaf)) {
8282
LogError "Javadoc Jar file, $javadocJar, was not found. Please ensure that a Javadoc jar is being created for the library."
8383
$foundError = $true
8484
continue
8585
}
86-
$namespaces = Fetch-Namespaces-From-Javadoc $packageInfo.Name $packageInfo.Group $version $javadocJar
86+
$namespaces = Fetch-Namespaces-From-Javadoc $packageInfo.ArtifactName $packageInfo.Group $version $javadocJar
8787
if ($namespaces.Count -gt 0) {
8888
Write-Host "Adding/Updating Namespaces property with the following namespaces:"
8989
$namespaces | Write-Host
@@ -102,7 +102,7 @@ foreach($packageInfoFile in $packageInfoFiles) {
102102
-Path $packageInfoFile `
103103
-Value $packageInfoJson
104104
} else {
105-
LogError "Unable to determine namespaces for $($packageInfo.Group):$($packageInfo.Name). Please ensure that skipPublishDocMs isn't incorrectly set to true or that the library isn't producing an empty java doc jar."
105+
LogError "Unable to determine namespaces for $($packageInfo.Group):$($packageInfo.ArtifactName). Please ensure that skipPublishDocMs isn't incorrectly set to true or that the library isn't producing an empty java doc jar."
106106
$foundError = $true
107107
}
108108
}

0 commit comments

Comments
 (0)