From 448f510cdb7eb0c6332dfe881e58a8ea1fd51f52 Mon Sep 17 00:00:00 2001 From: Appu Goundan Date: Tue, 9 Oct 2018 10:26:09 -0400 Subject: [PATCH] Remove fully qualified jib path for maven goals --- pkg/skaffold/build/local/jib_maven.go | 3 +-- pkg/skaffold/build/local/jib_test.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/skaffold/build/local/jib_maven.go b/pkg/skaffold/build/local/jib_maven.go index 6408f447a12..b82ecfb0528 100644 --- a/pkg/skaffold/build/local/jib_maven.go +++ b/pkg/skaffold/build/local/jib_maven.go @@ -53,8 +53,7 @@ func generateMavenCommand(_ /*workspace*/ string, skaffoldImage string, a *lates // TODO: multi-module return nil, errors.New("Maven multi-modules not supported yet") } - // use mostly-qualified plugin ID in case jib is not a configured plugin - commandLine := []string{"prepare-package", "com.google.cloud.tools:jib-maven-plugin::dockerBuild", "-Dimage=" + skaffoldImage} + commandLine := []string{"prepare-package", "jib:dockerBuild", "-Dimage=" + skaffoldImage} if a.Profile != "" { commandLine = append(commandLine, "-P"+a.Profile) } diff --git a/pkg/skaffold/build/local/jib_test.go b/pkg/skaffold/build/local/jib_test.go index 6f5315e86fa..bf2ece06ca1 100644 --- a/pkg/skaffold/build/local/jib_test.go +++ b/pkg/skaffold/build/local/jib_test.go @@ -28,8 +28,8 @@ func TestGenerateMavenCommand(t *testing.T) { in latest.JibMavenArtifact out []string }{ - {latest.JibMavenArtifact{}, []string{"prepare-package", "com.google.cloud.tools:jib-maven-plugin::dockerBuild", "-Dimage=image"}}, - {latest.JibMavenArtifact{Profile: "profile"}, []string{"prepare-package", "com.google.cloud.tools:jib-maven-plugin::dockerBuild", "-Dimage=image", "-Pprofile"}}, + {latest.JibMavenArtifact{}, []string{"prepare-package", "jib:dockerBuild", "-Dimage=image"}}, + {latest.JibMavenArtifact{Profile: "profile"}, []string{"prepare-package", "jib:dockerBuild", "-Dimage=image", "-Pprofile"}}, } for _, tt := range testCases {