We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28c8313 commit 290121aCopy full SHA for 290121a
commands/audit/sca/java/mvn.go
@@ -174,7 +174,13 @@ func (mdt *MavenDepTreeManager) RunMvnCmd(goals []string) (cmdOutput []byte, err
174
}
175
176
//#nosec G204
177
- cmdOutput, err = exec.Command("mvn", goals...).CombinedOutput()
+ // Fix bug #418 if DepTreeParams.UseWrapper is true, we need to run the maven wrapper script instead of 'mvn'
178
+ cmd := "mvn"
179
+ if mdt.useWrapper {
180
+ cmd = "./mvnw"
181
+ }
182
+ //#nosec G204
183
+ cmdOutput, err = exec.Command(cmd, goals...).CombinedOutput()
184
if err != nil {
185
stringOutput := string(cmdOutput)
186
if len(cmdOutput) > 0 {
0 commit comments