Skip to content

Commit

Permalink
Wire though maven-url to java config (#2291)
Browse files Browse the repository at this point in the history
Signed-off-by: Colm O hEigeartaigh <[email protected]>
  • Loading branch information
coheigea authored Nov 6, 2023
1 parent 1470aba commit 9fa11f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/syft/cli/options/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func (cfg Catalog) ToCatalogerConfig() cataloger.Config {
},
Java: javaCataloger.DefaultCatalogerOpts().
WithUseNetwork(cfg.Java.UseNetwork).
WithMavenCentralURL(cfg.Java.MavenURL).
WithMavenURL(cfg.Java.MavenURL).
WithMaxParentRecursiveDepth(cfg.Java.MaxParentRecursiveDepth),
Python: pythonCataloger.CatalogerConfig{
GuessUnpinnedRequirements: cfg.Python.GuessUnpinnedRequirements,
Expand Down
1 change: 1 addition & 0 deletions syft/pkg/cataloger/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func (c Config) JavaConfig() java.Config {
SearchUnindexedArchives: c.Search.IncludeUnindexedArchives,
SearchIndexedArchives: c.Search.IncludeIndexedArchives,
UseNetwork: c.Java.UseNetwork,
MavenBaseURL: c.Java.MavenURL,
MaxParentRecursiveDepth: c.Java.MaxParentRecursiveDepth,
}
}
2 changes: 1 addition & 1 deletion syft/pkg/cataloger/java/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func (j CatalogerOpts) WithUseNetwork(input bool) CatalogerOpts {
return j
}

func (j CatalogerOpts) WithMavenCentralURL(input string) CatalogerOpts {
func (j CatalogerOpts) WithMavenURL(input string) CatalogerOpts {
if input != "" {
j.MavenURL = input
}
Expand Down

0 comments on commit 9fa11f2

Please sign in to comment.