You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Sag <ds...@epo.org> on 2006/02/21 14:01:49 UTC

tests are running 3 times when i generate my site

For some reason as of today the unit tests in one of my projects are now 
running 3 times when i do mvn install site.

I declare the surefire plugin in my build as per normal and in my 
reporting as per normal so am not sure why this could be.

I also generate pmd, cobertura, findbugs and qalab reports - all that has 
changed is i now have cobertura working.  could the cobertura reporting 
plugin be running the tests again separately to surefire?

When the surefire report runs (this only runs once) i am now getting a 
'failure to parse file at 
[[snipped]]/surefire-reports/TEST-org.epo....FopTransformerTest.xml and 
sure enough when i look at that file it ends unexpectedly at <property 
value=" on line 4

but

if i mvn clean then mvn install, the tests run once and the xml file is 
okay.  if i then as a separate task run mvn site the tests still appear to 
run 3 times but the xml file remains uncorrupted.

so my questions.

1) why does surefire run the tests more than once.  surely the report 
should just take the results of the run from the build phase.
2) why does it make a difference if i run mvn clean install site vs mvn 
clean; mvn install; mvn site as three separate commands
3) is the interaction between the various common plugins documented 
anywhere?  for example cobertura is smart enough to tell surefire to run 
the tests against the instrumented classes behind the scenes, but this is 
not documented anywhere that I have seen. what other side effects might it 
have?


Kind regards,
Dave Sag 




 

Re: tests are running 3 times when i generate my site

Posted by David Sag <ds...@epo.org>.
Hi Brett,

I am well looking forward to that release.  Once 2.0.3 is out and 
Cobertura is out I hope I can turn off snapshots for a while as official 
policy here won't allow their use (understandably).

Kind regards,
Dave Sag 




 

"Brett Porter" <br...@gmail.com> wrote on 22-02-2006 23:10:03:

> On 2/22/06, David Sag <ds...@epo.org> wrote:
> >
> >
> > unfortunately cobertura is not working again as it now demands 
> maven 2.0.3to run and breaks my builds.
> 
> 
> Sorry, that was the only way to resolve the issue.
> 
> i was at home last night so had access to svn, checked out the latest 
maven2
> > from the trunk and built it and cobertura ran runs ok now when i go 
mvn site
> > I am now again getting the "the skin does not exist" error i had the 
other
> > day (but fixed by setting up the snapshot stuff in my setting.xml).
> 
> 
> I think the skins are stable. I will release them.
> 
> when i have something that works reliably, and still keeps working 
reliably
> > the following day, i'll happily put together a canonical example 
> pom.xmlfor you.  so far that's a pipe dream for me however.  using 
> maven 2 is a bit
> > like arm wrestling the blob.
> >
> 
> Sorry, but this is sometimes an unavoidable result of using nightly 
builds.
> There's a reason why they haven't been released yet :)
> 
> It seems like cobertura is pretty close now. I'll try and get it 
released
> after the Maven 2.0.3 release is finalised.
> 
> - Brett

Re: tests are running 3 times when i generate my site

Posted by Brett Porter <br...@gmail.com>.
On 2/22/06, David Sag <ds...@epo.org> wrote:
>
>
> unfortunately cobertura is not working again as it now demands maven 2.0.3to run and breaks my builds.


Sorry, that was the only way to resolve the issue.

i was at home last night so had access to svn, checked out the latest maven2
> from the trunk and built it and cobertura ran runs ok now when i go mvn site
> I am now again getting the "the skin does not exist" error i had the other
> day (but fixed by setting up the snapshot stuff in my setting.xml).


I think the skins are stable. I will release them.

when i have something that works reliably, and still keeps working reliably
> the following day, i'll happily put together a canonical example pom.xmlfor you.  so far that's a pipe dream for me however.  using maven 2 is a bit
> like arm wrestling the blob.
>

Sorry, but this is sometimes an unavoidable result of using nightly builds.
There's a reason why they haven't been released yet :)

It seems like cobertura is pretty close now. I'll try and get it released
after the Maven 2.0.3 release is finalised.

- Brett

Re: tests are running 3 times when i generate my site

Posted by David Sag <ds...@epo.org>.
unfortunately cobertura is not working again as it now demands maven 2.0.3 
to run and breaks my builds.

