Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2690

Commands.shellifyCommandName may add trailing dash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 3.3.3.Final
    • 3.3.2.Final
    • UI - Shell
    • None

      Working on: https://github.com/fabric8io/fabric8-forge/issues/483

      To make the list of dependencies TAB friendly in the CLI then I use this code:

              if (builder.getUIContext().getProvider().isGUI()) {
                  dependencies.setItemLabelConverter(SpringBootDependencyDTO::getGroupAndName);
              } else {
                  // if in CLI mode then use shorter names so they are tab friendly in the shell
                  dependencies.setItemLabelConverter(dto -> Commands.shellifyCommandName(dto.getName()));
              }
      

      But some of the names in Spring Boot may use parenthesis such as

      I/O: JMS (ActiveMQ)
      I/O: JMS (Artemis)
      I/O: JMS (HornetQ)
      

      And that causes their names in the shellify to end with a dash, notice below

      [workspace]$ addon-install --coordinate io.fabric8.forge:devops,2.3-SNAPSHOT
      ***SUCCESS*** Addon io.fabric8.forge:devops,2.3-SNAPSHOT was installed successfully.
      [workspace]$ spring-boot-new-project --dependencies
      Display all 109 possibilities? (y or n)
      cloud-aws-aws-core                           cloud-discovery-eureka-discovery             fabric8-spring-cloud-kubernetes              sql-apache-derby
      cloud-aws-aws-jdbc                           cloud-discovery-eureka-server                i-o-activiti                                 sql-h2
      cloud-aws-aws-messaging                      cloud-discovery-zookeeper-discovery          i-o-amqp                                     sql-hsqldb
      cloud-circuit-breaker-hystrix                cloud-messaging-cloud-bus-amqp               i-o-apache-camel                             sql-jdbc
      cloud-circuit-breaker-hystrix-dashboard      cloud-messaging-cloud-bus-kafka              i-o-apache-camel-zipkin                      sql-jooq
      cloud-circuit-breaker-turbine                cloud-messaging-stream-kafka                 i-o-batch                                    sql-jpa
      cloud-circuit-breaker-turbine-amqp           cloud-messaging-stream-rabbit                i-o-integration                              sql-mybatis
      cloud-circuit-breaker-turbine-stream         cloud-routing-feign                          i-o-jms-activemq-                            sql-mysql
      cloud-cluster-cluster-etcd                   cloud-routing-ribbon                         i-o-jms-artemis-                             sql-postgresql
      cloud-cluster-cluster-hazelcast              cloud-routing-zuul                           i-o-jms-hornetq-                             template-engines-freemarker
      

      eg

       i-o-jms-activemq-
      

      So I think the shellify code should check for ending dash and remove that.

              rhn-support-ggastald George Gastaldi
              cibsen@redhat.com Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: