From 85c96f545404c25ed9279839d6f0b2a7c055ec9c Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Mon, 30 Oct 2023 23:11:03 +0100 Subject: [PATCH] refactor: Move Go package managers to their own plugin project Signed-off-by: Sebastian Schuberth --- analyzer/build.gradle.kts | 26 -------- ...viewtoolkit.analyzer.PackageManagerFactory | 2 - plugins/package-managers/go/build.gradle.kts | 64 +++++++++++++++++++ .../synthetic/glide-expected-output.yml | 4 +- .../synthetic/godep-expected-output.yml | 4 +- .../projects/synthetic/godep/glide/glide.lock | 0 .../projects/synthetic/godep/glide/glide.yaml | 0 .../projects/synthetic/godep/glide/main.go | 0 .../synthetic/godep/godeps/Godeps/Godeps.json | 0 .../projects/synthetic/godep/godeps/main.go | 0 .../synthetic/godep/lockfile/Gopkg.lock | 0 .../synthetic/godep/lockfile/Gopkg.toml | 0 .../projects/synthetic/godep/lockfile/main.go | 0 .../synthetic/godep/no-lockfile/Gopkg.toml | 0 .../synthetic/godep/no-lockfile/main.go | 0 .../synthetic/godeps-expected-output.yml | 6 +- .../gomod-dangling-embed-expected-output.yml | 2 +- .../synthetic/gomod-dangling-embed/go.mod | 0 .../synthetic/gomod-dangling-embed/main.go | 0 .../synthetic/gomod-expected-output.yml | 0 .../gomod-no-deps-expected-output.yml | 0 .../projects/synthetic/gomod-no-deps/go.mod | 0 .../gomod-submodules-expected-output.yml | 0 .../synthetic/gomod-submodules/app/go.mod | 0 .../synthetic/gomod-submodules/app/go.sum | 0 .../synthetic/gomod-submodules/app/main.go | 0 .../synthetic/gomod-submodules/utils/go.mod | 0 .../synthetic/gomod-submodules/utils/go.sum | 0 .../synthetic/gomod-submodules/utils/texts.go | 0 .../gomod-subpkg-expected-output.yml | 0 .../synthetic/gomod-subpkg/cmd/main.go | 0 .../projects/synthetic/gomod-subpkg/go.mod | 0 .../projects/synthetic/gomod-subpkg/go.sum | 0 .../gomod-unused-deps-expected-output.yml | 0 .../synthetic/gomod-unused-deps/go.mod | 0 .../synthetic/gomod-unused-deps/go.sum | 0 ...workspaces-main-module-expected-output.yml | 2 +- ...-workspaces-sub-module-expected-output.yml | 2 +- .../synthetic/gomod-workspaces/go.mod | 0 .../synthetic/gomod-workspaces/go.sum | 0 .../synthetic/gomod-workspaces/go.work | 0 .../synthetic/gomod-workspaces/go.work.sum | 0 .../synthetic/gomod-workspaces/main.go | 0 .../gomod-workspaces/other-module/go.mod | 0 .../gomod-workspaces/other-module/go.sum | 0 .../gomod-workspaces/other-module/main.go | 0 .../assets/projects/synthetic/gomod/go.mod | 0 .../assets/projects/synthetic/gomod/go.sum | 0 .../assets/projects/synthetic/gomod/main.go | 0 .../projects/synthetic/gomod/main_test.go | 0 .../go/src/funTest/kotlin}/GoDepFunTest.kt | 6 +- .../go/src/funTest/kotlin}/GoModFunTest.kt | 5 +- .../go/src/main/kotlin}/GoDep.kt | 4 +- .../go/src/main/kotlin}/GoMod.kt | 6 +- .../go/src/main/kotlin}/utils/GoSupport.kt | 2 +- .../go/src/main/kotlin}/utils/Graph.kt | 2 +- ...viewtoolkit.analyzer.PackageManagerFactory | 2 + .../go/src/test/kotlin}/GoModTest.kt | 2 +- 58 files changed, 92 insertions(+), 49 deletions(-) create mode 100644 plugins/package-managers/go/build.gradle.kts rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/glide-expected-output.yml (86%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep-expected-output.yml (91%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/glide/glide.lock (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/glide/glide.yaml (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/glide/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/godeps/Godeps/Godeps.json (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/godeps/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.lock (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.toml (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/lockfile/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/no-lockfile/Gopkg.toml (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godep/no-lockfile/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/godeps-expected-output.yml (81%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-dangling-embed-expected-output.yml (80%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-dangling-embed/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-dangling-embed/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-expected-output.yml (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-no-deps-expected-output.yml (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-no-deps/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-submodules-expected-output.yml (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.sum (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-submodules/app/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.sum (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-submodules/utils/texts.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-subpkg-expected-output.yml (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-subpkg/cmd/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-subpkg/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-subpkg/go.sum (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-unused-deps-expected-output.yml (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.sum (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces-main-module-expected-output.yml (94%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces-sub-module-expected-output.yml (97%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces/go.sum (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work.sum (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.sum (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod/go.mod (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod/go.sum (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod/main.go (100%) rename {analyzer => plugins/package-managers/go}/src/funTest/assets/projects/synthetic/gomod/main_test.go (100%) rename {analyzer/src/funTest/kotlin/managers => plugins/package-managers/go/src/funTest/kotlin}/GoDepFunTest.kt (94%) rename {analyzer/src/funTest/kotlin/managers => plugins/package-managers/go/src/funTest/kotlin}/GoModFunTest.kt (95%) rename {analyzer/src/main/kotlin/managers => plugins/package-managers/go/src/main/kotlin}/GoDep.kt (98%) rename {analyzer/src/main/kotlin/managers => plugins/package-managers/go/src/main/kotlin}/GoMod.kt (98%) rename {analyzer/src/main/kotlin/managers => plugins/package-managers/go/src/main/kotlin}/utils/GoSupport.kt (94%) rename {analyzer/src/main/kotlin/managers => plugins/package-managers/go/src/main/kotlin}/utils/Graph.kt (98%) create mode 100644 plugins/package-managers/go/src/main/resources/META-INF/services/org.ossreviewtoolkit.analyzer.PackageManagerFactory rename {analyzer/src/test/kotlin/managers => plugins/package-managers/go/src/test/kotlin}/GoModTest.kt (97%) diff --git a/analyzer/build.gradle.kts b/analyzer/build.gradle.kts index 89126f2315648..092001d9444b2 100644 --- a/analyzer/build.gradle.kts +++ b/analyzer/build.gradle.kts @@ -17,17 +17,12 @@ * License-Filename: LICENSE */ -import org.jetbrains.kotlin.gradle.tasks.KotlinCompile - plugins { // Apply core plugins. `java-test-fixtures` // Apply precompiled plugins. id("ort-library-conventions") - - // Apply third-party plugins. - alias(libs.plugins.kotlinSerialization) } dependencies { @@ -46,18 +41,10 @@ dependencies { // container automatically. They are required on the classpath for Maven dependency resolution to work. implementation(libs.bundles.mavenResolver) - implementation(libs.bundles.kotlinxSerialization) implementation(libs.kotlinxCoroutines) implementation(libs.log4jApi) implementation(libs.semver4j) - implementation(libs.toml4j) - constraints { - implementation("com.google.code.gson:gson:2.10.1") { - because("Earlier versions have vulnerabilities.") - } - } - funTestImplementation(platform(project(":plugins:package-managers"))) // Only the Java plugin's built-in "test" source set automatically depends on the test fixtures. @@ -70,16 +57,3 @@ dependencies { testImplementation(libs.mockk) } - -// Must not opt-in for "compileTestFixturesKotlin" as it does not have kotlinx-serialization in the classpath. -listOf("compileKotlin", "compileTestKotlin").forEach { - tasks.named(it) { - val customCompilerArgs = listOf( - "-opt-in=kotlinx.serialization.ExperimentalSerializationApi" - ) - - compilerOptions { - freeCompilerArgs.addAll(customCompilerArgs) - } - } -} diff --git a/analyzer/src/main/resources/META-INF/services/org.ossreviewtoolkit.analyzer.PackageManagerFactory b/analyzer/src/main/resources/META-INF/services/org.ossreviewtoolkit.analyzer.PackageManagerFactory index 38e00ac00d645..a5c257bf53e5f 100644 --- a/analyzer/src/main/resources/META-INF/services/org.ossreviewtoolkit.analyzer.PackageManagerFactory +++ b/analyzer/src/main/resources/META-INF/services/org.ossreviewtoolkit.analyzer.PackageManagerFactory @@ -1,4 +1,2 @@ -org.ossreviewtoolkit.analyzer.managers.GoDep$Factory -org.ossreviewtoolkit.analyzer.managers.GoMod$Factory org.ossreviewtoolkit.analyzer.managers.Maven$Factory org.ossreviewtoolkit.analyzer.managers.Sbt$Factory diff --git a/plugins/package-managers/go/build.gradle.kts b/plugins/package-managers/go/build.gradle.kts new file mode 100644 index 0000000000000..36216c93e5cda --- /dev/null +++ b/plugins/package-managers/go/build.gradle.kts @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2023 The ORT Project Authors (see ) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 + * License-Filename: LICENSE + */ + +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + // Apply precompiled plugins. + id("ort-library-conventions") + + // Apply third-party plugins. + alias(libs.plugins.kotlinSerialization) +} + +dependencies { + api(project(":analyzer")) + api(project(":model")) + api(project(":utils:common-utils")) { + because("This is a CommandLineTool.") + } + + api(libs.semver4j) { + because("This is a CommandLineTool.") + } + + implementation(project(":downloader")) + implementation(project(":utils:ort-utils")) + implementation(project(":utils:spdx-utils")) + + implementation(libs.bundles.kotlinxSerialization) + implementation(libs.toml4j) + constraints { + implementation("com.google.code.gson:gson:2.10.1") { + because("Earlier versions have vulnerabilities.") + } + } + + funTestImplementation(testFixtures(project(":analyzer"))) +} + +tasks.withType().configureEach { + val customCompilerArgs = listOf( + "-opt-in=kotlinx.serialization.ExperimentalSerializationApi" + ) + + compilerOptions { + freeCompilerArgs.addAll(customCompilerArgs) + } +} diff --git a/analyzer/src/funTest/assets/projects/synthetic/glide-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/glide-expected-output.yml similarity index 86% rename from analyzer/src/funTest/assets/projects/synthetic/glide-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/glide-expected-output.yml index 4c44ad5aeb7ab..8553df3bc29e4 100644 --- a/analyzer/src/funTest/assets/projects/synthetic/glide-expected-output.yml +++ b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/glide-expected-output.yml @@ -1,7 +1,7 @@ --- project: - id: "GoDep::github.com/oss-review-toolkit/ort/analyzer/src/funtest/assets/projects/synthetic/godep/glide:" - definition_file_path: "analyzer/src/funTest/assets/projects/synthetic/godep/glide/glide.yaml" + id: "GoDep::github.com/oss-review-toolkit/ort/plugins/package-managers/go/src/funtest/assets/projects/synthetic/godep/glide:" + definition_file_path: "plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/glide/glide.yaml" declared_licenses: [] declared_licenses_processed: {} vcs: diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep-expected-output.yml similarity index 91% rename from analyzer/src/funTest/assets/projects/synthetic/godep-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep-expected-output.yml index e3ceb61e58b0a..0f5a29fc8c57d 100644 --- a/analyzer/src/funTest/assets/projects/synthetic/godep-expected-output.yml +++ b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep-expected-output.yml @@ -1,7 +1,7 @@ --- project: - id: "GoDep::github.com/oss-review-toolkit/ort/analyzer/src/funtest/assets/projects/synthetic/godep/lockfile:" - definition_file_path: "analyzer/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.toml" + id: "GoDep::github.com/oss-review-toolkit/ort/plugins/package-managers/go/src/funtest/assets/projects/synthetic/godep/lockfile:" + definition_file_path: "plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.toml" declared_licenses: [] declared_licenses_processed: {} vcs: diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/glide/glide.lock b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/glide/glide.lock similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/glide/glide.lock rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/glide/glide.lock diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/glide/glide.yaml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/glide/glide.yaml similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/glide/glide.yaml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/glide/glide.yaml diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/glide/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/glide/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/glide/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/glide/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/godeps/Godeps/Godeps.json b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/godeps/Godeps/Godeps.json similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/godeps/Godeps/Godeps.json rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/godeps/Godeps/Godeps.json diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/godeps/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/godeps/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/godeps/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/godeps/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.lock b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.lock similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.lock rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.lock diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.toml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.toml similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.toml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/lockfile/Gopkg.toml diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/lockfile/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/lockfile/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/lockfile/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/lockfile/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/no-lockfile/Gopkg.toml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/no-lockfile/Gopkg.toml similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/no-lockfile/Gopkg.toml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/no-lockfile/Gopkg.toml diff --git a/analyzer/src/funTest/assets/projects/synthetic/godep/no-lockfile/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/no-lockfile/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/godep/no-lockfile/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/no-lockfile/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/godeps-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godeps-expected-output.yml similarity index 81% rename from analyzer/src/funTest/assets/projects/synthetic/godeps-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/godeps-expected-output.yml index b03bcc720dafc..bf0061aff1d29 100644 --- a/analyzer/src/funTest/assets/projects/synthetic/godeps-expected-output.yml +++ b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/godeps-expected-output.yml @@ -1,7 +1,7 @@ --- project: - id: "GoDep::github.com/oss-review-toolkit/ort/analyzer/src/funtest/assets/projects/synthetic/godep/godeps/godeps:" - definition_file_path: "analyzer/src/funTest/assets/projects/synthetic/godep/godeps/Godeps/Godeps.json" + id: "GoDep::github.com/oss-review-toolkit/ort/plugins/package-managers/go/src/funtest/assets/projects/synthetic/godep/godeps/godeps:" + definition_file_path: "plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/godeps/Godeps/Godeps.json" declared_licenses: [] declared_licenses_processed: {} vcs: @@ -13,7 +13,7 @@ project: type: "Git" url: "" revision: "" - path: "analyzer/src/funTest/assets/projects/synthetic/godep/godeps" + path: "plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/godeps" homepage_url: "" scopes: - name: "default" diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-dangling-embed-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-dangling-embed-expected-output.yml similarity index 80% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-dangling-embed-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-dangling-embed-expected-output.yml index 88ad2f2cd0e52..28a7c8807cc7c 100644 --- a/analyzer/src/funTest/assets/projects/synthetic/gomod-dangling-embed-expected-output.yml +++ b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-dangling-embed-expected-output.yml @@ -1,7 +1,7 @@ --- project: id: "GoMod::gomod_dangling_embed:" - definition_file_path: "analyzer/src/funTest/assets/projects/synthetic/gomod-dangling-embed/go.mod" + definition_file_path: "plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-dangling-embed/go.mod" declared_licenses: [] declared_licenses_processed: {} vcs: diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-dangling-embed/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-dangling-embed/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-dangling-embed/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-dangling-embed/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-dangling-embed/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-dangling-embed/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-dangling-embed/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-dangling-embed/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-expected-output.yml similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-expected-output.yml diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-no-deps-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-no-deps-expected-output.yml similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-no-deps-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-no-deps-expected-output.yml diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-no-deps/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-no-deps/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-no-deps/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-no-deps/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-submodules-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules-expected-output.yml similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-submodules-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules-expected-output.yml diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.sum b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.sum similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.sum rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/app/go.sum diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/app/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/app/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/app/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/app/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.sum b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.sum similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.sum rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/utils/go.sum diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/utils/texts.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/utils/texts.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-submodules/utils/texts.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-submodules/utils/texts.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-subpkg-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-subpkg-expected-output.yml similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-subpkg-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-subpkg-expected-output.yml diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-subpkg/cmd/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-subpkg/cmd/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-subpkg/cmd/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-subpkg/cmd/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-subpkg/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-subpkg/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-subpkg/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-subpkg/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-subpkg/go.sum b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-subpkg/go.sum similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-subpkg/go.sum rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-subpkg/go.sum diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-unused-deps-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-unused-deps-expected-output.yml similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-unused-deps-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-unused-deps-expected-output.yml diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.sum b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.sum similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.sum rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-unused-deps/go.sum diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces-main-module-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces-main-module-expected-output.yml similarity index 94% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces-main-module-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces-main-module-expected-output.yml index 94419187d06ba..35b858275e6eb 100644 --- a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces-main-module-expected-output.yml +++ b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces-main-module-expected-output.yml @@ -1,7 +1,7 @@ --- project: id: "GoMod::github.com/oss-review-toolkit/ort/gomod-workspaces:" - definition_file_path: "analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.mod" + definition_file_path: "plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.mod" declared_licenses: [] declared_licenses_processed: {} vcs: diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces-sub-module-expected-output.yml b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces-sub-module-expected-output.yml similarity index 97% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces-sub-module-expected-output.yml rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces-sub-module-expected-output.yml index e0fae45feb442..12d1fb510002b 100644 --- a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces-sub-module-expected-output.yml +++ b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces-sub-module-expected-output.yml @@ -1,7 +1,7 @@ --- project: id: "GoMod::github.com/oss-review-toolkit/ort/gomod-workspaces/other-module:" - definition_file_path: "analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.mod" + definition_file_path: "plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.mod" declared_licenses: [] declared_licenses_processed: {} vcs: diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.sum b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.sum similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.sum rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.sum diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work.sum b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work.sum similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work.sum rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/go.work.sum diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.sum b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.sum similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.sum rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/go.sum diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod-workspaces/other-module/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod/go.mod b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod/go.mod similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod/go.mod rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod/go.mod diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod/go.sum b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod/go.sum similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod/go.sum rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod/go.sum diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod/main.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod/main.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod/main.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod/main.go diff --git a/analyzer/src/funTest/assets/projects/synthetic/gomod/main_test.go b/plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod/main_test.go similarity index 100% rename from analyzer/src/funTest/assets/projects/synthetic/gomod/main_test.go rename to plugins/package-managers/go/src/funTest/assets/projects/synthetic/gomod/main_test.go diff --git a/analyzer/src/funTest/kotlin/managers/GoDepFunTest.kt b/plugins/package-managers/go/src/funTest/kotlin/GoDepFunTest.kt similarity index 94% rename from analyzer/src/funTest/kotlin/managers/GoDepFunTest.kt rename to plugins/package-managers/go/src/funTest/kotlin/GoDepFunTest.kt index 76b4d8b5aeaea..8d07f2bb21cab 100644 --- a/analyzer/src/funTest/kotlin/managers/GoDepFunTest.kt +++ b/plugins/package-managers/go/src/funTest/kotlin/GoDepFunTest.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.analyzer.managers +package org.ossreviewtoolkit.plugins.packagemanagers.go import io.kotest.core.spec.style.WordSpec import io.kotest.matchers.collections.beEmpty @@ -29,6 +29,8 @@ import io.kotest.matchers.string.haveSubstring import java.io.File +import org.ossreviewtoolkit.analyzer.managers.create +import org.ossreviewtoolkit.analyzer.managers.resolveSingleProject import org.ossreviewtoolkit.model.Identifier import org.ossreviewtoolkit.model.Project import org.ossreviewtoolkit.model.VcsInfo @@ -56,7 +58,7 @@ class GoDepFunTest : WordSpec({ project.id shouldBe Identifier("GoDep::src/funTest/assets/projects/synthetic/godep/no-lockfile/Gopkg.toml:") project.definitionFilePath shouldBe - "analyzer/src/funTest/assets/projects/synthetic/godep/no-lockfile/Gopkg.toml" + "plugins/package-managers/go/src/funTest/assets/projects/synthetic/godep/no-lockfile/Gopkg.toml" packages should beEmpty() issues shouldHaveSize 1 issues.first().message should haveSubstring("IllegalArgumentException: No lockfile found in") diff --git a/analyzer/src/funTest/kotlin/managers/GoModFunTest.kt b/plugins/package-managers/go/src/funTest/kotlin/GoModFunTest.kt similarity index 95% rename from analyzer/src/funTest/kotlin/managers/GoModFunTest.kt rename to plugins/package-managers/go/src/funTest/kotlin/GoModFunTest.kt index 881c4ae4937d9..c483a962df656 100644 --- a/analyzer/src/funTest/kotlin/managers/GoModFunTest.kt +++ b/plugins/package-managers/go/src/funTest/kotlin/GoModFunTest.kt @@ -17,13 +17,16 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.analyzer.managers +package org.ossreviewtoolkit.plugins.packagemanagers.go import io.kotest.core.spec.style.StringSpec import io.kotest.matchers.should import java.io.File +import org.ossreviewtoolkit.analyzer.managers.collateMultipleProjects +import org.ossreviewtoolkit.analyzer.managers.create +import org.ossreviewtoolkit.analyzer.managers.resolveSingleProject import org.ossreviewtoolkit.downloader.VersionControlSystem import org.ossreviewtoolkit.model.toYaml import org.ossreviewtoolkit.utils.test.getAssetFile diff --git a/analyzer/src/main/kotlin/managers/GoDep.kt b/plugins/package-managers/go/src/main/kotlin/GoDep.kt similarity index 98% rename from analyzer/src/main/kotlin/managers/GoDep.kt rename to plugins/package-managers/go/src/main/kotlin/GoDep.kt index b6894f8d76eb0..051764cadfc65 100644 --- a/analyzer/src/main/kotlin/managers/GoDep.kt +++ b/plugins/package-managers/go/src/main/kotlin/GoDep.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.analyzer.managers +package org.ossreviewtoolkit.plugins.packagemanagers.go import com.moandjiezana.toml.Toml @@ -32,7 +32,6 @@ import org.apache.logging.log4j.kotlin.logger import org.ossreviewtoolkit.analyzer.AbstractPackageManagerFactory import org.ossreviewtoolkit.analyzer.PackageManager -import org.ossreviewtoolkit.analyzer.managers.utils.normalizeModuleVersion import org.ossreviewtoolkit.downloader.VcsHost import org.ossreviewtoolkit.downloader.VersionControlSystem import org.ossreviewtoolkit.model.Identifier @@ -50,6 +49,7 @@ import org.ossreviewtoolkit.model.config.AnalyzerConfiguration import org.ossreviewtoolkit.model.config.RepositoryConfiguration import org.ossreviewtoolkit.model.createAndLogIssue import org.ossreviewtoolkit.model.orEmpty +import org.ossreviewtoolkit.plugins.packagemanagers.go.utils.normalizeModuleVersion import org.ossreviewtoolkit.utils.common.CommandLineTool import org.ossreviewtoolkit.utils.common.ProcessCapture import org.ossreviewtoolkit.utils.common.collectMessages diff --git a/analyzer/src/main/kotlin/managers/GoMod.kt b/plugins/package-managers/go/src/main/kotlin/GoMod.kt similarity index 98% rename from analyzer/src/main/kotlin/managers/GoMod.kt rename to plugins/package-managers/go/src/main/kotlin/GoMod.kt index 77618ee224f7b..53347dfa96375 100644 --- a/analyzer/src/main/kotlin/managers/GoMod.kt +++ b/plugins/package-managers/go/src/main/kotlin/GoMod.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.analyzer.managers +package org.ossreviewtoolkit.plugins.packagemanagers.go import java.io.File @@ -31,8 +31,6 @@ import org.apache.logging.log4j.kotlin.logger import org.ossreviewtoolkit.analyzer.AbstractPackageManagerFactory import org.ossreviewtoolkit.analyzer.PackageManager -import org.ossreviewtoolkit.analyzer.managers.utils.Graph -import org.ossreviewtoolkit.analyzer.managers.utils.normalizeModuleVersion import org.ossreviewtoolkit.downloader.VersionControlSystem import org.ossreviewtoolkit.model.Hash import org.ossreviewtoolkit.model.Identifier @@ -48,6 +46,8 @@ import org.ossreviewtoolkit.model.VcsType import org.ossreviewtoolkit.model.config.AnalyzerConfiguration import org.ossreviewtoolkit.model.config.RepositoryConfiguration import org.ossreviewtoolkit.model.orEmpty +import org.ossreviewtoolkit.plugins.packagemanagers.go.utils.Graph +import org.ossreviewtoolkit.plugins.packagemanagers.go.utils.normalizeModuleVersion import org.ossreviewtoolkit.utils.common.CommandLineTool import org.ossreviewtoolkit.utils.common.Os import org.ossreviewtoolkit.utils.common.splitOnWhitespace diff --git a/analyzer/src/main/kotlin/managers/utils/GoSupport.kt b/plugins/package-managers/go/src/main/kotlin/utils/GoSupport.kt similarity index 94% rename from analyzer/src/main/kotlin/managers/utils/GoSupport.kt rename to plugins/package-managers/go/src/main/kotlin/utils/GoSupport.kt index a9d44f3a88886..9bc5a699826a0 100644 --- a/analyzer/src/main/kotlin/managers/utils/GoSupport.kt +++ b/plugins/package-managers/go/src/main/kotlin/utils/GoSupport.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.analyzer.managers.utils +package org.ossreviewtoolkit.plugins.packagemanagers.go.utils /** * Return the given [moduleVersion] normalized to a Semver compliant version. The `v` prefix gets stripped and diff --git a/analyzer/src/main/kotlin/managers/utils/Graph.kt b/plugins/package-managers/go/src/main/kotlin/utils/Graph.kt similarity index 98% rename from analyzer/src/main/kotlin/managers/utils/Graph.kt rename to plugins/package-managers/go/src/main/kotlin/utils/Graph.kt index d36c98ceef1e3..0d273a8a9eeff 100644 --- a/analyzer/src/main/kotlin/managers/utils/Graph.kt +++ b/plugins/package-managers/go/src/main/kotlin/utils/Graph.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.analyzer.managers.utils +package org.ossreviewtoolkit.plugins.packagemanagers.go.utils import java.util.LinkedList diff --git a/plugins/package-managers/go/src/main/resources/META-INF/services/org.ossreviewtoolkit.analyzer.PackageManagerFactory b/plugins/package-managers/go/src/main/resources/META-INF/services/org.ossreviewtoolkit.analyzer.PackageManagerFactory new file mode 100644 index 0000000000000..67961a159a811 --- /dev/null +++ b/plugins/package-managers/go/src/main/resources/META-INF/services/org.ossreviewtoolkit.analyzer.PackageManagerFactory @@ -0,0 +1,2 @@ +org.ossreviewtoolkit.plugins.packagemanagers.go.GoDep$Factory +org.ossreviewtoolkit.plugins.packagemanagers.go.GoMod$Factory diff --git a/analyzer/src/test/kotlin/managers/GoModTest.kt b/plugins/package-managers/go/src/test/kotlin/GoModTest.kt similarity index 97% rename from analyzer/src/test/kotlin/managers/GoModTest.kt rename to plugins/package-managers/go/src/test/kotlin/GoModTest.kt index 0ca26079ec49a..29566e9627db6 100644 --- a/analyzer/src/test/kotlin/managers/GoModTest.kt +++ b/plugins/package-managers/go/src/test/kotlin/GoModTest.kt @@ -17,7 +17,7 @@ * License-Filename: LICENSE */ -package org.ossreviewtoolkit.analyzer.managers +package org.ossreviewtoolkit.plugins.packagemanagers.go import io.kotest.core.spec.style.WordSpec import io.kotest.matchers.collections.beEmpty