Pretty Printing in Generated Help Goal

View: New views
8 Messages — Rating Filter:   Alert me  

Pretty Printing in Generated Help Goal

by Benjamin Bentmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: dev-help@...


Re: Pretty Printing in Generated Help Goal

by Jason van Zyl-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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@...
> For additional commands, e-mail: dev-help@...
>

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@...
For additional commands, e-mail: dev-help@...


Re: Pretty Printing in Generated Help Goal

by Vincent Siveton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Benjamin,

2008/5/9, Benjamin Bentmann <benjamin.bentmann@...>:
> 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@...
>  For additional commands, e-mail: dev-help@...
>
>

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


Re: Pretty Printing in Generated Help Goal

by Benjamin Bentmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: dev-help@...


Re: Pretty Printing in Generated Help Goal

by Vincent Siveton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi again,

2008/5/9, Benjamin Bentmann <benjamin.bentmann@...>:
> 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@...
>  For additional commands, e-mail: dev-help@...
>
>

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


Re: Pretty Printing in Generated Help Goal

by Vincent Siveton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2008/5/9, Benjamin Bentmann <benjamin.bentmann@...>:

> 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@...
>  For additional commands, e-mail: dev-help@...
>
>

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


Re: Pretty Printing in Generated Help Goal

by Benjamin Bentmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: dev-help@...


RE: Pretty Printing in Generated Help Goal

by Brian E Fox :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


>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@...
For additional commands, e-mail: dev-help@...