Skip to content

Commit a69f278

Browse files
committed
add disableMavenSearch to service client
Signed-off-by: Emily McMullan <[email protected]>
1 parent 90affb6 commit a69f278

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

external-providers/java-external-provider/pkg/java_external_provider/provider.go

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -512,23 +512,24 @@ func (p *javaProvider) Init(ctx context.Context, log logr.Logger, config provide
512512
}
513513

514514
svcClient := javaServiceClient{
515-
rpc: rpc,
516-
cancelFunc: cancelFunc,
517-
config: config,
518-
cmd: cmd,
519-
bundles: bundles,
520-
workspace: workspace,
521-
log: log,
522-
depToLabels: map[string]*depLabelItem{},
523-
isLocationBinary: isBinary,
524-
mvnInsecure: mavenInsecure,
525-
mvnSettingsFile: mavenSettingsFile,
526-
mvnLocalRepo: m2Repo,
527-
mvnIndexPath: mavenIndexPath,
528-
globalSettings: globalSettingsFile,
529-
depsLocationCache: make(map[string]int),
530-
includedPaths: provider.GetIncludedPathsFromConfig(config, false),
531-
cleanExplodedBins: explodedBins,
515+
rpc: rpc,
516+
cancelFunc: cancelFunc,
517+
config: config,
518+
cmd: cmd,
519+
bundles: bundles,
520+
workspace: workspace,
521+
log: log,
522+
depToLabels: map[string]*depLabelItem{},
523+
isLocationBinary: isBinary,
524+
mvnInsecure: mavenInsecure,
525+
mvnSettingsFile: mavenSettingsFile,
526+
mvnLocalRepo: m2Repo,
527+
mvnIndexPath: mavenIndexPath,
528+
globalSettings: globalSettingsFile,
529+
depsLocationCache: make(map[string]int),
530+
includedPaths: provider.GetIncludedPathsFromConfig(config, false),
531+
cleanExplodedBins: explodedBins,
532+
disableMavenSearch: disableMavenSearch,
532533
}
533534

534535
if mode == provider.FullAnalysisMode {

external-providers/java-external-provider/pkg/java_external_provider/util.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,8 @@ func toDependency(_ context.Context, log logr.Logger, depToLabels map[string]*de
537537
return dep, nil
538538
}
539539
log.V(3).Error(err, "unable to look up dependency by SHA, falling back to get maven cordinates", "jar", jarFile)
540+
} else {
541+
log.Info("maven search disabled - looking for dependencies from poms and jar structure")
540542
}
541543
dep, err := constructArtifactFromPom(log, jarFile, depToLabels)
542544
if err == nil {

0 commit comments

Comments
 (0)