vertx-deploy-tools
vertx-deploy-tools copied to clipboard
NPE during mvn deploy-single-as without metrics parameter set
Using the 3.8.5 version of the plugin and successfully deploying the application without setting any of the 'deploy.metrics.*' properties results in an NPE:
Caused by: java.lang.NullPointerException at nl.jpoint.maven.vertx.utils.AwsCloudWatchUtils.logMetric (AwsCloudWatchUtils.java:47) at nl.jpoint.maven.vertx.utils.AwsCloudWatchUtils.logSuccess (AwsCloudWatchUtils.java:39) at nl.jpoint.maven.vertx.service.AutoScalingDeployService.deploy (AutoScalingDeployService.java:118) at nl.jpoint.maven.vertx.mojo.VertxDeployAwsAsMojo.execute (VertxDeployAwsAsMojo.java:70)
This seems due to the fact that the applicationConfiguration is not created and the method calls are chained.
Before sending metrics a null check should be performed, it is not necessary to enable metrics to be able to deploy the application. and whenever the metric properties aren't present the plugin should succeed without an issue.