Add a new Java configuration option to recursively search parent poms… (#2274)

- Add a new Java configuration option to recursively search parent poms for licenses
---------
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-11-03 10:33:02 -04:00
committed by GitHub
co-authored by Christopher Phillips
parent 793cef5086
commit 2d582f78a1
15 changed files with 612 additions and 30 deletions
+3 -2
View File
@@ -140,8 +140,9 @@ func (cfg Catalog) ToCatalogerConfig() cataloger.Config {
CatalogModules: cfg.LinuxKernel.CatalogModules,
},
Java: javaCataloger.DefaultCatalogerOpts().
WithSearchMavenForLicenses(cfg.Java.SearchMavenForLicenses).
WithMavenCentralURL(cfg.Java.MavenURL),
WithUseNetwork(cfg.Java.UseNetwork).
WithMavenCentralURL(cfg.Java.MavenURL).
WithMaxParentRecursiveDepth(cfg.Java.MaxParentRecursiveDepth),
Python: pythonCataloger.CatalogerConfig{
GuessUnpinnedRequirements: cfg.Python.GuessUnpinnedRequirements,
},
+3 -2
View File
@@ -1,6 +1,7 @@
package options
type java struct {
SearchMavenForLicenses bool `yaml:"search-maven-for-licenses" json:"search-maven-for-licenses" mapstructure:"search-maven-for-licenses"`
MavenURL string `yaml:"maven-url" json:"maven-url" mapstructure:"maven-url"`
UseNetwork bool `yaml:"use-network" json:"use-network" mapstructure:"use-network"`
MavenURL string `yaml:"maven-url" json:"maven-url" mapstructure:"maven-url"`
MaxParentRecursiveDepth int `yaml:"max-parent-recursive-depth" json:"max-parent-recursive-depth" mapstructure:"max-parent-recursive-depth"`
}