Request to http://localhost:4502/crx/packmgr/service.jsp failed, response=Unauthorized
I have created a different user and password instead of using default admin/admin credentials for building the project bundle and deploying the package. I have given all the permission to this new user account which the admin user has. Also, I am able to deploy the OSGi java bundle successfully using the maven script.
However, when I am trying to deploy the content package i.e. vault using maven, I am getting the following error. If I manually login to http://localhost:4502/crx/packmgr using the new credentials and try to deploy the package manually then it works.
Can someone help me to understand what am I missing?
[INFO] --- content-package-maven-plugin:0.0.16:install (default-cli) @ [project]-vault ---
[INFO] Installing [project]-vault (/Users/[my_user]/[my project]/[project]-vault/target/[project]-vault-0.0.1.zip) to http://localhost:4502/crx/packmgr/service.jsp
[INFO] AuthChallengeProcessor - basic authentication scheme selected
[INFO] HttpMethodDirector - Failure authenticating with BASIC 'Sling (Development)'@localhost:4502
[ERROR] Request to http://localhost:4502/crx/packmgr/service.jsp failed, response=Unauthorized
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.16:install (default-cli) on project [project]-vault: Error while installing package. Check log for details. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.16:install (default-cli) on project [project]-vault: Error while installing package. Check log for details.
Caused by: org.apache.maven.plugin.MojoFailureException: Error while installing package. Check log for details.
at com.day.jcr.vault.maven.mgr.PackageInstallMojo.uploadPackage(PackageInstallMojo.java:281)
at com.day.jcr.vault.maven.mgr.PackageInstallMojo.execute(PackageInstallMojo.java:200)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
