Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1
    • Component/s: taglib.interaction
    • Labels:
      None
    • Environment:

      I've tested this in windows with and without cygwin.

      Description

      I've attached a patch to the commons-jelly-tags-interaction jar. This
      patch makes it so the interaction task will try to use jline:
      http://jline.sourceforge.net/

      Jline makes it so a java console will have tab completion, and
      history, and other goodies.

      This is great, because the maven-console plugin uses the
      commons-jelly-tags-interaction jar. So if you update the
      commons-jelly-tags-interaction jar, and then tell the maven console
      plugin to use the new jar, then your maven console will have history,
      and tab completion.

      I've set it up to remember all of the commands typed in any console,
      further it uses that history as the tab completion source - so you can
      tab complete past commands.

      I've tested this in windows and it works great, but in windows with
      cygwin, it doesn't do the fancy completion, but still works.

      By the way, in windows, jline's lib doesn't support arrows for
      history, so use CONTROL+P and CONTROL+N.

      Its possible that there might be a better way to integrate jline into
      this lib, i've just done what looked like the quickest way to get it
      working so my maven console would have history and tab completion.
      Maybe this feature could be enabled with a tag attribute?

      1. patch.txt
        8 kB
        Ryan Christanson
      2. interaction.patch
        8 kB

        Activity

        Hide
        Ryan Christanson added a comment -

        here is the patch to add jline support

        Show
        Ryan Christanson added a comment - here is the patch to add jline support
        Hide
        dion gillard added a comment -

        I'm still unsure if we can use LGPL binaries in ASF code. Note: we wont be distributing it.

        Show
        dion gillard added a comment - I'm still unsure if we can use LGPL binaries in ASF code. Note: we wont be distributing it.
        Hide
        Paul Libbrecht added a comment -

        I think the situation sounds pretty delicate and that currently linking to LGPL is not a good idea. See:
        http://wiki.apache.org/jakarta/Using_20LGPL_27d_20code

        It seems that the ASF and the FSF are currently trying to resolve this.

        paul

        Show
        Paul Libbrecht added a comment - I think the situation sounds pretty delicate and that currently linking to LGPL is not a good idea. See: http://wiki.apache.org/jakarta/Using_20LGPL_27d_20code It seems that the ASF and the FSF are currently trying to resolve this. paul
        Hide
        Brett Porter added a comment -

        I've contacted the author, as the docs suggest that he is open to other licensing. The project hasn't been touched in a year and a half, so we'll see. Hopefully he is still around and interested in opening up the license a little so it can be included.

        Show
        Brett Porter added a comment - I've contacted the author, as the docs suggest that he is open to other licensing. The project hasn't been touched in a year and a half, so we'll see. Hopefully he is still around and interested in opening up the license a little so it can be included.
        Hide
        Brett Porter added a comment -

        As of 0.9.0, jline is now BSD-licensed. We can go ahead with this.

        Show
        Brett Porter added a comment - As of 0.9.0, jline is now BSD-licensed. We can go ahead with this.
        Hide
        Paul Libbrecht added a comment -

        Tried to applied the patch but got again some errors, even after translating the end of lines.

        Ryan, could you try to produce the patch again with cvs diff -u > patch2.txt ?

        Reading a bit of the source code, it looks like there's more potential of JLine that could be used there!
        In particular, I would believe it would be very helpful for maven to provide to the ask-tag the list of possible completions from the set of goals... in one sentence... there's some future!

        paul

        Show
        Paul Libbrecht added a comment - Tried to applied the patch but got again some errors, even after translating the end of lines. Ryan, could you try to produce the patch again with cvs diff -u > patch2.txt ? Reading a bit of the source code, it looks like there's more potential of JLine that could be used there! In particular, I would believe it would be very helpful for maven to provide to the ask-tag the list of possible completions from the set of goals... in one sentence... there's some future! paul
        Hide
        Ryan Christianson added a comment -

        Im looking at why the patch didnt work, ill report back in a bit.

        Show
        Ryan Christianson added a comment - Im looking at why the patch didnt work, ill report back in a bit.
        Hide
        Ryan Christianson added a comment -

        I've attached a new patch. Looks like the project.xml was the problem, in 1.11 the version of that file the deps section was deleted- so patch couldnt add the jline dep to it.

        Wierd question- I don't rememeber what I did build this to use in maven (its been about 5 months!) It builds the jar, but I don't recall how I tested this before- I looked in my maven lib dir, but I dont see a jar to replace- does this get rolled into another jar?

        me == lame.

        Ryan

        Show
        Ryan Christianson added a comment - I've attached a new patch. Looks like the project.xml was the problem, in 1.11 the version of that file the deps section was deleted- so patch couldnt add the jline dep to it. Wierd question- I don't rememeber what I did build this to use in maven (its been about 5 months!) It builds the jar, but I don't recall how I tested this before- I looked in my maven lib dir, but I dont see a jar to replace- does this get rolled into another jar? me == lame. Ryan
        Hide
        Lukas Theussl added a comment -

        This patch has been applied more than a year ago. I have tested it with the maven console plugin and it works great. I'd like to include this in the next release of the console plugin, is there any chance that jelly-tags-interaction 1.1 could be released any time soon? (Assuming there are still some Jelly devs reading this...)

        Show
        Lukas Theussl added a comment - This patch has been applied more than a year ago. I have tested it with the maven console plugin and it works great. I'd like to include this in the next release of the console plugin, is there any chance that jelly-tags-interaction 1.1 could be released any time soon? (Assuming there are still some Jelly devs reading this...)
        Hide
        Paul Libbrecht added a comment -

        Please be more precise as to how this works great for you (platform, how built-in, example code, etc...).
        Last I tried, precisely the maven embedding did not work.

        thanks
        paul

        Show
        Paul Libbrecht added a comment - Please be more precise as to how this works great for you (platform, how built-in, example code, etc...). Last I tried, precisely the maven embedding did not work. thanks paul
        Hide
        Lukas Theussl added a comment -

        Paul,
        First, thanks for your feedback and interest, I was really afraid that jelly folks are dying out!

        Now here is what I did:

        • grabbed the jelly-tags-interaction code from svn, build a jar and put it in my local maven repo
        • in the console plugin, changed the jelly-tags-interaction dependency to 1.1-SNAPSHOT and added a dependency on jline 0.9.0
        • installed the plugin - voila

        I ran a couple of standard goals (jar, test, site..) in console mode and verified that history and tab completion works as described above (great!).
        I don't know what other 'goodies' are being referred to, I am not familiar with the jline library.

        My system setup: Linux FC3, JDK 1.4.2_10, maven-1.1-beta-3 (current development version).

        Cheers,
        Lukas

        Show
        Lukas Theussl added a comment - Paul, First, thanks for your feedback and interest, I was really afraid that jelly folks are dying out! Now here is what I did: grabbed the jelly-tags-interaction code from svn, build a jar and put it in my local maven repo in the console plugin, changed the jelly-tags-interaction dependency to 1.1-SNAPSHOT and added a dependency on jline 0.9.0 installed the plugin - voila I ran a couple of standard goals (jar, test, site..) in console mode and verified that history and tab completion works as described above (great!). I don't know what other 'goodies' are being referred to, I am not familiar with the jline library. My system setup: Linux FC3, JDK 1.4.2_10, maven-1.1-beta-3 (current development version). Cheers, Lukas
        Hide
        Paul Libbrecht added a comment -

        Very weird, I did the same (you should have also indicated you applied the patch).
        And... well... I get a very bad result, namely... that maven console just forgets to ask... ie. as if if was EOF...
        Platform: MacOSX 10.3.9

        paul

        Show
        Paul Libbrecht added a comment - Very weird, I did the same (you should have also indicated you applied the patch). And... well... I get a very bad result, namely... that maven console just forgets to ask... ie. as if if was EOF... Platform: MacOSX 10.3.9 paul
        Hide
        Lukas Theussl added a comment -

        I did not apply the patch. As I said above, the patch has been applied a long time ago (http://svn.apache.org/viewcvs.cgi?rev=148941&view=rev), it is included in the current svn trunk.

        For the problems you experience, it's weird indeed. Maybe a Mac specific issue as the reporter above affirms he has also tested it on Windows?

        Show
        Lukas Theussl added a comment - I did not apply the patch. As I said above, the patch has been applied a long time ago ( http://svn.apache.org/viewcvs.cgi?rev=148941&view=rev ), it is included in the current svn trunk. For the problems you experience, it's weird indeed. Maybe a Mac specific issue as the reporter above affirms he has also tested it on Windows?
        Hide
        Paul Libbrecht added a comment -

        I suppose I was too tired...
        I did it again... indeed saw that the patch was not needed... and that I got it working on my Mac.
        This ability to change the dependency of an installed plugin is quite amazing, I have to say.

        By working, I could only test inputting goals, going left and right, and bringing last input goals in... that's already nice.
        It'd be nicer that the list of goals is added as possible completions... any reason not to try to add a method such as setCompletor(list) allowing a <i:ask completor="$

        {list}

        " answer="a"/> ?

        paul

        Show
        Paul Libbrecht added a comment - I suppose I was too tired... I did it again... indeed saw that the patch was not needed... and that I got it working on my Mac. This ability to change the dependency of an installed plugin is quite amazing, I have to say. By working, I could only test inputting goals, going left and right, and bringing last input goals in... that's already nice. It'd be nicer that the list of goals is added as possible completions... any reason not to try to add a method such as setCompletor(list) allowing a <i:ask completor="$ {list} " answer="a"/> ? paul
        Hide
        Lukas Theussl added a comment -

        Done: see JELLY-229

        Show
        Lukas Theussl added a comment - Done: see JELLY-229
        Hide
        Paul Libbrecht added a comment -

        Fixed versions component.

        Show
        Paul Libbrecht added a comment - Fixed versions component.
        Hide
        Paul Libbrecht added a comment -

        This in the current version about to be released (I think).
        paul

        Show
        Paul Libbrecht added a comment - This in the current version about to be released (I think). paul

          People

          • Assignee:
            Paul Libbrecht
            Reporter:
            Ryan Christanson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development