You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Emmanuel Bourg (JIRA)" <ji...@apache.org> on 2008/07/30 18:23:31 UTC

[jira] Created: (CLI-167) Support options like Java memory settings (-Xmx512M)

Support options like Java memory settings (-Xmx512M)
----------------------------------------------------

                 Key: CLI-167
                 URL: https://issues.apache.org/jira/browse/CLI-167
             Project: Commons CLI
          Issue Type: Improvement
          Components: Parser
            Reporter: Emmanuel Bourg
            Priority: Minor
             Fix For: 1.3


This is a RFE to implement the java memory setting style of option, that is a single hyphen with a long option name and a value immediately after.

For example: -Xmx512M

{code}
public void testJavaMemorySettings() throws Exception {
    Options options = new Options();
    options.addOption(OptionBuilder.withLongOpt("Xmx").create("Xmx"));

    Parser parser = new GnuParser();
    CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });

    assertTrue(cl.hasOption("Xmx"));
    assertEquals("512M", cl.getOptionValue("Xmx"));
}
{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CLI-167) Support options like Java memory settings (-Xmx512M)

Posted by "Emmanuel Bourg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLI-167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg resolved CLI-167.
--------------------------------

    Resolution: Fixed

Implemented in the new parser.

> Support options like Java memory settings (-Xmx512M)
> ----------------------------------------------------
>
>                 Key: CLI-167
>                 URL: https://issues.apache.org/jira/browse/CLI-167
>             Project: Commons CLI
>          Issue Type: Improvement
>          Components: Parser
>            Reporter: Emmanuel Bourg
>            Assignee: Emmanuel Bourg
>            Priority: Minor
>             Fix For: 1.3
>
>
> This is a RFE to implement the java memory setting style of option, that is a single hyphen with a long option name and a value immediately after.
> For example: -Xmx512M
> {code}
> public void testJavaMemorySettings() throws Exception {
>     Options options = new Options();
>     options.addOption(OptionBuilder.withLongOpt("Xmx").hasArg().create("Xmx"));
>     Parser parser = new GnuParser();
>     CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });
>     assertTrue(cl.hasOption("Xmx"));
>     assertEquals("512M", cl.getOptionValue("Xmx"));
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CLI-167) Support options like Java memory settings (-Xmx512M)

Posted by "Emmanuel Bourg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CLI-167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Bourg updated CLI-167:
-------------------------------

    Description: 
This is a RFE to implement the java memory setting style of option, that is a single hyphen with a long option name and a value immediately after.

For example: -Xmx512M

{code}
public void testJavaMemorySettings() throws Exception {
    Options options = new Options();
    options.addOption(OptionBuilder.withLongOpt("Xmx").hasArg().create("Xmx"));

    Parser parser = new GnuParser();
    CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });

    assertTrue(cl.hasOption("Xmx"));
    assertEquals("512M", cl.getOptionValue("Xmx"));
}
{code}

  was:
This is a RFE to implement the java memory setting style of option, that is a single hyphen with a long option name and a value immediately after.

For example: -Xmx512M

{code}
public void testJavaMemorySettings() throws Exception {
    Options options = new Options();
    options.addOption(OptionBuilder.withLongOpt("Xmx").create("Xmx"));

    Parser parser = new GnuParser();
    CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });

    assertTrue(cl.hasOption("Xmx"));
    assertEquals("512M", cl.getOptionValue("Xmx"));
}
{code}


> Support options like Java memory settings (-Xmx512M)
> ----------------------------------------------------
>
>                 Key: CLI-167
>                 URL: https://issues.apache.org/jira/browse/CLI-167
>             Project: Commons CLI
>          Issue Type: Improvement
>          Components: Parser
>            Reporter: Emmanuel Bourg
>            Assignee: Emmanuel Bourg
>            Priority: Minor
>             Fix For: 1.3
>
>
> This is a RFE to implement the java memory setting style of option, that is a single hyphen with a long option name and a value immediately after.
> For example: -Xmx512M
> {code}
> public void testJavaMemorySettings() throws Exception {
>     Options options = new Options();
>     options.addOption(OptionBuilder.withLongOpt("Xmx").hasArg().create("Xmx"));
>     Parser parser = new GnuParser();
>     CommandLine cl = parser.parse(options, new  String[] { "-Xmx512M" });
>     assertTrue(cl.hasOption("Xmx"));
>     assertEquals("512M", cl.getOptionValue("Xmx"));
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.