MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/buildpacks / MvnCmd

Function MvnCmd

pkg/java/java.go:194–204  ·  view source on GitHub ↗

MvnCmd returns the command that should be used to invoke maven for this build.

(ctx *gcp.Context)

Source from the content-addressed store, hash-verified

192
193// MvnCmd returns the command that should be used to invoke maven for this build.
194func MvnCmd(ctx *gcp.Context) (string, error) {
195 exists, err := ctx.FileExists("mvnw")
196 if err != nil {
197 return "", err
198 }
199 // If this project has the Maven Wrapper, we should use it
200 if exists {
201 return "./mvnw", nil
202 }
203 return "mvn", nil
204}
205
206// GradleCmd returns the command that should be used to invoke gradle for this build.
207func GradleCmd(ctx *gcp.Context) (string, error) {

Callers 4

mavenClasspathFunction · 0.92
buildMavenFunction · 0.92
parsePomFileFunction · 0.92

Calls 1

FileExistsMethod · 0.80

Tested by

no test coverage detected