Author: ltheussl
Date: Fri Jun 23 07:43:50 2006
New Revision: 416733

URL: http://svn.apache.org/viewvc?rev=416733&view=rev
Log:
PR: MPCONSOLE-6
Add tab completion and history functionality using the jline library.
New property maven.console.completor.goals.
Upgrade to commons-jelly-tags-interaction-1.1.

Modified:
    maven/maven-1/plugins/trunk/console/plugin.jelly
    maven/maven-1/plugins/trunk/console/plugin.properties
    maven/maven-1/plugins/trunk/console/project.xml
    maven/maven-1/plugins/trunk/console/xdocs/changes.xml
    maven/maven-1/plugins/trunk/console/xdocs/index.xml
    maven/maven-1/plugins/trunk/console/xdocs/navigation.xml
    maven/maven-1/plugins/trunk/console/xdocs/properties.xml

Modified: maven/maven-1/plugins/trunk/console/plugin.jelly
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/console/plugin.jelly?rev=416733&r1=416732&r2=416733&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/console/plugin.jelly (original)
+++ maven/maven-1/plugins/trunk/console/plugin.jelly Fri Jun 23 07:43:50 2006
@@ -30,7 +30,8 @@
     <j:set var="followOn" value="true"/>
     <j:while test="${followOn}">
       <log:info/>
-      <i:ask question="${pom.artifactId} ${pom.currentVersion} >" 
answer="goal" default="${lastGoal}"/>
+      <util:tokenize var="completorGoals" 
delim=",">${maven.console.completor.goals}</util:tokenize>
+      <i:ask question="${pom.artifactId} ${pom.currentVersion} >" 
answer="goal" default="${lastGoal}" completor="${completorGoals}"/>
       <j:choose>
         <j:when test="${goal.indexOf('=') == '0'}">
           <j:set var="prop" value="${goal.substring(1)}" />

Modified: maven/maven-1/plugins/trunk/console/plugin.properties
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/console/plugin.properties?rev=416733&r1=416732&r2=416733&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/console/plugin.properties (original)
+++ maven/maven-1/plugins/trunk/console/plugin.properties Fri Jun 23 07:43:50 
2006
@@ -22,3 +22,4 @@
 # console (defaults to "help"). The usage section is displayed in
 # any case).
 maven.console.first = ${maven.default.goal}
+maven.console.completor.goals = clean,java:compile,jar,test,xdoc,site,quit,help

Modified: maven/maven-1/plugins/trunk/console/project.xml
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/console/project.xml?rev=416733&r1=416732&r2=416733&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/console/project.xml (original)
+++ maven/maven-1/plugins/trunk/console/project.xml Fri Jun 23 07:43:50 2006
@@ -53,12 +53,17 @@
     <dependency>
       <groupId>commons-jelly</groupId>
       <artifactId>commons-jelly-tags-interaction</artifactId>
-      <version>1.0</version>
+      <version>1.1</version>
     </dependency>
     <dependency>
       <groupId>commons-jelly</groupId>
       <artifactId>commons-jelly-tags-log</artifactId>
       <version>1.0</version>
     </dependency>
+    <dependency>
+      <groupId>jline</groupId>
+      <artifactId>jline</artifactId>
+      <version>0.9.5</version>
+    </dependency> 
   </dependencies>
 </project>

Modified: maven/maven-1/plugins/trunk/console/xdocs/changes.xml
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/console/xdocs/changes.xml?rev=416733&r1=416732&r2=416733&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/console/xdocs/changes.xml (original)
+++ maven/maven-1/plugins/trunk/console/xdocs/changes.xml Fri Jun 23 07:43:50 
2006
@@ -25,6 +25,9 @@
   </properties>
   <body>
     <release version="1.2-SNAPSHOT" date="in SVN">
+      <action dev="ltheussl" type="update">Upgrade to 
commons-jelly-tags-interaction-1.1.</action>
+      <action dev="ltheussl" type="add" issue="MPCONSOLE-6">New property 
<code>maven.console.completor.goals</code>.</action>
+      <action dev="ltheussl" type="add">Add tab completion and history 
functionality using the jline library.</action>
       <action dev="brett" type="update" issue="MPCONSOLE-10">Split property 
setting into a separate goal console:set-properties to allow annotation of the 
properties</action>
       <action dev="brett" type="remove">Removed the <code>list</code> command 
as it hasn't worked as expected since the early betas (goals are lazy loaded 
into the werkz project)</action>
       <action dev="brett" type="add">Add way to display a property 
value</action>

Modified: maven/maven-1/plugins/trunk/console/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/console/xdocs/index.xml?rev=416733&r1=416732&r2=416733&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/console/xdocs/index.xml (original)
+++ maven/maven-1/plugins/trunk/console/xdocs/index.xml Fri Jun 23 07:43:50 2006
@@ -61,14 +61,10 @@
 
     <section name="Improving the prompt">
       <p>
-        It is possible to add completion and history to the console, however
-        it requires the use of an external library. This library is licensed
-        under the LPGL, and so cannot be used in the console by default, but
-        can be downloaded from <a href="http://jline.sf.net";>JLine</a>.
-      </p>
-      <p>
-        Instructions are detailed in this
-        <a 
href="http://marc.theaimsgroup.com/?l=turbine-maven-user&amp;m=110568914709557&amp;w=2";>mailing
 list post</a>.
+        In version 1.2 of the console plugin, tab completion and history 
functionality
+        have been introduced via the use of the
+        <a href="http://jline.sourceforge.net/";>jline</a> library. Check the 
jline
+        homepage for documentation, in particular a list of default key 
bindings.
       </p>
     </section>
  </body>

Modified: maven/maven-1/plugins/trunk/console/xdocs/navigation.xml
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/console/xdocs/navigation.xml?rev=416733&r1=416732&r2=416733&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/console/xdocs/navigation.xml (original)
+++ maven/maven-1/plugins/trunk/console/xdocs/navigation.xml Fri Jun 23 
07:43:50 2006
@@ -27,6 +27,7 @@
       <item name="Bundled" 
href="http://maven.apache.org/maven-1.x/plugins/bundled/"/>
     </breadcrumbs>
     <links>
+      <item name="jline" href="http://jline.sourceforge.net/"/>
     </links>
     <menu name="Overview">
       <item name="Goals" href="/goals.html"/>

Modified: maven/maven-1/plugins/trunk/console/xdocs/properties.xml
URL: 
http://svn.apache.org/viewvc/maven/maven-1/plugins/trunk/console/xdocs/properties.xml?rev=416733&r1=416732&r2=416733&view=diff
==============================================================================
--- maven/maven-1/plugins/trunk/console/xdocs/properties.xml (original)
+++ maven/maven-1/plugins/trunk/console/xdocs/properties.xml Fri Jun 23 
07:43:50 2006
@@ -38,6 +38,15 @@
             The help is displayed in any case.
           </td>
         </tr>
+        <tr>
+          <td>maven.console.completor.goals</td>
+          <td>Yes</td>
+          <td>
+            A comma-separated list of goals that are known to the console 
plugin
+            for tab completion. Defaults to
+            "<code>clean,java:compile,jar,test,xdoc,site,quit,help</code>".
+          </td>
+        </tr>
       </table>
     </section>
   </body>


Reply via email to