diff --git a/model/src/main/kotlin/config/AnalyzerConfiguration.kt b/model/src/main/kotlin/config/AnalyzerConfiguration.kt index 3e3e35393ff7f..c90ea288d6258 100644 --- a/model/src/main/kotlin/config/AnalyzerConfiguration.kt +++ b/model/src/main/kotlin/config/AnalyzerConfiguration.kt @@ -48,12 +48,7 @@ data class AnalyzerConfiguration( * Package manager specific configurations. The key needs to match the name of the package manager class, e.g. * "NuGet" for the NuGet package manager. */ - val packageManagers: Map? = null, - - /** - * Configuration of the SW360 package curation provider. - */ - val sw360Configuration: Sw360StorageConfiguration? = null + val packageManagers: Map? = null ) { /** * A copy of [packageManagers] with case-insensitive keys. @@ -110,8 +105,7 @@ data class AnalyzerConfiguration( allowDynamicVersions = other.allowDynamicVersions, enabledPackageManagers = other.enabledPackageManagers ?: enabledPackageManagers, disabledPackageManagers = other.disabledPackageManagers ?: disabledPackageManagers, - packageManagers = mergedPackageManagers, - sw360Configuration = other.sw360Configuration ?: sw360Configuration + packageManagers = mergedPackageManagers ) } } diff --git a/model/src/main/resources/reference.yml b/model/src/main/resources/reference.yml index d27e95dd916a2..8887b09f6bdc4 100644 --- a/model/src/main/resources/reference.yml +++ b/model/src/main/resources/reference.yml @@ -91,15 +91,6 @@ ort: # intercept requests to the registry. disableRegistryCertificateVerification: false - sw360Configuration: - restUrl: 'https://your-sw360-rest-url' - authUrl: 'https://your-authentication-url' - username: username - password: password - clientId: clientId - clientPassword: clientPassword - token: token - advisor: nexusIq: serverUrl: 'https://rest-api-url-of-your-nexus-iq-server' diff --git a/model/src/test/kotlin/config/AnalyzerConfigurationTest.kt b/model/src/test/kotlin/config/AnalyzerConfigurationTest.kt index 6a236af31431c..b09475a2e4193 100644 --- a/model/src/test/kotlin/config/AnalyzerConfigurationTest.kt +++ b/model/src/test/kotlin/config/AnalyzerConfigurationTest.kt @@ -50,36 +50,31 @@ class AnalyzerConfigurationTest : WordSpec({ val self = AnalyzerConfiguration( allowDynamicVersions = false, enabledPackageManagers = listOf("Gradle"), - disabledPackageManagers = listOf("NPM"), - sw360Configuration = sw360Config1 + disabledPackageManagers = listOf("NPM") ) val other = AnalyzerConfiguration( allowDynamicVersions = true, enabledPackageManagers = listOf("Maven"), - disabledPackageManagers = listOf("SBT"), - sw360Configuration = sw360Config2 + disabledPackageManagers = listOf("SBT") ) with(self.merge(other)) { allowDynamicVersions shouldBe true enabledPackageManagers should containExactly("Maven") disabledPackageManagers should containExactly("SBT") - sw360Configuration shouldBe sw360Config2 } } "keep values which are null in other" { val self = AnalyzerConfiguration( enabledPackageManagers = listOf("Gradle"), - disabledPackageManagers = listOf("NPM"), - sw360Configuration = sw360Config1 + disabledPackageManagers = listOf("NPM") ) val other = AnalyzerConfiguration( enabledPackageManagers = null, - disabledPackageManagers = null, - sw360Configuration = null + disabledPackageManagers = null ) self.merge(other) shouldBe self @@ -132,17 +127,3 @@ class AnalyzerConfigurationTest : WordSpec({ } } }) - -private val sw360Config1 = Sw360StorageConfiguration( - restUrl = "url1", - authUrl = "auth1", - username = "user1", - clientId = "client1" -) - -private val sw360Config2 = Sw360StorageConfiguration( - restUrl = "url2", - authUrl = "auth2", - username = "user2", - clientId = "client2" -) diff --git a/model/src/test/kotlin/config/OrtConfigurationTest.kt b/model/src/test/kotlin/config/OrtConfigurationTest.kt index 6d329c60a90d4..e60a366934f50 100644 --- a/model/src/test/kotlin/config/OrtConfigurationTest.kt +++ b/model/src/test/kotlin/config/OrtConfigurationTest.kt @@ -123,16 +123,6 @@ class OrtConfigurationTest : WordSpec({ this shouldBe get("Gradle") } } - - sw360Configuration shouldNotBeNull { - restUrl shouldBe "https://your-sw360-rest-url" - authUrl shouldBe "https://your-authentication-url" - username shouldBe "username" - password shouldBe "password" - clientId shouldBe "clientId" - clientPassword shouldBe "clientPassword" - token shouldBe "token" - } } with(ortConfig.advisor) {