Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-7796

Add ability to skip kie-ctrl:dispose-container task if container not found in kie-server-controller-plugin

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 7.13.0.Final
    • 7.11.0.Final
    • None
    • None
    • 1
    • NEW
    • NEW
    • 2018 Week 39-41

      I'm trying configure CI for automatic deployment container to kie server by your maven-plugin.

      mvn deploy kie-ctrl:dispose-container kie-ctrl:deploy-container --settings local-settings.xml $JBPM_MAVEN_CLI_OPTS_DEV
      

      But if container not existed on my dev kie-server, command kie-ctrl:dispose-container throw Exception.

      Problem in that code in org.kie.server.controller.plugin.DisposeContainerMojo:

              try {
                  containerSpec = kieControllerGateway.getContainer(templateId, container);
              } catch (NotFoundException containerNotFoundException) {
                  throw containerNotFoundException;
      }
      

      Can you change it to:

              try {
                  containerSpec = kieControllerGateway.getContainer(templateId, container);
              } catch (Throwable containerNotFoundException) {
                  getLog().info("Container " + container + " not found on server template " + templateId + ". Skip that task");
                  return;
              }
      

      or add property to skip that failure

              swiderski.maciej Maciej Swiderski (Inactive)
              altro1 Alexey Trofimov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: