Skip to content

Commit a099b06

Browse files
committed
AnalyzerConfiguration: Remove unused SW360 configuration
The configuration was used to configure the `Sw360PackageCurationProvider` which is now configured in a separate section of the configuration file. Signed-off-by: Martin Nonnenmacher <martin.nonnenmacher@bosch.io>
1 parent 252baa5 commit a099b06

File tree

4 files changed

+6
-36
lines changed

4 files changed

+6
-36
lines changed

model/src/main/kotlin/config/AnalyzerConfiguration.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,7 @@ data class AnalyzerConfiguration(
4848
* Package manager specific configurations. The key needs to match the name of the package manager class, e.g.
4949
* "NuGet" for the NuGet package manager.
5050
*/
51-
val packageManagers: Map<String, PackageManagerConfiguration>? = null,
52-
53-
/**
54-
* Configuration of the SW360 package curation provider.
55-
*/
56-
val sw360Configuration: Sw360StorageConfiguration? = null
51+
val packageManagers: Map<String, PackageManagerConfiguration>? = null
5752
) {
5853
/**
5954
* A copy of [packageManagers] with case-insensitive keys.
@@ -110,8 +105,7 @@ data class AnalyzerConfiguration(
110105
allowDynamicVersions = other.allowDynamicVersions,
111106
enabledPackageManagers = other.enabledPackageManagers ?: enabledPackageManagers,
112107
disabledPackageManagers = other.disabledPackageManagers ?: disabledPackageManagers,
113-
packageManagers = mergedPackageManagers,
114-
sw360Configuration = other.sw360Configuration ?: sw360Configuration
108+
packageManagers = mergedPackageManagers
115109
)
116110
}
117111
}

model/src/main/resources/reference.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,6 @@ ort:
9191
# intercept requests to the registry.
9292
disableRegistryCertificateVerification: false
9393

94-
sw360Configuration:
95-
restUrl: 'https://your-sw360-rest-url'
96-
authUrl: 'https://your-authentication-url'
97-
username: username
98-
password: password
99-
clientId: clientId
100-
clientPassword: clientPassword
101-
token: token
102-
10394
advisor:
10495
nexusIq:
10596
serverUrl: 'https://rest-api-url-of-your-nexus-iq-server'

model/src/test/kotlin/config/AnalyzerConfigurationTest.kt

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,36 +50,31 @@ class AnalyzerConfigurationTest : WordSpec({
5050
val self = AnalyzerConfiguration(
5151
allowDynamicVersions = false,
5252
enabledPackageManagers = listOf("Gradle"),
53-
disabledPackageManagers = listOf("NPM"),
54-
sw360Configuration = sw360Config1
53+
disabledPackageManagers = listOf("NPM")
5554
)
5655

5756
val other = AnalyzerConfiguration(
5857
allowDynamicVersions = true,
5958
enabledPackageManagers = listOf("Maven"),
60-
disabledPackageManagers = listOf("SBT"),
61-
sw360Configuration = sw360Config2
59+
disabledPackageManagers = listOf("SBT")
6260
)
6361

6462
with(self.merge(other)) {
6563
allowDynamicVersions shouldBe true
6664
enabledPackageManagers should containExactly("Maven")
6765
disabledPackageManagers should containExactly("SBT")
68-
sw360Configuration shouldBe sw360Config2
6966
}
7067
}
7168

7269
"keep values which are null in other" {
7370
val self = AnalyzerConfiguration(
7471
enabledPackageManagers = listOf("Gradle"),
75-
disabledPackageManagers = listOf("NPM"),
76-
sw360Configuration = sw360Config1
72+
disabledPackageManagers = listOf("NPM")
7773
)
7874

7975
val other = AnalyzerConfiguration(
8076
enabledPackageManagers = null,
81-
disabledPackageManagers = null,
82-
sw360Configuration = null
77+
disabledPackageManagers = null
8378
)
8479

8580
self.merge(other) shouldBe self

model/src/test/kotlin/config/OrtConfigurationTest.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,16 +123,6 @@ class OrtConfigurationTest : WordSpec({
123123
this shouldBe get("Gradle")
124124
}
125125
}
126-
127-
sw360Configuration shouldNotBeNull {
128-
restUrl shouldBe "https://your-sw360-rest-url"
129-
authUrl shouldBe "https://your-authentication-url"
130-
username shouldBe "username"
131-
password shouldBe "password"
132-
clientId shouldBe "clientId"
133-
clientPassword shouldBe "clientPassword"
134-
token shouldBe "token"
135-
}
136126
}
137127

138128
with(ortConfig.advisor) {

0 commit comments

Comments
 (0)