Skip to content

Maven Install Command not reading commandline parameters #249

@alokji420

Description

@alokji420

Hi,

i am getting below error while trying to run command from cmd

mvn install

[INFO] --- apigee-enterprise:1.3.1:deploy (deploy-bundle) @ mock-pet-store ---
Request prepared for the server

POST http://11.22.130.55:8080/v1/organizations/enterprise/apis?action=import&name=mock-pet-store&validate=true
accept: [application/json]
accept-encoding: [gzip]
authorization: [Basic [Not shown in log]
content-type: application/octet-stream
[Request body contains data, not shown]

401 Unauthorized
com.google.api.client.http.HttpResponseException: 401 Unauthorized
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1070) ~[google-http-client-1.22.0.jar:1.22.0]
at io.apigee.buildTools.enterprise4g.rest.RestClient.executeAPI(RestClient.java:165) ~[apigee-edge-maven-plugin-1.3.1.jar:?]
at io.apigee.buildTools.enterprise4g.rest.RestClient.uploadBundle(RestClient.java:429) [apigee-edge-maven-plugin-1.3.1.jar:?]
at io.apigee.buildTools.enterprise4g.mavenplugin.DeployMojo.execute(DeployMojo.java:76) [apigee-edge-maven-plugin-1.3.1.jar:?]
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:126) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2(MojoExecutor.java:328) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute(MojoExecutor.java:316) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000(MojoExecutor.java:75) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run(MojoExecutor.java:162) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute(DefaultMojosExecutionStrategy.java:39) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:159) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:105) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:73) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:53) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:118) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:261) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:173) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:101) [maven-core-3.9.9.jar:3.9.9]
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:906) [maven-embedder-3.9.9.jar:3.9.9]
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:283) [maven-embedder-3.9.9.jar:3.9.9]
at org.apache.maven.cli.MavenCli.main(MavenCli.java:206) [maven-embedder-3.9.9.jar:3.9.9]
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:255) [plexus-classworlds-2.8.0.jar:?]
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:201) [plexus-classworlds-2.8.0.jar:?]
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:361) [plexus-classworlds-2.8.0.jar:?]
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:314) [plexus-classworlds-2.8.0.jar:?]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.400 s
[INFO] Finished at: 2025-04-18T18:43:14+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.apigee.build-tools.enterprise4g:apigee-edge-maven-plugin:1.3.1:deploy (deploy-bundle) on project mock-pet-store: 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

1- I tried my username and password in '' but it didn't worked.
2- profile is updated with password in .pom as well as in setting.xml

but still i m getting same error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions