|
9 | 9 |
|
10 | 10 | # Given an input groupId, artifactId and root service directory, scan the service directory for the
|
11 | 11 | # POM file that matches the group/artifact. If the POM file is found, scan for any unreleased_ dependency
|
12 |
| -# tags otherwise report an error. If there are unreleased dependency tags then report them and return an |
| 12 | +# tags otherwise report an error. If there are unreleased dependency tags then report them and return an |
13 | 13 | # error, otherwise report success and allow the release to continue.
|
14 | 14 |
|
15 | 15 | $script:FoundPomFile = $false
|
@@ -60,13 +60,20 @@ Get-ChildItem -Path $serviceDirectory -Filter pom*.xml -Recurse -File | ForEach-
|
60 | 60 | $versionUpdateTag = $versionNode.NextSibling.Value.Trim()
|
61 | 61 | if ($versionUpdateTag -match "{x-version-update;unreleased_$($groupId)")
|
62 | 62 | {
|
63 |
| - # before reporting an error, check to see if there's a scope element and |
64 |
| - # if the scope is test then don't fail |
65 |
| - $scopeNode = $dependencyNode.GetElementsByTagName("scope")[0] |
66 |
| - if ($scopeNode -and $scopeNode.InnerText.Trim() -eq "test") |
67 |
| - { |
68 |
| - continue |
69 |
| - } |
| 63 | + # mvn dependency:copy-dependencies is used to copy the dependencies from maven for analysis |
| 64 | + # as part of the doc build which requires pulling down all dependencies including test |
| 65 | + # dependencies. Until such a time that a better solution is found, disable release of a |
| 66 | + # library with unreleased test dependencies. When a better solution is found, just uncomment |
| 67 | + # the code below. |
| 68 | + |
| 69 | + # # before reporting an error, check to see if there's a scope element and |
| 70 | + # # if the scope is test then don't fail |
| 71 | + # $scopeNode = $dependencyNode.GetElementsByTagName("scope")[0] |
| 72 | + # if ($scopeNode -and $scopeNode.InnerText.Trim() -eq "test") |
| 73 | + # { |
| 74 | + # continue |
| 75 | + # } |
| 76 | + |
70 | 77 | $script:FoundError = $true
|
71 | 78 | Write-Error-With-Color "Error: Cannot release libraries with unreleased dependencies. dependency=$($versionUpdateTag)"
|
72 | 79 | continue
|
|
0 commit comments