On 04/19/2011 08:31 AM, Alexey Loubyansky wrote:
It's not entirely consistent, at the moment. I'd like to get
some
feedback on it and what's more convenient for you.
An example of inconsistency
deploy my.war my_war_name.war my_war_runtime_name.war
here are three arguments: the deployment, the name and the runtime name.
The last two are optional but if you want to specify them, you have to
know the order in which they should appear.
Another reason this is bad: to me this says, "Deploy these three files".
On the other hand, there is, e.g. create-jms-cf which has lots of
arguments and where it's impossible to learn all of them, so it looks like
create-jms-cf name=mycf entries=cf/mycf ...
In addition, it's kind of a proprietary convention. We discussed this
with Max today and I'm looking into the GNU convention for command line
arguments
That is a common convention -- for command line arguments. For
interactive command lines (examples I'm thinking of include 3com and
Cisco network management CLIs, as well as commands such as linux's "ip"
command which have widely variable arguments), usually it's more like:
create-jms-cf name mycf entries foo bar baz
Of course this falls apart for "deploy" unless you do something like this:
deploy file mything.war as myblah.war runtime-name yourblah.war
or something (i.e. make it somewhat more fluent and less shell-ish).
And another point is the use of '='. Some command lines
don't use it, e.g.
deploy --file my.war --name my_war_name.war --runtime-name
my_war_runtime_name.war
and some do
deploy --file=my.war --name=my_war_name.war
--runtime-name=my_war_runtime_name.war
And some command lines support both :)
--
- DML