-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fixes the crash for the deps with no versions and removes duplic…
…ates (#105) Fixes the crash for the dependencies with no versions and removes the duplicates of the dependencies with different versions. Jira: [APPENG-2442](https://issues.redhat.com/browse/APPENG-2442) ## Description > Describe what you did and why. **Related issue (if any):** fixes #issue_number_goes_here ## Checklist - [x] I have followed this repository's contributing guidelines. - [x] I will adhere to the project's code of conduct. Signed-off-by: Olga Lavtar <[email protected]>
- Loading branch information
Showing
16 changed files
with
725 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/test/resources/tst_manifests/gradle/deps_with_duplicate_different_versions/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
plugins { | ||
id 'java' | ||
} | ||
|
||
group = 'org.acme.dbaas' | ||
version = '1.0.0-SNAPSHOT' | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
implementation "log4j:log4j:1.2.17" | ||
implementation "log4j:log4j:1.2.14" | ||
} | ||
test { | ||
useJUnitPlatform() | ||
} |
65 changes: 65 additions & 0 deletions
65
src/test/resources/tst_manifests/gradle/deps_with_duplicate_different_versions/depTree.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
|
||
> Task :dependencies | ||
|
||
------------------------------------------------------------ | ||
Root project 'postgresql-orm-quarkus' | ||
------------------------------------------------------------ | ||
|
||
annotationProcessor - Annotation processors and their dependencies for source set 'main'. | ||
No dependencies | ||
|
||
compileClasspath - Compile classpath for source set 'main'. | ||
+--- log4j:log4j:1.2.17 | ||
\--- log4j:log4j:1.2.14 -> 1.2.17 | ||
|
||
compileOnly - Compile-only dependencies for the 'main' feature. (n) | ||
No dependencies | ||
|
||
default - Configuration for default artifacts. (n) | ||
No dependencies | ||
|
||
implementation - Implementation dependencies for the 'main' feature. (n) | ||
+--- log4j:log4j:1.2.17 (n) | ||
\--- log4j:log4j:1.2.14 (n) | ||
|
||
mainSourceElements - List of source directories contained in the Main SourceSet. (n) | ||
No dependencies | ||
|
||
runtimeClasspath - Runtime classpath of source set 'main'. | ||
+--- log4j:log4j:1.2.17 | ||
\--- log4j:log4j:1.2.14 -> 1.2.17 | ||
|
||
runtimeElements - Runtime elements for the 'main' feature. (n) | ||
No dependencies | ||
|
||
runtimeOnly - Runtime-only dependencies for the 'main' feature. (n) | ||
No dependencies | ||
|
||
testAnnotationProcessor - Annotation processors and their dependencies for source set 'test'. | ||
No dependencies | ||
|
||
testCompileClasspath - Compile classpath for source set 'test'. | ||
+--- log4j:log4j:1.2.17 | ||
\--- log4j:log4j:1.2.14 -> 1.2.17 | ||
|
||
testCompileOnly - Compile only dependencies for source set 'test'. (n) | ||
No dependencies | ||
|
||
testImplementation - Implementation only dependencies for source set 'test'. (n) | ||
No dependencies | ||
|
||
testRuntimeClasspath - Runtime classpath of source set 'test'. | ||
+--- log4j:log4j:1.2.17 | ||
\--- log4j:log4j:1.2.14 -> 1.2.17 | ||
|
||
testRuntimeOnly - Runtime only dependencies for source set 'test'. (n) | ||
No dependencies | ||
|
||
(*) - Indicates repeated occurrences of a transitive dependency subtree. Gradle expands transitive dependency subtrees only once per project; repeat occurrences only display the root of the subtree, followed by this annotation. | ||
|
||
(n) - A dependency or dependency configuration that cannot be resolved. | ||
|
||
A web-based, searchable dependency report is available by adding the --scan option. | ||
|
||
BUILD SUCCESSFUL in 375ms | ||
1 actionable task: 1 executed |
46 changes: 46 additions & 0 deletions
46
.../tst_manifests/gradle/deps_with_duplicate_different_versions/expected_component_sbom.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"bomFormat" : "CycloneDX", | ||
"specVersion" : "1.4", | ||
"version" : 1, | ||
"metadata" : { | ||
"timestamp" : "2024-05-02T05:04:32Z", | ||
"component" : { | ||
"group" : "org.acme.dbaas", | ||
"name" : "postgresql-orm-quarkus", | ||
"version" : "1.0.0-SNAPSHOT", | ||
"purl" : "pkg:maven/org.acme.dbaas/[email protected]", | ||
"type" : "application", | ||
"bom-ref" : "pkg:maven/org.acme.dbaas/[email protected]" | ||
} | ||
}, | ||
"components" : [ | ||
{ | ||
"group" : "org.acme.dbaas", | ||
"name" : "postgresql-orm-quarkus", | ||
"version" : "1.0.0-SNAPSHOT", | ||
"purl" : "pkg:maven/org.acme.dbaas/[email protected]", | ||
"type" : "application", | ||
"bom-ref" : "pkg:maven/org.acme.dbaas/[email protected]" | ||
}, | ||
{ | ||
"group" : "log4j", | ||
"name" : "log4j", | ||
"version" : "1.2.17", | ||
"purl" : "pkg:maven/log4j/[email protected]", | ||
"type" : "library", | ||
"bom-ref" : "pkg:maven/log4j/[email protected]" | ||
} | ||
], | ||
"dependencies" : [ | ||
{ | ||
"ref" : "pkg:maven/org.acme.dbaas/[email protected]", | ||
"dependsOn" : [ | ||
"pkg:maven/log4j/[email protected]" | ||
] | ||
}, | ||
{ | ||
"ref" : "pkg:maven/log4j/[email protected]", | ||
"dependsOn" : [ ] | ||
} | ||
] | ||
} |
46 changes: 46 additions & 0 deletions
46
...rces/tst_manifests/gradle/deps_with_duplicate_different_versions/expected_stack_sbom.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"bomFormat" : "CycloneDX", | ||
"specVersion" : "1.4", | ||
"version" : 1, | ||
"metadata" : { | ||
"timestamp" : "2024-05-01T22:57:54Z", | ||
"component" : { | ||
"group" : "org.acme.dbaas", | ||
"name" : "postgresql-orm-quarkus", | ||
"version" : "1.0.0-SNAPSHOT", | ||
"purl" : "pkg:maven/org.acme.dbaas/[email protected]", | ||
"type" : "application", | ||
"bom-ref" : "pkg:maven/org.acme.dbaas/[email protected]" | ||
} | ||
}, | ||
"components" : [ | ||
{ | ||
"group" : "org.acme.dbaas", | ||
"name" : "postgresql-orm-quarkus", | ||
"version" : "1.0.0-SNAPSHOT", | ||
"purl" : "pkg:maven/org.acme.dbaas/[email protected]", | ||
"type" : "application", | ||
"bom-ref" : "pkg:maven/org.acme.dbaas/[email protected]" | ||
}, | ||
{ | ||
"group" : "log4j", | ||
"name" : "log4j", | ||
"version" : "1.2.17", | ||
"purl" : "pkg:maven/log4j/[email protected]", | ||
"type" : "library", | ||
"bom-ref" : "pkg:maven/log4j/[email protected]" | ||
} | ||
], | ||
"dependencies" : [ | ||
{ | ||
"ref" : "pkg:maven/org.acme.dbaas/[email protected]", | ||
"dependsOn" : [ | ||
"pkg:maven/log4j/[email protected]" | ||
] | ||
}, | ||
{ | ||
"ref" : "pkg:maven/log4j/[email protected]", | ||
"dependsOn" : [ ] | ||
} | ||
] | ||
} |
Oops, something went wrong.