You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Benjamin Bentmann <be...@udo.edu> on 2008/05/09 21:10:43 UTC

Pretty Printing in Generated Help Goal

Hi,

The help goal that gets generated by the Maven Plugin Tools 2.4 contains 
various internal utility methods (e.g. toLines()) that do some pretty 
printing of long descriptions at execution time of the help goal.

Any reason why we couldn't do all this line breaking and indentation stuff 
right beforehand when generating the source code for the help mojo?


Benjamin 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Pretty Printing in Generated Help Goal

Posted by Benjamin Bentmann <be...@udo.edu>.
Vincent Siveton wrote:

> Actually, end users could control the output with -Ddetail parameter,
> so why not the formatting ?

Well, alright.


Benjamin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Pretty Printing in Generated Help Goal

Posted by Vincent Siveton <vi...@gmail.com>.
2008/5/9, Benjamin Bentmann <be...@udo.edu>:
> Vincent Siveton wrote:
>
>
> > IIRC the main reason to have toLines() in the generated class is to
> > control the ouput, ie getting user configuration like max buffer or
> > indentation and providing the specific output.
> >
>
>  You mean to support something like this:
>
>   mvn foo:help -Dindent=4 -Dmax=120
>
>  Do I understand correctly? But is this really of practical interest?

Yep exactly

User prompts could be customized (ie other 80 char width) so I think
it could be a reasonable use case.

>  I could imagine that plugin developers would like to control these settings
>  when *generating* their help goal but will end-users ever care to control
>  the formatting when *invoking* the help goal? Just wondering.

Actually, end users could control the output with -Ddetail parameter,
so why not the formatting ?

Cheers,

Vincent

>
>  Benjamin
>
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>  For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Pretty Printing in Generated Help Goal

Posted by Benjamin Bentmann <be...@udo.edu>.
Vincent Siveton wrote:

> IIRC the main reason to have toLines() in the generated class is to
> control the ouput, ie getting user configuration like max buffer or
> indentation and providing the specific output.

You mean to support something like this:

  mvn foo:help -Dindent=4 -Dmax=120

Do I understand correctly? But is this really of practical interest?

I could imagine that plugin developers would like to control these settings
when *generating* their help goal but will end-users ever care to control
the formatting when *invoking* the help goal? Just wondering.


Benjamin


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Pretty Printing in Generated Help Goal

Posted by Vincent Siveton <vi...@gmail.com>.
Hi Benjamin,

2008/5/9, Benjamin Bentmann <be...@udo.edu>:
> Hi,
>
>  The help goal that gets generated by the Maven Plugin Tools 2.4 contains
> various internal utility methods (e.g. toLines()) that do some pretty
> printing of long descriptions at execution time of the help goal.
>
>  Any reason why we couldn't do all this line breaking and indentation stuff
> right beforehand when generating the source code for the help mojo?

IIRC the main reason to have toLines() in the generated class is to
control the ouput, ie getting user configuration like max buffer or
indentation and providing the specific output.

Cheers,

Vincent

>
>  Benjamin
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>  For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Pretty Printing in Generated Help Goal

Posted by Jason van Zyl <ja...@maven.org>.
On 9-May-08, at 12:10 PM, Benjamin Bentmann wrote:

> Hi,
>
> The help goal that gets generated by the Maven Plugin Tools 2.4  
> contains various internal utility methods (e.g. toLines()) that do  
> some pretty printing of long descriptions at execution time of the  
> help goal.
>
> Any reason why we couldn't do all this line breaking and indentation  
> stuff right beforehand when generating the source code for the help  
> mojo?
>

I don't see why not. Go for it.

>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
jason at sonatype dot com
----------------------------------------------------------

A party which is not afraid of letting culture,
business, and welfare go to ruin completely can
be omnipotent for a while.

-- Jakob Burckhardt 




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: Pretty Printing in Generated Help Goal

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
>BTW I tried help plugin on the javadoc plugin, which is a plugin with
>a ton of parameters,  and the build takes 2 seconds. IMHO it is a
>reasonable time...

Good point. If you're itching for stuff to fix, take a look at the
2.0.10 issues list ;-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Pretty Printing in Generated Help Goal

Posted by Vincent Siveton <vi...@gmail.com>.
Hi again,

2008/5/9, Benjamin Bentmann <be...@udo.edu>:
> Hi,
>
>  The help goal that gets generated by the Maven Plugin Tools 2.4 contains
> various internal utility methods (e.g. toLines()) that do some pretty
> printing of long descriptions at execution time of the help goal.

BTW I tried help plugin on the javadoc plugin, which is a plugin with
a ton of parameters,  and the build takes 2 seconds. IMHO it is a
reasonable time...

Cheers,

Vincent

>  Any reason why we couldn't do all this line breaking and indentation stuff
> right beforehand when generating the source code for the help mojo?
>
>
>  Benjamin
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>  For additional commands, e-mail: dev-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org