[ 
http://jira.codehaus.org/browse/MTAGLIST-29?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_121205
 ] 

Benjamin Bentmann commented on MTAGLIST-29:
-------------------------------------------

bq. I think this patch is a great idea
Don't forget to vote for the things you like...

bq. how do users know that this is the normal operation of the outputDirectory 
configuration?
I started to fill in issues for some other plugins to improve their 
documentation for this parameter since I believe a proper documentation right 
at the report mojo configuration is a good place to reach the end user. Also 
online is another request-for-doc-improvement to the "Mini Site Guide" 
(MNG-3369).

bq. Would each plugin need this same patch for its outputDirectory 
documentation?
Depends on the plugin. I have also seen plugins that annotate this parameter 
with [EMAIL PROTECTED] thereby hiding it from the user for configuration.

bq. The "outputDirectory" member variable and plugin documentation is moved to 
AbstractMavenReport
That's seems a little bit too hard, i.e. this would dictate not only some 
implementation details but also the configuration for every report plugin, 
eliminating the possibility for variations. Take for example the [javadoc 
mojo|http://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html]. 
Its {{outputDirectory}} points by default into a subdirectory of the root site 
directory and has (naturally) a Javadoc related documentation for this 
parameter. Realizing this if the {{outputDirectory}} field is inherited from a 
superclass would require to hide/shadow the inherited field and honestly I do 
not want to try out whether Maven/Plexus handles this still correctly (it has 
already enough error potential).

bq. During the site phase, create a log (warning or info) that the 
outputDirectory parameter is being ignored.
Surely not for every report mojo being run ;-) Maybe once per site run but 
wouldn't this message quickly become boilerplate messing up the console output? 
I mean the message would only indicate normal operation and is not related to a 
specific project, hence it seems to have similar value as "Hi, this is Maven, 
I'm fine, how are you?"

> Fix handling of output directory
> --------------------------------
>
>                 Key: MTAGLIST-29
>                 URL: http://jira.codehaus.org/browse/MTAGLIST-29
>             Project: Maven 2.x Taglist Plugin
>          Issue Type: Bug
>    Affects Versions: 2.1
>            Reporter: Benjamin Bentmann
>         Attachments: directory-handling.patch
>
>
> As for the outpuDirectory parameter:
> - its type should be File instead of String (see also [Common 
> Bugs|http://www.nabble.com/Common-Bugs-to14783703s177.html])
> - it should NEVER be queried by the mojo. It may be used by the user to 
> specify the output path if the mojo is run standalone but during a site 
> build, the site plugin sets the output directory via 
> MavenReport.setReportOutputDirectory(). For this reason, 
> MavenReport.getReportOutputDirectory() should be called to access the 
> EFFECTIVE output directory. AbstractMavenReport will return the original 
> outputDirectory parameter value (by calling getOutputDirectory()) if the mojo 
> is called standalone.
> - the expression "${project.reporting.outputDirectory}" should be used 
> instead of the hard-coded "${project.build.directory}/site"
> - there is no need to create the output directory in the mojo, it's done when 
> setting up the Sink for the report

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to