Currently I have a server that's used to do remote deployments to a micro integrator server via a maven deploy command. I have this working in a Test environment but for some reason am getting this error when moving to the next environment:
Dec 19 11:55:47 [INFO] Installing /home/ssm-user/PipelineTest/PipelineTestCompositeExporter/pom.xml to /root/.m2/repository/com/example/PipelineTestCompositeExporter/1.0.0/PipelineTestCompositeExporter-1.0.0.pom
Dec 19 11:55:47 [INFO] Installing /home/ssm-user/PipelineTest/PipelineTestCompositeExporter/target/PipelineTestCompositeExporter_1.0.0.car to /root/.m2/repository/com/example/PipelineTestCompositeExporter/1.0.0/PipelineTestCompositeExporter-1.0.0.car
Dec 19 11:55:47 [INFO]
Dec 19 11:55:47 [INFO] --- maven-car-deploy-plugin:5.2.38:deploy-car (default-deploy-car) @ PipelineTestCompositeExporter ---
Dec 19 11:55:47 [INFO] Deploying to Server...
Dec 19 11:55:47 [INFO] TSPath=/opt/wso2ei-7.1.0/micro-integrator/repository/resources/security/wso2carbon.jks
Dec 19 11:55:47 [INFO] TSType=JKS
Dec 19 11:55:47 [INFO] Server URL=https://micro-integrator.com:9164
Dec 19 11:55:47 [INFO] Operation=deploy
Dec 19 11:55:47 [INFO] ServerType=mi
Dec 19 11:55:48 [INFO] Authentication to https://micro-integrator.com:9164 successful.
Dec 19 11:55:48 [ERROR] Uploading PipelineTestCompositeExporter_1.0.0.car to https://micro-integrator.com:9164 Failed.
Dec 19 11:55:48 org.json.JSONException: JSONObject["AccessToken"] not found.
Dec 19 11:55:48 at org.json.JSONObject.get (JSONObject.java:473)
Dec 19 11:55:48 at org.json.JSONObject.getString (JSONObject.java:654)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.MICAppHandler.deployCApp (MICAppHandler.java:51)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.DeployCarMojo.process (DeployCarMojo.java:272)
Dec 19 11:55:48 at org.wso2.maven.car.artifact.DeployCarMojo.execute (DeployCarMojo.java:224)
Dec 19 11:55:48 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
Dec 19 11:55:48 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
Dec 19 11:55:48 at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
Dec 19 11:55:48 at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
Dec 19 11:55:48 at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
Dec 19 11:55:48 at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
Dec 19 11:55:48 at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
Dec 19 11:55:48 at java.lang.reflect.Method.invoke (Method.java:498)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
Dec 19 11:55:48 at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] Reactor Summary for PipelineTest 1.0.0:
Dec 19 11:55:48 [INFO]
Dec 19 11:55:48 [INFO] PipelineTest ....................................... SUCCESS [ 6.137 s]
Dec 19 11:55:48 [INFO] PipelineTestConfigs ................................ SUCCESS [01:32 min]
Dec 19 11:55:48 [INFO] PipelineTestCompositeExporter ...................... FAILURE [ 36.305 s]
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] BUILD FAILURE
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [INFO] Total time: 03:18 min
Dec 19 11:55:48 [INFO] Finished at: 2022-12-19T11:55:48+02:00
Dec 19 11:55:48 [INFO] ------------------------------------------------------------------------
Dec 19 11:55:48 [ERROR] Failed to execute goal org.wso2.maven:maven-car-deploy-plugin:5.2.38:deploy-car (default-deploy-car) on project PipelineTestCompositeExporter: Deploying PipelineTestCompositeExporter_1.0.0.car to https://micro-integrator.com:9164 Failed.: JSONObject["AccessToken"] not found. -> [Help 1]
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
Dec 19 11:55:48 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] For more information about the errors and possible solutions, please read the following articles:
Dec 19 11:55:48 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Dec 19 11:55:48 [ERROR]
Dec 19 11:55:48 [ERROR] After correcting the problems, you can resume the build with the command
Dec 19 11:55:48 [ERROR] mvn <args> -rf :PipelineTestCompositeExporter
This is the command I am running: /opt/apache-maven-3.6.3/bin/mvn clean deploy -Dmaven.deploy.skip=true -Dmaven.car.deploy.skip=false
As far as I know there is no token management involved here as its using a JKS alongside basic auth to authenticate and connect which I have working perfectly in one environment but not the other.
Not sure what I have missed between these environments. Any suggestions would be great?