fix(java): collect self-bulid-Jar in ScanResult.libraries

This commit is contained in:
Kota Kanbe
2022-10-07 13:53:15 +09:00
parent eb87d5d4e1
commit d3465ca676

View File

@@ -770,6 +770,21 @@ func AnalyzeLibraries(ctx context.Context, libFilemap map[string]LibFile, isOffl
if err != nil {
return nil, xerrors.Errorf("Failed to convert libs. err: %w", err)
}
found := false
for _, a := range result.Applications {
if a.FilePath == path {
found = true
}
}
if !found {
libscan = append(libscan, models.LibraryScanner{
// TODO
// Type: app.Type,
LockfilePath: path,
})
}
libraryScanners = append(libraryScanners, libscan...)
}
return libraryScanners, nil