Read a license from a parent pom stored in Maven Central (#2228)

* Read a license from a parent pom stored in Maven Central
---------
Signed-off-by: Colm O hEigeartaigh <coheigea@apache.org>
Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
Co-authored-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
Colm O hEigeartaigh
2023-10-30 17:48:16 -04:00
committed by GitHub
co-authored by Christopher Phillips
parent 262423b1e8
commit 78ac2f9797
14 changed files with 264 additions and 41 deletions
+7 -3
View File
@@ -9,17 +9,21 @@ import (
// NewJavaCataloger returns a new Java archive cataloger object.
func NewJavaCataloger(cfg Config) *generic.Cataloger {
gap := newGenericArchiveParserAdapter(cfg)
c := generic.NewCataloger("java-cataloger").
WithParserByGlobs(parseJavaArchive, archiveFormatGlobs...)
WithParserByGlobs(gap.parseJavaArchive, archiveFormatGlobs...)
if cfg.SearchIndexedArchives {
// java archives wrapped within zip files
c.WithParserByGlobs(parseZipWrappedJavaArchive, genericZipGlobs...)
gzp := newGenericZipWrappedJavaArchiveParser(cfg)
c.WithParserByGlobs(gzp.parseZipWrappedJavaArchive, genericZipGlobs...)
}
if cfg.SearchUnindexedArchives {
// java archives wrapped within tar files
c.WithParserByGlobs(parseTarWrappedJavaArchive, genericTarGlobs...)
gtp := newGenericTarWrappedJavaArchiveParser(cfg)
c.WithParserByGlobs(gtp.parseTarWrappedJavaArchive, genericTarGlobs...)
}
return c
}