@@ -164,7 +164,7 @@ func GetMavenBuildInfo(workingDir string, buildConfiguration *buildUtils.BuildCo
164164 len (buildInfo .Modules [0 ].Dependencies )))
165165
166166 // Now collect artifacts that Maven deployed natively (true native approach)
167- err = collectDeployedMavenArtifacts (buildInfo , workingDir , buildConfiguration )
167+ err = collectDeployedMavenArtifacts (buildInfo , workingDir )
168168 if err != nil {
169169 log .Warn ("Failed to collect deployed Maven artifacts: " + err .Error ())
170170 // Continue anyway - dependencies are more important than artifacts
@@ -525,7 +525,7 @@ func collectPoetryBuildInfo(workingDir, buildName, buildNumber string, serverDet
525525}
526526
527527// collectDeployedMavenArtifacts collects artifacts that Maven deployed natively
528- func collectDeployedMavenArtifacts (buildInfo * buildinfo.BuildInfo , workingDir string , buildConfiguration * buildUtils. BuildConfiguration ) error {
528+ func collectDeployedMavenArtifacts (buildInfo * buildinfo.BuildInfo , workingDir string ) error {
529529 log .Info ("Collecting artifacts deployed by native Maven..." )
530530
531531 // Look for artifacts in target directory (what Maven built)
@@ -584,17 +584,18 @@ func collectDeployedMavenArtifacts(buildInfo *buildinfo.BuildInfo, workingDir st
584584 continue
585585 }
586586
587- // Determine artifact type
588- artifactType := "jar" // Default
589- if strings .HasSuffix (pattern , ".war" ) {
590- artifactType = "war"
591- } else if strings .HasSuffix (pattern , ".ear" ) {
592- artifactType = "ear"
593- } else if strings .HasSuffix (pattern , "-sources.jar" ) {
594- artifactType = "java-source-jar"
595- } else if strings .HasSuffix (pattern , "-javadoc.jar" ) {
596- artifactType = "javadoc"
597- }
587+ // Determine artifact type
588+ artifactType := "jar" // Default
589+ switch {
590+ case strings .HasSuffix (pattern , ".war" ):
591+ artifactType = "war"
592+ case strings .HasSuffix (pattern , ".ear" ):
593+ artifactType = "ear"
594+ case strings .HasSuffix (pattern , "-sources.jar" ):
595+ artifactType = "java-source-jar"
596+ case strings .HasSuffix (pattern , "-javadoc.jar" ):
597+ artifactType = "javadoc"
598+ }
598599
599600 // Create artifact entry with path where Maven deployed it
600601 artifact := buildinfo.Artifact {
0 commit comments