i was at home last night so had access to svn, checked out the latest 
maven2 from the trunk and built it and cobertura ran runs ok now when i go 
mvn site I am now again getting the "the skin does not exist" error i had 
the other day (but fixed by setting up the snapshot stuff in my 
setting.xml).

this is rather frustrating i must say.

when i have something that works reliably, and still keeps working 
reliably the following day, i'll happily put together a canonical example 
pom.xml for you.  so far that's a pipe dream for me however.  using maven 
2 is a bit like arm wrestling the blob.

Kind regards,
Dave Sag 




 

"Brett Porter" <br...@gmail.com> wrote on 21-02-2006 17:15:09:

> I previously sent a link to the repository manager. I use:
> 
> <reporting>
>   <plugins>
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>cobertura-maven-plugin</artifactId>
>     </plugin>
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>changelog-maven-plugin</artifactId>
>     </plugin>
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>taglist-maven-plugin</artifactId>
>     </plugin>
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>jxr-maven-plugin</artifactId>
>     </plugin>
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>surefire-report-maven-plugin</artifactId>
>     </plugin>
>     <plugin>
>       <artifactId>maven-javadoc-plugin</artifactId>
>     </plugin>
>     <plugin>
>       <artifactId>maven-pmd-plugin</artifactId>
>     </plugin>
>   </plugins>
> </reporting>
> 
> On 2/22/06, Wayne Fay <wa...@gmail.com> wrote:
> > Since we're on the subject of cobertura, could I ask one of you guys
> > to perhaps post your pom to the list? I had trouble getting cobertura
> > to run, must be doing something wrong. ;-)
> >
> > Especially interested in David's because I'm already running PMD &
> > Findbugs reports... Once I get cobertura working, then I'm happy to
> > assist as best I can in looking into why its running tests 3 times
> > etc. ;-)
> >
> > Wayne
> >
> >
> > On 2/21/06, Brett Porter <br...@gmail.com> wrote:
> > > I'm now seeing the tests run twice under cobertura (once 
> silently, which is
> > > a bit sneaky :) This is standalone, so that could be the reason for 
the
> > > corruption you get if it conflicts with the other run.
> > >
> > > As for cobertura and surefire report running tests again as part of 
the
> > > site, even after install - yes, that always happens. It's a 
> known issue that
> > > requires some optimizations in the Maven lifecycle.
> > >
> > > Plugins really don't interact directly. Everything is driven via the
> > > lifecycle bindings, with the project object holding any information 
that
> > > might change.
> > >
> > > - Brett
> > >
> > > On 2/22/06, David Sag <ds...@epo.org> wrote:
> > > >
> > > >
> > > > For some reason as of today the unit tests in one of my projects 
are now
> > > > running 3 times when i do mvn install site.
> > > >
> > > > I declare the surefire plugin in my build as per normal and in my
> > > > reporting as per normal so am not sure why this could be.
> > > >
> > > > I also generate pmd, cobertura, findbugs and qalab reports - 
> all that has
> > > > changed is i now have cobertura working.  could the cobertura 
reporting
> > > > plugin be running the tests again separately to surefire?
> > > >
> > > > When the surefire report runs (this only runs once) i am now 
getting a
> > > > 'failure to parse file at [[snipped]]/surefire-reports/TEST-
> > > > org.epo....FopTransformerTest.xml and sure enough when i look 
> at that file
> > > > it ends unexpectedly at <property value=" on line 4
> > > >
> > > > but
> > > >
> > > > if i mvn clean then mvn install, the tests run once and the xml 
file is
> > > > okay.  if i then as a separate task run mvn site the tests 
> still appear to
> > > > run 3 times but the xml file remains uncorrupted.
> > > >
> > > > so my questions.
> > > >
> > > > 1) why does surefire run the tests more than once.  surely the 
report
> > > > should just take the results of the run from the build phase.
> > > > 2) why does it make a difference if i run mvn clean install site 
vs mvn
> > > > clean; mvn install; mvn site as three separate commands
> > > > 3) is the interaction between the various common plugins 
documented
> > > > anywhere?  for example cobertura is smart enough to tell 
> surefire to run the
> > > > tests against the instrumented classes behind the scenes, but 
> this is not
> > > > documented anywhere that I have seen. what other side effects 
> might it have?
> > > >
> > > >
> > > > Kind regards,
> > > > Dave Sag
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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
> 

