You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Adrian Co <ac...@exist.com> on 2006/12/06 02:52:03 UTC

[CLI] Unexpected token while processing command

Hi,

I have this simple app:

public class Test {
    public static void main(String[] args) {
        args = new String[] {
                "start",
                "xbean:broker.xml"
        };

        ArgumentBuilder ab = new ArgumentBuilder();
        CommandBuilder cb = new CommandBuilder();
        GroupBuilder gb = new GroupBuilder();

        Group main = gb
                .withOption(cb
                        .withName("start")
                        .withArgument(ab
                                .withDefault("xbean:activemq.xml")
                                .withName("brokerUri")
                                .withMinimum(1)
                                .withMaximum(1)
                                .create()
                        )
                        .create()
                )
                .create();

        Parser p = new Parser();
        p.setGroup(main);
        p.parseAndHelp(args);
    }
}

and it returns

Unexpected xbean:broker.xml while processing 
start                             
Usage:                                                                          

 [start 
<brokerUri>]                                                           
start                                                                           

  start brokerUri

If I remove the withDefault() or if I set the maximum to 2, it processes 
successfully. Is this a bug or am I missing something here?

Regards,
Adrian Co

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [CLI] Unexpected token while processing command

Posted by Rahul Akolkar <ra...@gmail.com>.
On 12/6/06, Andrew Shirley <ak...@decisionsoft.co.uk> wrote:
> On Wed, Dec 06, 2006 at 09:52:03AM +0800, Adrian Co wrote:
> > If I remove the withDefault() or if I set the maximum to 2, it
> > processes successfully. Is this a bug or am I missing something here?
>
> This is a know issue[1].
>
> Unfortuantly, I failed to successfully send in a CLA after being
> nominated to be a committer. This will prompt me to find a functioning
> fax machine and try again! (I assume the nomination is still valid)
>
<snip/>

It was a successful vote (which is more than a nomination). It won't
"expire". We can watch for the ICLA once you send it in (do ping the
dev list once that happens).

-Rahul


> If some one else could commit the patch in jira, it should fix this
> issue.
>
> cheers
> Andrew Shirley
>
> [1] https://issues.apache.org/jira/browse/CLI-61
>
> --
> Andrew Shirley, Client Services        DecisionSoft Limited
> +44-1865-203192                        http://www.decisionsoft.com/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [CLI] Unexpected token while processing command

Posted by Adrian Co <ac...@exist.com>.
Awesome! I'll watch the jira issue for the fix. Thanks a lot! :)

Andrew Shirley wrote:
> On Wed, Dec 06, 2006 at 09:52:03AM +0800, Adrian Co wrote:
>   
>> If I remove the withDefault() or if I set the maximum to 2, it
>> processes successfully. Is this a bug or am I missing something here?
>>     
>
> This is a know issue[1]. 
>
> Unfortuantly, I failed to successfully send in a CLA after being
> nominated to be a committer. This will prompt me to find a functioning
> fax machine and try again! (I assume the nomination is still valid)
>
> If some one else could commit the patch in jira, it should fix this
> issue.
>
> cheers
> Andrew Shirley
>
> [1] https://issues.apache.org/jira/browse/CLI-61
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [CLI] Unexpected token while processing command

Posted by Andrew Shirley <ak...@decisionsoft.co.uk>.
On Wed, Dec 06, 2006 at 09:52:03AM +0800, Adrian Co wrote:
> If I remove the withDefault() or if I set the maximum to 2, it
> processes successfully. Is this a bug or am I missing something here?

This is a know issue[1]. 

Unfortuantly, I failed to successfully send in a CLA after being
nominated to be a committer. This will prompt me to find a functioning
fax machine and try again! (I assume the nomination is still valid)

If some one else could commit the patch in jira, it should fix this
issue.

cheers
Andrew Shirley

[1] https://issues.apache.org/jira/browse/CLI-61

-- 
Andrew Shirley, Client Services        DecisionSoft Limited
+44-1865-203192                        http://www.decisionsoft.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org