You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alex Borchers <bo...@sdsc.edu> on 2005/02/16 21:44:05 UTC

OS-conditional report generation

I am new to Maven and would like some guidance as to how to best achieve
the following: I have a project that needs to be each compiled/tested on
osx, win, and linux platforms and the results published to a project web
site.  In searching these archives, I've determined how to detect the OS
within maven.xml, and would like to now use that information to specify
which reports get executed during site:generate on each platform.  What
I'm aiming for is to have all reports generated when site:generate is
run on linux, but on mac and windows, just have the junit report created
as junit-report-mac.html and junit-report-win.html.  If possible I'd
like to do something cleaner than create OS-specific cleans as a
post-goal (i.e. have only the reports generated as a function of the
OS).

Thank you.

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


Re: OS-conditional report generation

Posted by Eric Giguere <er...@videotron.ca>.
Hello Alex

Maybe creating a goal in your maven.xml that will "manually" register 
the reports you want to run instead of using the built-in mechanism 
offered by the <reports> tag in you project.xml?
Note that you still have to supply at least 1 report in the project.xml 
otherwise, default behavior of the xdoc plugin will fill the report list 
with a bunch of default report. I guess that registering your reports 
before the plugin gets invoke would also do the trick.

There is a registerReport tag in the doc taglib declared by the xdoc 
plugin that can be used to do so.

Hope it helps
Eric.

Alex Borchers wrote:

>I am new to Maven and would like some guidance as to how to best achieve
>the following: I have a project that needs to be each compiled/tested on
>osx, win, and linux platforms and the results published to a project web
>site.  In searching these archives, I've determined how to detect the OS
>within maven.xml, and would like to now use that information to specify
>which reports get executed during site:generate on each platform.  What
>I'm aiming for is to have all reports generated when site:generate is
>run on linux, but on mac and windows, just have the junit report created
>as junit-report-mac.html and junit-report-win.html.  If possible I'd
>like to do something cleaner than create OS-specific cleans as a
>post-goal (i.e. have only the reports generated as a function of the
>OS).
>
>Thank you.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>  
>


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