Yes, please attach to JIRA. I'll reopen it.

http://jira.codehaus.org/browse/MCOBERTURA-20

Stefan Hedtfeld wrote:
> Hm, it's only a simple project to toy with new maven features and
> plugins which I started from scratch. I'll try to explain it, if I fail
> please let me know - is it ok to add a zipped project to the jira issue
> then (I haven't done that before)?
> 
> My main project's pom does not contain any reporting - the tag is simply
> missing. I have two subprojects (one for the core classes, one for the
> webapp's classes), both poms contain the following reporting tags:
> 
>   <reporting>
>     <plugins>
>       <!-- JavaDoc report -->
>       <plugin>
>         <artifactId>maven-javadoc-plugin</artifactId>
>       </plugin>
>       <!-- X-Ref report -->
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>jxr-maven-plugin</artifactId>
>       </plugin>
>       <!-- Unit test results report -->
>       <plugin>
>         <artifactId>maven-surefire-plugin</artifactId>
>       </plugin>
>       <!-- Test coverage -->
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>cobertura-maven-plugin</artifactId>
>       </plugin>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>  
>         <artifactId>maven-pmd-plugin</artifactId>
>         <configuration>
>           <targetjdk>1.5</targetjdk>
>           <rulesets>
>             <ruleset>/rulesets/basic.xml</ruleset>
>             <ruleset>/rulesets/controversial.xml</ruleset>
>           </rulesets>
>           <format>xml</format>
>           <linkXref>true</linkXref>
>           <sourceEncoding>utf-8</sourceEncoding>
>           <minimumTokens>100</minimumTokens>
>         </configuration>
>       </plugin>
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>taglist-maven-plugin</artifactId>
>       </plugin>
>     </plugins>
>   </reporting>
> 
> I would have expected cobertura directories to be created in
> <main>/core/target/site and <main>/webapp/target/site (when running "mvn
> site" from <main>). It works fine when running from <main>/core or
> <main>/webapp.
> 
> If this helps: I'm running on SuSE 10 amd64.
> 
> Regards,
> 
> Stefan.
> 
> Brett Porter schrieb:
>> I can't reproduce this issue. Do you have a project you can attach to
>> the JIRA issue about it?
>>
>> - Brett
>>
>> Stefan Hedtfeld wrote:
>>   
>>> Hi,
>>>
>>> though mvn 2.0.3 has not been released yet I started playing with one of
>>> the RC-builds. Within a single project the plugin works fine, but using
>>> it in a multiproject environment the reports get generated in the main
>>> projects target dir (<main>/target/site/cobertura/) - and this of course
>>> has the side effect that
>>> a) in the subprojects the links to the reports are not working and
>>> b) you only get on report - if you have two subprojects with tests the
>>> last one wins.
>>>
>>> Is this due to some bug in maven or is this a plugin issue?
>>>
>>> Another thing is that you can't place the report plugin in the main
>>> projects pom as the plugin only works if there are tests available. My
>>> personal opinion is that while it's ok that you can't use the plugin in
>>> the main project the plugin should not fail if no tests are available -
>>> I would like to have a "blank multi-project" directory struture without
>>> any classes which should not fail to build.
>>>
>>> Regards,
>>>
>>> Stefan.
> 

Reply via email to