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.


git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@416733 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
ltheussl 2006-06-23 14:43:50 +00:00
parent 8fde8e1a31
commit d8e768b676
7 changed files with 26 additions and 10 deletions

View File

@ -30,7 +30,8 @@
<j:set var="followOn" value="true"/> <j:set var="followOn" value="true"/>
<j:while test="${followOn}"> <j:while test="${followOn}">
<log:info/> <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:choose>
<j:when test="${goal.indexOf('=') == '0'}"> <j:when test="${goal.indexOf('=') == '0'}">
<j:set var="prop" value="${goal.substring(1)}" /> <j:set var="prop" value="${goal.substring(1)}" />

View File

@ -22,3 +22,4 @@
# console (defaults to "help"). The usage section is displayed in # console (defaults to "help"). The usage section is displayed in
# any case). # any case).
maven.console.first = ${maven.default.goal} maven.console.first = ${maven.default.goal}
maven.console.completor.goals = clean,java:compile,jar,test,xdoc,site,quit,help

View File

@ -53,12 +53,17 @@
<dependency> <dependency>
<groupId>commons-jelly</groupId> <groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-interaction</artifactId> <artifactId>commons-jelly-tags-interaction</artifactId>
<version>1.0</version> <version>1.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-jelly</groupId> <groupId>commons-jelly</groupId>
<artifactId>commons-jelly-tags-log</artifactId> <artifactId>commons-jelly-tags-log</artifactId>
<version>1.0</version> <version>1.0</version>
</dependency> </dependency>
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
<version>0.9.5</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -25,6 +25,9 @@
</properties> </properties>
<body> <body>
<release version="1.2-SNAPSHOT" date="in SVN"> <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="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="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> <action dev="brett" type="add">Add way to display a property value</action>

View File

@ -61,14 +61,10 @@
<section name="Improving the prompt"> <section name="Improving the prompt">
<p> <p>
It is possible to add completion and history to the console, however In version 1.2 of the console plugin, tab completion and history functionality
it requires the use of an external library. This library is licensed have been introduced via the use of the
under the LPGL, and so cannot be used in the console by default, but <a href="http://jline.sourceforge.net/">jline</a> library. Check the jline
can be downloaded from <a href="http://jline.sf.net">JLine</a>. homepage for documentation, in particular a list of default key bindings.
</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>.
</p> </p>
</section> </section>
</body> </body>

View File

@ -27,6 +27,7 @@
<item name="Bundled" href="http://maven.apache.org/maven-1.x/plugins/bundled/"/> <item name="Bundled" href="http://maven.apache.org/maven-1.x/plugins/bundled/"/>
</breadcrumbs> </breadcrumbs>
<links> <links>
<item name="jline" href="http://jline.sourceforge.net/"/>
</links> </links>
<menu name="Overview"> <menu name="Overview">
<item name="Goals" href="/goals.html"/> <item name="Goals" href="/goals.html"/>

View File

@ -38,6 +38,15 @@
The help is displayed in any case. The help is displayed in any case.
</td> </td>
</tr> </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> </table>
</section> </section>
</body> </body>