Slawek- Very nice, I really like this. It has tons of potential, but works quite well already. On my box, it is *much* faster than evoking the standard ant.bat script every time.
I also like Peter Donald's suggestion of maintaining a bash-like "history", but I thought I would add two more feature requests/suggestions: 1) a "reparse" command that would run the build.xml file through the parser again. This would allow you to change the build file, then re-run your targets without exiting antshell. Granted, the only thing you avoid with a "reparse" command is the JVM start-up time, but on slow boxes like mine, that's pretty significant. :-) 2) a mechanism for setting property values interactively. For example, "set $ant.compiler=jikes" or some such command. I don't recall at the moment when property values are set, at parse time or at run time, so this might depend on Ant, but I can imagine how it might be useful. Regards, Chris >-----Original Message----- >From: ZACHCIAL,SLAWOMIR (HP-France,ex1) >[mailto:[EMAIL PROTECTED] >Sent: Thursday, February 22, 2001 7:55 AM >To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >Subject: Ant Shell (antsh) - any thoughts? > > >Hi, > >Last night I thought I would be great to avoid to start JVM and to >parse the >Ant build file each time I want to do a build. I know that there is an >ongoing effort called 'antidote' but I was thinking rather about a command >line tool. > >And that's how Ant Shell (antsh) is born :-) > >Ant Shell is a command line tool with build targets as the shell commands. >It has also (at the moment) 2+1 additional commands: exit, and help - which >does the same as Ant run with '-projecthelp' option. When you just hit >"enter" the last used target(s) (shown in square brackets in antsh prompt) >will be used (that's where the trick is :-). If the commands are >targets you >may run several at the same time (just like with Ant) - they are >space-separated (just like with Ant :-). > >Its main purpose is not to be a full-featured shell (like bash for example) >but rather to offer some basic functionalities and especially to avoid to >start JVM and parse build file each time. > >Implementation: >The current implementation is far from being the state of the art - it's >much more a prototype and a proof of concept. I just took the Ant's "Main" >class, renamed it and changed it slightly. I had also to leave it in >"org.apache.tools.ant" package as it uses some protected methods (ex. >Project.fireXXX). > > >I would like to know your thoughts about it. Please try it >(attached to this >message) and tell me if the tool like this makes sense, and if >yes, what are >the other features that would be useful. I might become the Ant's >interactive mode (ex. ant -interactive). > >If you think antsh is useful I'd love to do a clean implementation and add >all the demanded features. > > >It was done with Ant 1.2, JDK 1.3, Win2000. I haven't test it - >just built a >couple of targets. To install it unzip the file in the ANT_HOME directory. >If you want to look at the source code - it's in antsh.jar. >You use it exactly the same way as Ant - the command name is >"antsh" instead >of "ant". > >There is also a screenshot :-) - "antsh[_last_targets_]> " is the antsh >prompt. > > >Best Regards, >Slawek Zachcial > >
