works like a charm...thanks
-----Original Message-----
From: Eric Giguere [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 17, 2005 1:11 PM
To: Maven Users List
Subject: Re: OS-conditional report generation
Hey Alex!
Ok, I lead you in the wrong direction, well, partially.
The tag cannot be used by itself :(, was not designed after all to be
used like this. The problem is that the pom object is the one holding
the list of reports to be genrated and then based on this list, the
registers are called.
Made it work a little differently :).
Take a look:
In project.xml:
<reports/> (or nothing at all is ok too tried it and it works).
In your maven.xml
<preGoal name="xdoc:register-reports">
<echo message="registering my reports..."/>
<j:expr value="${pom.addReport('maven-javadoc-plugin');}"/>
<j:expr value="${pom.addReport('maven-checkstyle-plugin');}"/>
</preGoal>
This works perfectly here with Maven 1.0. I guess it also will with
other more recent version.
Eric.
Alex Borchers wrote:
>Hi Eric,
>
>In trying to implement your suggestion, from <reports> in project.xml
>I've eliminated all but maven-junit-report-plugin and created a new
goal
>in maven.xml. I've searched the archives but have been figure out the
>syntax to manually register reports with the xdoc plug-in via its
>registerReports tag. Here is the relevant section from the maven.xml
>(in this case register the checkstyle report if OS is Linux):
>
><goal name="regReports">
> <j:when test="${systemScope['os.name'].startsWith('Linux')}">
> [register checkstyle report here....]
> </j:when>
></goal>
>
>Thanks so much,
>
>Alex
>
>
>-----Original Message-----
>From: Eric Giguere [mailto:[EMAIL PROTECTED]
>Sent: Thursday, February 17, 2005 5:55 AM
>To: Maven Users List
>Subject: Re: OS-conditional report generation
>
>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: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]