Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-968

Allow for overriding of the Main.showOptions() method

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.4.0
    • 1.5.0
    • camel-spring
    • None
    • Patch Available

    Description

      Currently if you subclass the org.apache.camel.spring.Main class, then the command line options of Main are available, but using -h produces a list of options headed by:

      "Apache Camel Runner takes the following options"

      It would be nice to be able to change this in the sub-class. Overriding showOptions() is not satisfactory and the option list is stored a a private field with no getter, meaning the list of options cannot be generated.

      I have provided a patch for one possible solution, that allows for just the header part of showOptions() to be overriden.
      (it also moves the generation of the information line into the Option class instead of the showOptions method itself to allow for further customisation, if required.

      Attachments

        1. Main.patch
          2 kB
          Geoff Gibbs

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            davsclaus Claus Ibsen
            geoffgibbs Geoff Gibbs
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment