You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ta...@apache.org on 2016/05/19 08:54:03 UTC

svn commit: r1744537 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java

Author: taher
Date: Thu May 19 08:54:03 2016
New Revision: 1744537

URL: http://svn.apache.org/viewvc?rev=1744537&view=rev
Log:
improve the --test command documentation and widen commons-cli screen OFBIZ-6783

as suggested by Jacques, the commons-cli screen is widened to be
80 characters instead of the default 74 characters. Also the test
command for java -jar ofbiz.jar is improved in terms of documentation
so that it does not break off into a newline which was confusing

Modified:
    ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java

Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java?rev=1744537&r1=1744536&r2=1744537&view=diff
==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java Thu May 19 08:54:03 2016
@@ -123,7 +123,9 @@ public final class StartupCommandUtil {
                     + System.lineSeparator()
                     + "--test component=base --test case=somecase"
                     + System.lineSeparator()
-                    + "--test component=base --test suitename=somesuite")
+                    + "or"
+                    + System.lineSeparator()
+                    + "--test component=base --test suitename=xyz")
             .numberOfArgs(2)
             .valueSeparator('=')
             .optionalArg(true)
@@ -166,7 +168,7 @@ public final class StartupCommandUtil {
         HelpFormatter formatter = new HelpFormatter();
         formatter.printHelp(
                 new PrintWriter(printStream, true),
-                HelpFormatter.DEFAULT_WIDTH,
+                HelpFormatter.DEFAULT_WIDTH + 6,
                 "java -jar ofbiz.jar",
                 System.lineSeparator() + "Executes OFBiz command e.g. start, shutdown, check status, etc",
                 getOfbizStartupOptions(),



Re: svn commit: r1744537 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java

Posted by Taher Alkhateeb <sl...@gmail.com>.
Hi,

Nah not really worth it, and I worked hard to keep commons-cli completely
decoupled from ofbiz, I don't want to pass any specific parameters from
main for sure.

If someone adds new options in the future and the output looks wrong, then
everything can be fixed in one isolated place: StartupCommandUtil

Taher Alkhateeb
On May 19, 2016 3:48 PM, "Pierre Smits" <pi...@gmail.com> wrote:

Hi Taher,

Shouldn't the '+6' element in the
{code}
HelpFormatter.DEFAULT_WIDTH
{code}
code change be something that users want to configure?

Best regards,

Pierre Smits

ORRTIZ.COM <http://www.orrtiz.com>
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Thu, May 19, 2016 at 10:54 AM, <ta...@apache.org> wrote:

> Author: taher
> Date: Thu May 19 08:54:03 2016
> New Revision: 1744537
>
> URL: http://svn.apache.org/viewvc?rev=1744537&view=rev
> Log:
> improve the --test command documentation and widen commons-cli screen
> OFBIZ-6783
>
> as suggested by Jacques, the commons-cli screen is widened to be
> 80 characters instead of the default 74 characters. Also the test
> command for java -jar ofbiz.jar is improved in terms of documentation
> so that it does not break off into a newline which was confusing
>
> Modified:
>
>
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
>
> Modified:
>
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
> URL:
>
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java?rev=1744537&r1=1744536&r2=1744537&view=diff
>
>
==============================================================================
> ---
>
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
> (original)
> +++
>
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
> Thu May 19 08:54:03 2016
> @@ -123,7 +123,9 @@ public final class StartupCommandUtil {
>                      + System.lineSeparator()
>                      + "--test component=base --test case=somecase"
>                      + System.lineSeparator()
> -                    + "--test component=base --test suitename=somesuite")
> +                    + "or"
> +                    + System.lineSeparator()
> +                    + "--test component=base --test suitename=xyz")
>              .numberOfArgs(2)
>              .valueSeparator('=')
>              .optionalArg(true)
> @@ -166,7 +168,7 @@ public final class StartupCommandUtil {
>          HelpFormatter formatter = new HelpFormatter();
>          formatter.printHelp(
>                  new PrintWriter(printStream, true),
> -                HelpFormatter.DEFAULT_WIDTH,
> +                HelpFormatter.DEFAULT_WIDTH + 6,
>                  "java -jar ofbiz.jar",
>                  System.lineSeparator() + "Executes OFBiz command e.g.
> start, shutdown, check status, etc",
>                  getOfbizStartupOptions(),
>
>
>

Re: svn commit: r1744537 - /ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java

Posted by Pierre Smits <pi...@gmail.com>.
Hi Taher,

Shouldn't the '+6' element in the
{code}
HelpFormatter.DEFAULT_WIDTH
{code}
code change be something that users want to configure?

Best regards,

Pierre Smits

ORRTIZ.COM <http://www.orrtiz.com>
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Thu, May 19, 2016 at 10:54 AM, <ta...@apache.org> wrote:

> Author: taher
> Date: Thu May 19 08:54:03 2016
> New Revision: 1744537
>
> URL: http://svn.apache.org/viewvc?rev=1744537&view=rev
> Log:
> improve the --test command documentation and widen commons-cli screen
> OFBIZ-6783
>
> as suggested by Jacques, the commons-cli screen is widened to be
> 80 characters instead of the default 74 characters. Also the test
> command for java -jar ofbiz.jar is improved in terms of documentation
> so that it does not break off into a newline which was confusing
>
> Modified:
>
> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
>
> Modified:
> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
> URL:
> http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java?rev=1744537&r1=1744536&r2=1744537&view=diff
>
> ==============================================================================
> ---
> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
> (original)
> +++
> ofbiz/trunk/framework/start/src/org/ofbiz/base/start/StartupCommandUtil.java
> Thu May 19 08:54:03 2016
> @@ -123,7 +123,9 @@ public final class StartupCommandUtil {
>                      + System.lineSeparator()
>                      + "--test component=base --test case=somecase"
>                      + System.lineSeparator()
> -                    + "--test component=base --test suitename=somesuite")
> +                    + "or"
> +                    + System.lineSeparator()
> +                    + "--test component=base --test suitename=xyz")
>              .numberOfArgs(2)
>              .valueSeparator('=')
>              .optionalArg(true)
> @@ -166,7 +168,7 @@ public final class StartupCommandUtil {
>          HelpFormatter formatter = new HelpFormatter();
>          formatter.printHelp(
>                  new PrintWriter(printStream, true),
> -                HelpFormatter.DEFAULT_WIDTH,
> +                HelpFormatter.DEFAULT_WIDTH + 6,
>                  "java -jar ofbiz.jar",
>                  System.lineSeparator() + "Executes OFBiz command e.g.
> start, shutdown, check status, etc",
>                  getOfbizStartupOptions(),
>
>
>