Hi,
I am trying to deploy through apigee maven deploy plugin
https://github.com/apigee/apigee-deploy-maven-plugin
I am following steps as in read me -
i am trying to pass command line parameters as given i read me documentation -
mvn install -P test -Dusername=$username -Dpassword=$pwd -Dorg=$org
but it doesn't work when i hardcode the values in profile it works.
<apigee.org>xxaws-eval</apigee.org>
<apigee.username>xs@gmail.com</apigee.username>
<apigee.password>$34</apigee.password>
THiis is the error i am getting -
POST https://api.enterprise.apigee.com/v1/organizations/%7Borg%7D/apis?action=import&name=Mock-v1&validat...
accept: [application/json]
accept-encoding: [gzip]
authorization: [Basic [Not shown in log]
content-type: application/octet-stream
[Request body contains data, not shown]
[ERROR] 401 Unauthorized
com.google.api.client.http.HttpResponseException: 401 Unauthorized
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1070)
at io.apigee.buildTools.enterprise4g.rest.RestClient.executeAPI(RestClient.java:162)
at io.apigee.buildTools.enterprise4g.rest.RestClient.uploadBundle(RestClient.java:426)
at io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo.execute(DeployMojo.java:72)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
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:309)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:194)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:107)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:993)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:345)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
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)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.246 s
[INFO] Finished at: 2020-06-23T12:23:58+05:30
[INFO] Final Memory: 17M/203M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.2.1:deploy (deploy-bundle) on project mock: 401 Unauthorized -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
aakas
Is there anything i am missing or is it an issue here..
thanks,
Aakash
I see you have opened a GitHub issue for the same. Please see my response on that.
thanks..i updated issue details based on your inputs.
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 |