[forge-dev] [JBoss JIRA] Created: (SEAMFORGE-95) Option shortName attribute doesn't work in forge shell

Marek Schmidt (JIRA) jira-events at lists.jboss.org
Fri Mar 25 11:03:21 EDT 2011


Option shortName attribute doesn't work in forge shell
------------------------------------------------------

                 Key: SEAMFORGE-95
                 URL: https://issues.jboss.org/browse/SEAMFORGE-95
             Project: Seam Forge
          Issue Type: Bug
    Affects Versions: 1.0.0.Alpha2
            Reporter: Marek Schmidt


The Option shortName property in a plugin does not work as advertised in the reference guide.

Creating the example plugin from the "3.5.1. --named options" chapter:

public class ExamplePlugin implements Plugin {
   @Command("perform")
   public void exampleCommand(
                  @Option(name="one", shortName="o") String one,
                  @Option(name="two") String two,
                  PipeOut out) {
       out.println(">> option one equals: " + one);
       out.println(">> option two equals: " + two);
   }
}

Trying to use the shortName for the first argument doesn't work:

[no project] tmp $ exampleplugin perform -o one --two two
***INFO*** The command [perform] takes [0] unnamed argument(s), but found [1].
***INFO*** Swallowed unknown token [one] for command [perform].
>> option one equals: null
>> option two equals: two 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the forge-dev mailing list