Skip to content

Commit 9355f4c

Browse files
committed
Do a best effort for artifactId, to at least set some recognisable value
Signed-off-by: Juan Manuel Leflet Estrada <[email protected]>
1 parent 7572587 commit 9355f4c

File tree

1 file changed

+2
-0
lines changed
  • external-providers/java-external-provider/pkg/java_external_provider

1 file changed

+2
-0
lines changed

external-providers/java-external-provider/pkg/java_external_provider/util.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,9 @@ func constructArtifactFromStructure(log logr.Logger, jarFile string, depToLabels
689689
groupIdRegex := strings.Join([]string{groupId, "*"}, ".")
690690
if depToLabels[groupIdRegex] != nil {
691691
log.V(10).Info(fmt.Sprintf("%s is a public dependency with a group id of: %s", jarFile, groupId))
692+
// do a best effort to set some dependency data
692693
artifact.GroupId = groupId
694+
artifact.ArtifactId = strings.TrimSuffix(filepath.Base(jarFile), ".jar")
693695
// Adding this back to make some things easier.
694696
artifact.foundOnline = true
695697
return artifact, nil

0 commit comments

Comments
 (0)