@Test public void getMavenCommandWithEmptyMainServiceNormalMavenCommand() { String result = new RunApplication(Vertx.vertx(), config) .getMavenCommand(new DeployApplicationRequest("group", "artifact", "version", "classifier", "type").withMainService(" ")); assertThat(result, is("maven:group:artifact:version")); }
String getMavenCommand(DeployApplicationRequest request) { if (!StringUtils.isBlank(request.getMainService())) { return String.format("maven:%s::%s", request.getModuleId(), request.getMainService()); } return String.format("maven:%s", request.getModuleId()); }
RunApplication implements Command<DeployApplicationRequest> { String getMavenCommand(DeployApplicationRequest request) { if (!StringUtils.isBlank(request.getMainService())) { return String.format("maven:%s::%s", request.getModuleId(), request.getMainService()); } return String.format("maven:%s", request.getModuleId()); } }
RunApplication implements Command<DeployApplicationRequest> { String getMavenCommand(DeployApplicationRequest request) { if (!StringUtils.isBlank(request.getMainService())) { return String.format("maven:%s::%s", request.getModuleId(), request.getMainService()); } return String.format("maven:%s", request.getModuleId()); } RunApplication(final io.vertx.core.Vertx vertx, final DeployConfig deployConfig); }
RunApplication implements Command<DeployApplicationRequest> { String getMavenCommand(DeployApplicationRequest request) { if (!StringUtils.isBlank(request.getMainService())) { return String.format("maven:%s::%s", request.getModuleId(), request.getMainService()); } return String.format("maven:%s", request.getModuleId()); } RunApplication(final io.vertx.core.Vertx vertx, final DeployConfig deployConfig); @Override Observable<DeployApplicationRequest> executeAsync(final DeployApplicationRequest request); }
RunApplication implements Command<DeployApplicationRequest> { String getMavenCommand(DeployApplicationRequest request) { if (!StringUtils.isBlank(request.getMainService())) { return String.format("maven:%s::%s", request.getModuleId(), request.getMainService()); } return String.format("maven:%s", request.getModuleId()); } RunApplication(final io.vertx.core.Vertx vertx, final DeployConfig deployConfig); @Override Observable<DeployApplicationRequest> executeAsync(final DeployApplicationRequest request);  }