You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mirko Friedenhagen <mf...@gmail.com> on 2011/04/21 21:58:55 UTC
Aggregating cobertura reports in a multi module build with Maven 3.0.3
Hello,
I am trying to use cobertura 2.5 with Maven 3.0.3 and want it's
reports to be aggregated in a multi-module build What am I
doing wrong?
Looking at http://svn.codehaus.org/mojo/tags/cobertura-maven-plugin-2.5/src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java
it seems to me, that the cobertura goal should be invoked during the
test phase. Right now, when I invoke "mvn clean install site" IMO this
goal should be invoked automatically. But I do not see the html or xml
report in the modules. The output of "mvn clean install site" may be
found at http://pastebin.com/MrvWefeV, the source code for this was:
https://github.com/mfriedenhagen/multi-module-sample/commit/d25db3666b4f9388ca0879378b4917a89062323d
Thanks for your answers
A confused Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Aggregating cobertura reports in a multi module build with Maven 3.0.3
Posted by Mirko Friedenhagen <mf...@gmail.com>.
BTW: when invoking "mvn clean install cobertura:cobertura site" I do
see the aggregated report in the workspace
(http://huschteguzzel.de/hudson/job/test-multimodule/ws/target/site/cobertura/index.html
or http://huschteguzzel.de/hudson/job/test-multimodule/ws/core/target/site/cobertura/index.html),
however "site" will not pick this up correctly.
Regards
Mirko
On Thu, Apr 21, 2011 at 22:38, Mirko Friedenhagen
<mf...@gmail.com> wrote:
> I tried this as well (had a look in the integration test). I now put
> the report plugins into the reportPlugins-Element as suggested in
> https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html#Maven3.xandsiteplugin-NewConfiguration
> and enabled aggregation in a seperate section for the corbertura
> plugin as well, see:
> https://github.com/mfriedenhagen/multi-module-sample/commit/fd784cfdb1d4c7543e298b1bc7d22a7718a234d8,
> the output from this may be seen at:
> http://pastebin.com/raw.php?i=YE0DcfKk. What is strange IMO:
> - generation of the cobertura report is skipped and in the
> project-reports.html of the modules I see:
> <a href="index.html" title="Cobertura Test Coverage">Cobertura Test Coverage</a>
> So the "cobertura/" part seems to be missing.
>
> Regards
> Mirko
>
> On Thu, Apr 21, 2011 at 22:20, Benson Margulies <bi...@gmail.com> wrote:
>> From the integration test, I see this in the top-level pom.
>>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.codehaus.mojo</groupId>
>> <artifactId>cobertura-maven-plugin</artifactId>
>> <version>2.5</version>
>> <configuration>
>> <aggregate>true</aggregate>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>>
>>
>>
>> On Thu, Apr 21, 2011 at 3:58 PM, Mirko Friedenhagen
>> <mf...@gmail.com> wrote:
>>> Hello,
>>>
>>> I am trying to use cobertura 2.5 with Maven 3.0.3 and want it's
>>> reports to be aggregated in a multi-module build What am I
>>> doing wrong?
>>>
>>> Looking at http://svn.codehaus.org/mojo/tags/cobertura-maven-plugin-2.5/src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java
>>> it seems to me, that the cobertura goal should be invoked during the
>>> test phase. Right now, when I invoke "mvn clean install site" IMO this
>>> goal should be invoked automatically. But I do not see the html or xml
>>> report in the modules. The output of "mvn clean install site" may be
>>> found at http://pastebin.com/MrvWefeV, the source code for this was:
>>> https://github.com/mfriedenhagen/multi-module-sample/commit/d25db3666b4f9388ca0879378b4917a89062323d
>>>
>>> Thanks for your answers
>>> A confused Mirko
>>> --
>>> http://illegalstateexception.blogspot.com/
>>> https://github.com/mfriedenhagen/
>>> https://bitbucket.org/mfriedenhagen/
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>
>
>
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/
> https://bitbucket.org/mfriedenhagen/
>
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Aggregating cobertura reports in a multi module build with Maven 3.0.3
Posted by Mirko Friedenhagen <mf...@gmail.com>.
I tried this as well (had a look in the integration test). I now put
the report plugins into the reportPlugins-Element as suggested in
https://cwiki.apache.org/MAVEN/maven-3x-and-site-plugin.html#Maven3.xandsiteplugin-NewConfiguration
and enabled aggregation in a seperate section for the corbertura
plugin as well, see:
https://github.com/mfriedenhagen/multi-module-sample/commit/fd784cfdb1d4c7543e298b1bc7d22a7718a234d8,
the output from this may be seen at:
http://pastebin.com/raw.php?i=YE0DcfKk. What is strange IMO:
- generation of the cobertura report is skipped and in the
project-reports.html of the modules I see:
<a href="index.html" title="Cobertura Test Coverage">Cobertura Test Coverage</a>
So the "cobertura/" part seems to be missing.
Regards
Mirko
On Thu, Apr 21, 2011 at 22:20, Benson Margulies <bi...@gmail.com> wrote:
> From the integration test, I see this in the top-level pom.
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>cobertura-maven-plugin</artifactId>
> <version>2.5</version>
> <configuration>
> <aggregate>true</aggregate>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
>
>
> On Thu, Apr 21, 2011 at 3:58 PM, Mirko Friedenhagen
> <mf...@gmail.com> wrote:
>> Hello,
>>
>> I am trying to use cobertura 2.5 with Maven 3.0.3 and want it's
>> reports to be aggregated in a multi-module build What am I
>> doing wrong?
>>
>> Looking at http://svn.codehaus.org/mojo/tags/cobertura-maven-plugin-2.5/src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java
>> it seems to me, that the cobertura goal should be invoked during the
>> test phase. Right now, when I invoke "mvn clean install site" IMO this
>> goal should be invoked automatically. But I do not see the html or xml
>> report in the modules. The output of "mvn clean install site" may be
>> found at http://pastebin.com/MrvWefeV, the source code for this was:
>> https://github.com/mfriedenhagen/multi-module-sample/commit/d25db3666b4f9388ca0879378b4917a89062323d
>>
>> Thanks for your answers
>> A confused Mirko
>> --
>> http://illegalstateexception.blogspot.com/
>> https://github.com/mfriedenhagen/
>> https://bitbucket.org/mfriedenhagen/
>>
>> ---------------------------------------------------------------------
>> 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
>
>
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/
https://bitbucket.org/mfriedenhagen/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Aggregating cobertura reports in a multi module build with Maven 3.0.3
Posted by Benson Margulies <bi...@gmail.com>.
>From the integration test, I see this in the top-level pom.
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
</plugins>
</build>
On Thu, Apr 21, 2011 at 3:58 PM, Mirko Friedenhagen
<mf...@gmail.com> wrote:
> Hello,
>
> I am trying to use cobertura 2.5 with Maven 3.0.3 and want it's
> reports to be aggregated in a multi-module build What am I
> doing wrong?
>
> Looking at http://svn.codehaus.org/mojo/tags/cobertura-maven-plugin-2.5/src/main/java/org/codehaus/mojo/cobertura/CoberturaReportMojo.java
> it seems to me, that the cobertura goal should be invoked during the
> test phase. Right now, when I invoke "mvn clean install site" IMO this
> goal should be invoked automatically. But I do not see the html or xml
> report in the modules. The output of "mvn clean install site" may be
> found at http://pastebin.com/MrvWefeV, the source code for this was:
> https://github.com/mfriedenhagen/multi-module-sample/commit/d25db3666b4f9388ca0879378b4917a89062323d
>
> Thanks for your answers
> A confused Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/
> https://bitbucket.org/mfriedenhagen/
>
> ---------------------------------------------------------------------
> 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