You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Patrick O'shea <po...@epo.org> on 2005/11/22 09:33:10 UTC

[m2] tests running twice

Hi,

I've added config for the surefire plugin below,  to add a system property 
needed for testing.
If i run the tests (mvn test) all the tests are run twice, 
The first time it doesn't pass the system property and the second time it 
does.
How can I stop it running all the tests the first time ?

thanks in advance,
Patrick 

<plugin>
      <groupId>org.apache.maven.plugins</groupId> 
          <artifactId>maven-surefire-plugin</artifactId> 
          <version>2.0</version> 
                 <executions>
                <execution>
                <id>test-classes</id>
                              <phase>test</phase>
                <configuration> 
                        <systemProperties>
                                <property>
 <name>net.sourceforge.cobertura.datafile</name>
                                        <value>C:\cobertura.ser</value>    
 
                                   </property>
                         </systemProperties> 
                       </configuration>
                        <goals>
                                <goal>test</goal>
                        </goals>
                        </execution> 
        </executions>
</plugin> 



Re: [m2] tests running twice

Posted by Patrick O'shea <po...@epo.org>.
thanks Nik,  that worked.
Patrick 
 



Nik Gonzalez <ng...@exist.com> 
22-11-2005 10:10
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
Maven Users List <us...@maven.apache.org>
cc

Subject
Re: [m2] tests running twice






Hi,

Try bringing the configuration tag out from the executions tag.  Then, 
delete the executions tag... You'll have something that looks like the ff:

<plugin>
      <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.0</version>
                <configuration>
                        <systemProperties>
                                <property>
 <name>net.sourceforge.cobertura.datafile</name>
                                        <value>C:\cobertura.ser</value> 
 
                                   </property>
                         </systemProperties>
                       </configuration>

</plugin>

hth,
 Nik
Patrick O'shea wrote:

>Hi,
>
>I've added config for the surefire plugin below,  to add a system 
property 
>needed for testing.
>If i run the tests (mvn test) all the tests are run twice, 
>The first time it doesn't pass the system property and the second time it 

>does.
>How can I stop it running all the tests the first time ?
>
>thanks in advance,
>Patrick 
>
><plugin>
>      <groupId>org.apache.maven.plugins</groupId> 
>          <artifactId>maven-surefire-plugin</artifactId> 
>          <version>2.0</version> 
>                 <executions>
>                <execution>
>                <id>test-classes</id>
>                              <phase>test</phase>
>                <configuration> 
>                        <systemProperties>
>                                <property>
> <name>net.sourceforge.cobertura.datafile</name>
>                                        <value>C:\cobertura.ser</value>  
> 
>                                   </property>
>                         </systemProperties> 
>                       </configuration>
>                        <goals>
>                                <goal>test</goal>
>                        </goals>
>                        </execution> 
>        </executions>
></plugin> 
>
>
>
> 
>


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



Re: [m2] tests running twice

Posted by Nik Gonzalez <ng...@exist.com>.
Hi,

Try bringing the configuration tag out from the executions tag.  Then, 
delete the executions tag... You'll have something that looks like the ff:

<plugin>
      <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.0</version>
                <configuration>
                        <systemProperties>
                                <property>
 <name>net.sourceforge.cobertura.datafile</name>
                                        <value>C:\cobertura.ser</value>   
 
                                   </property>
                         </systemProperties>
                       </configuration>

</plugin>

hth,
 Nik
Patrick O'shea wrote:

>Hi,
>
>I've added config for the surefire plugin below,  to add a system property 
>needed for testing.
>If i run the tests (mvn test) all the tests are run twice, 
>The first time it doesn't pass the system property and the second time it 
>does.
>How can I stop it running all the tests the first time ?
>
>thanks in advance,
>Patrick 
>
><plugin>
>      <groupId>org.apache.maven.plugins</groupId> 
>          <artifactId>maven-surefire-plugin</artifactId> 
>          <version>2.0</version> 
>                 <executions>
>                <execution>
>                <id>test-classes</id>
>                              <phase>test</phase>
>                <configuration> 
>                        <systemProperties>
>                                <property>
> <name>net.sourceforge.cobertura.datafile</name>
>                                        <value>C:\cobertura.ser</value>    
> 
>                                   </property>
>                         </systemProperties> 
>                       </configuration>
>                        <goals>
>                                <goal>test</goal>
>                        </goals>
>                        </execution> 
>        </executions>
></plugin> 
>
>
>
>  
>


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