Error while using maven deploy plugin for deployment of api proxy.

i am getting following error while trying to deploy the proxy :

[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.5:deploy (deploy-bundle) on project timestampservice: MojoExecutionException: NullPointerException -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.1.5:deploy (deploy-bundle) on project timestampservice: at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: at io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo.processHelpfulErrorMessage(DeployMojo.java:385) at io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo.execute(DeployMojo.java:368) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) ... 20 more Caused by: java.lang.NullPointerException at com.google.api.client.http.GenericUrl.<init>(GenericUrl.java:104) at com.google.api.client.http.HttpRequest.handleRedirect(HttpRequest.java:991) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:933) at io.apigee.buildTools.enterprise4g.rest.RestUtil.executeAPI(RestUtil.java:854) at io.apigee.buildTools.enterprise4g.rest.RestUtil.uploadBundle(RestUtil.java:453) at io.apigee.buildTools.enterprise4g.rest.RestUtil.uploadBundle(RestUtil.java:421) at io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo.doImport(DeployMojo.java:159) at io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo.execute(DeployMojo.java:339)

I am using this command to deploy

mvn install -Ptest -username={my_email}-password={my_password}


Solved Solved
0 4 850
1 ACCEPTED SOLUTION

HI @krupal patel - I am assuming you have provided the org name within the test profile.

Please provide the arguments with a -D

You maven call should be

mvn install -Ptest -Dusername={my_email} -Dpassword={my_password}

View solution in original post

4 REPLIES 4

HI @krupal patel - I am assuming you have provided the org name within the test profile.

Please provide the arguments with a -D

You maven call should be

mvn install -Ptest -Dusername={my_email} -Dpassword={my_password}

I have tried the below command mvn install -Ptest-Dusername={my_email}-Dpassword={my_password}. But it still gave the same response. 

I got some lead on this. It seems like the url when hit through postman using basic auth gives a login page back as a response instead of json response which it shouldn't.

The same url when hit in the browser also gives a login page and after typing in email id and password gives the json response. 

Please suggest. 

Hi @krupal patel - Are you missing spaces between the -D arguments ? Are you running this to deploy proxies to Apigee Cloud or do you have a Private cloud ?

Are you still having issues?