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 {