Re: tests are running 3 times when i generate my site

Posted by Brett Porter <br...@gmail.com>.
I previously sent a link to the repository manager. I use:

<reporting>
  <plugins>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>cobertura-maven-plugin</artifactId>
    </plugin>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>changelog-maven-plugin</artifactId>
    </plugin>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>taglist-maven-plugin</artifactId>
    </plugin>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>jxr-maven-plugin</artifactId>
    </plugin>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>surefire-report-maven-plugin</artifactId>
    </plugin>
    <plugin>
      <artifactId>maven-javadoc-plugin</artifactId>
    </plugin>
    <plugin>
      <artifactId>maven-pmd-plugin</artifactId>
    </plugin>
  </plugins>
</reporting>

On 2/22/06, Wayne Fay <wa...@gmail.com> wrote:
> Since we're on the subject of cobertura, could I ask one of you guys
> to perhaps post your pom to the list? I had trouble getting cobertura
> to run, must be doing something wrong. ;-)
>
> Especially interested in David's because I'm already running PMD &
> Findbugs reports... Once I get cobertura working, then I'm happy to
> assist as best I can in looking into why its running tests 3 times
> etc. ;-)
>
> Wayne
>
>
> On 2/21/06, Brett Porter <br...@gmail.com> wrote:
> > I'm now seeing the tests run twice under cobertura (once silently, which is
> > a bit sneaky :) This is standalone, so that could be the reason for the
> > corruption you get if it conflicts with the other run.
> >
> > As for cobertura and surefire report running tests again as part of the
> > site, even after install - yes, that always happens. It's a known issue that
> > requires some optimizations in the Maven lifecycle.
> >
> > Plugins really don't interact directly. Everything is driven via the
> > lifecycle bindings, with the project object holding any information that
> > might change.
> >
> > - Brett
> >
> > On 2/22/06, David Sag <ds...@epo.org> wrote:
> > >
> > >
> > > For some reason as of today the unit tests in one of my projects are now
> > > running 3 times when i do mvn install site.
> > >
> > > I declare the surefire plugin in my build as per normal and in my
> > > reporting as per normal so am not sure why this could be.
> > >
> > > I also generate pmd, cobertura, findbugs and qalab reports - all that has
> > > changed is i now have cobertura working.  could the cobertura reporting
> > > plugin be running the tests again separately to surefire?
> > >
> > > When the surefire report runs (this only runs once) i am now getting a
> > > 'failure to parse file at [[snipped]]/surefire-reports/TEST-
> > > org.epo....FopTransformerTest.xml and sure enough when i look at that file
> > > it ends unexpectedly at <property value=" on line 4
> > >
> > > but
> > >
> > > if i mvn clean then mvn install, the tests run once and the xml file is
> > > okay.  if i then as a separate task run mvn site the tests still appear to
> > > run 3 times but the xml file remains uncorrupted.
> > >
> > > so my questions.
> > >
> > > 1) why does surefire run the tests more than once.  surely the report
> > > should just take the results of the run from the build phase.
> > > 2) why does it make a difference if i run mvn clean install site vs mvn
> > > clean; mvn install; mvn site as three separate commands
> > > 3) is the interaction between the various common plugins documented
> > > anywhere?  for example cobertura is smart enough to tell surefire to run the
> > > tests against the instrumented classes behind the scenes, but this is not
> > > documented anywhere that I have seen. what other side effects might it have?
> > >
> > >
> > > Kind regards,
> > > Dave Sag
> > >
> > >
> > >
> > >
> > >
> >
> >
>
> ---------------------------------------------------------------------
> 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


Re: tests are running 3 times when i generate my site

Posted by Wayne Fay <wa...@gmail.com>.
Since we're on the subject of cobertura, could I ask one of you guys
to perhaps post your pom to the list? I had trouble getting cobertura
to run, must be doing something wrong. ;-)

Especially interested in David's because I'm already running PMD &
Findbugs reports... Once I get cobertura working, then I'm happy to
assist as best I can in looking into why its running tests 3 times
etc. ;-)

