Here's the relevant issue in JIRA, which mentions the workaround you're using:
http://jira.codehaus.org/browse/MCOBERTURA-61

But if you are really using version 2.2 you shouldn't have to use the workaround.

Can you run 'mvn help:effective-pom' on you project and search the output for any "cobertura" references. Just to see what you really have configured.

Make sure that

Todd Wells wrote:
That was one of the things I tried before I emailed this list (and I just
tried it again after your email), but I still see the same symptoms in the
report -- it indicates coverage is 100%.  So far the only work-around I've
found is adding this to the pom along with the plugin info:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>net.sourceforge.cobertura.datafile</name>
                            <value>target/cobertura/cobertura.ser</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>



On 7/18/08 9:57 AM, "Dennis Lundberg" <[EMAIL PROTECTED]> wrote:

You need to specify the version for the Cobertura Plugin, if you haven't
done so already, like this

<project>
   ...
   <reporting>
     <plugins>
       ...
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>cobertura-maven-plugin</artifactId>
         <version>2.2</version>
       </plugin>
     </plugins>
   </reporting>
   ...
</project>


Todd Wells wrote:
Hi Dennis, I'm not sure what I'm using exactly -- how do I specify it?  I
tried just specifying a dependency for version 2.2 but I got the same
behavior, so I'm not sure if that's the right way or not.


On 7/18/08 8:30 AM, "Dennis Lundberg" <[EMAIL PROTECTED]> wrote:

Hi Todd

What version of the Cobertura plugin are you using?

I believe issues like the ones you describe, were fixed in version 2.2.

http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11226&styleName=H
tm
l&version=13090

Todd Wells wrote:
The cobertura:cobertura doesn¹t look for cobertura.ser in the place that it
puts it!
cobertura.ser is put in target/cobertura/cobertura.ser, but the reporting
phase of the mojo doesn¹t look there, so the report indicates 100%
coverage.

I can prove this by specifying the location manually like this:

 mvn clean cobertura:cobertura
-Dnet.sourceforge.cobertura.datafile=target/cobertura/cobertura.ser

When I specify it that way, the report is correct (not 100%).

However, we don¹t want to have to remember that long environment variable
every time.  So how can I configure the pom so that it looks in the right
place?  It seems silly that the mojo doesn¹t look for this in the right
place automatically.



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

    http://xircles.codehaus.org/manage_email





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

    http://xircles.codehaus.org/manage_email





--
Dennis Lundberg

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

   http://xircles.codehaus.org/manage_email


Reply via email to