Wayne


On 2/21/06, Brett Porter <br...@gmail.com> wrote:
> I'm now seeing the tests run twice under cobertura (once silently, which is
> a bit sneaky :) This is standalone, so that could be the reason for the
> corruption you get if it conflicts with the other run.
>
> As for cobertura and surefire report running tests again as part of the
> site, even after install - yes, that always happens. It's a known issue that
> requires some optimizations in the Maven lifecycle.
>
> Plugins really don't interact directly. Everything is driven via the
> lifecycle bindings, with the project object holding any information that
> might change.
>
> - Brett
>
> On 2/22/06, David Sag <ds...@epo.org> wrote:
> >
> >
> > For some reason as of today the unit tests in one of my projects are now
> > running 3 times when i do mvn install site.
> >
> > I declare the surefire plugin in my build as per normal and in my
> > reporting as per normal so am not sure why this could be.
> >
> > I also generate pmd, cobertura, findbugs and qalab reports - all that has
> > changed is i now have cobertura working.  could the cobertura reporting
> > plugin be running the tests again separately to surefire?
> >
> > When the surefire report runs (this only runs once) i am now getting a
> > 'failure to parse file at [[snipped]]/surefire-reports/TEST-
> > org.epo....FopTransformerTest.xml and sure enough when i look at that file
> > it ends unexpectedly at <property value=" on line 4
> >
> > but
> >
> > if i mvn clean then mvn install, the tests run once and the xml file is
> > okay.  if i then as a separate task run mvn site the tests still appear to
> > run 3 times but the xml file remains uncorrupted.
> >
> > so my questions.
> >
> > 1) why does surefire run the tests more than once.  surely the report
> > should just take the results of the run from the build phase.
> > 2) why does it make a difference if i run mvn clean install site vs mvn
> > clean; mvn install; mvn site as three separate commands
> > 3) is the interaction between the various common plugins documented
> > anywhere?  for example cobertura is smart enough to tell surefire to run the
> > tests against the instrumented classes behind the scenes, but this is not
> > documented anywhere that I have seen. what other side effects might it have?
> >
> >
> > Kind regards,
> > Dave Sag
> >
> >
> >
> >
> >
>
>

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


Re: tests are running 3 times when i generate my site

Posted by Brett Porter <br...@gmail.com>.
I'm now seeing the tests run twice under cobertura (once silently, which is
a bit sneaky :) This is standalone, so that could be the reason for the
corruption you get if it conflicts with the other run.

As for cobertura and surefire report running tests again as part of the
site, even after install - yes, that always happens. It's a known issue that
requires some optimizations in the Maven lifecycle.

Plugins really don't interact directly. Everything is driven via the
lifecycle bindings, with the project object holding any information that
might change.

- Brett

On 2/22/06, David Sag <ds...@epo.org> wrote:
>
>
> For some reason as of today the unit tests in one of my projects are now
> running 3 times when i do mvn install site.
>
> I declare the surefire plugin in my build as per normal and in my
> reporting as per normal so am not sure why this could be.
>
> I also generate pmd, cobertura, findbugs and qalab reports - all that has
> changed is i now have cobertura working.  could the cobertura reporting
> plugin be running the tests again separately to surefire?
>
> When the surefire report runs (this only runs once) i am now getting a
> 'failure to parse file at [[snipped]]/surefire-reports/TEST-
> org.epo....FopTransformerTest.xml and sure enough when i look at that file
> it ends unexpectedly at <property value=" on line 4
>
> but
>
> if i mvn clean then mvn install, the tests run once and the xml file is
> okay.  if i then as a separate task run mvn site the tests still appear to
> run 3 times but the xml file remains uncorrupted.
>
> so my questions.
>
> 1) why does surefire run the tests more than once.  surely the report
> should just take the results of the run from the build phase.
> 2) why does it make a difference if i run mvn clean install site vs mvn
> clean; mvn install; mvn site as three separate commands
> 3) is the interaction between the various common plugins documented
> anywhere?  for example cobertura is smart enough to tell surefire to run the
> tests against the instrumented classes behind the scenes, but this is not
> documented anywhere that I have seen. what other side effects might it have?
>
>
> Kind regards,
> Dave Sag
>
>
>
>
>