maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Raja Arokia" <raro...@upromise.com>
Subject FW: Surefire plugin - Tests running twice
Date Tue, 07 Nov 2006 17:01:34 GMT
Hi,

 

I have an application where surefire-plugin is configured in the parent
pom and child pom, I am giving the code sample below, This results in
tests running twice, if I comment the surefire plugin in the parent pom,
the tests run only once.

 

But I don't want to comment surefire plugin in the parent pom  since
there are various other child modules dependent on that and those tests
will not run, an alternative approach would be that we can write the
surefire plugin in each of the child modules but we want to avoid the
code duplication.

 

Can any one check the sample and tell me if any change can be done to
the configuration to avoid this.

 

Configuration in Parent pom.xml

 

<plugin>

                        <artifactId>maven-surefire-plugin</artifactId>

                        <configuration>

 
<reportsDirectory>../reportsdirectory</reportsDirectory>

                              <excludes>

                                    <exclude>

 
**/JTAManagedTransactionContextTest.java

                                    </exclude>

                              </excludes>

                              <systemProperties>

                                    ...

                              </systemProperties>

                        </configuration>

                  </plugin>

 

Configuration in Child pom.xml

 

<plugin>

                        <artifactId>maven-surefire-plugin</artifactId>

                        <configuration>

                        <skip>true</skip>

                        <testFailureIgnore>true</testFailureIgnore>


                        <systemProperties>

...                   

                          </systemProperties>

                        </configuration>

                        <executions>

                              <execution>

                              <id>unit-test</id>

                                    <phase>test</phase>

                                    <goals>

                                          <goal>test</goal>

                                    </goals>

                                    <configuration>

                                   <skip>false</skip> 

                                          <includes>

                                           <include>

                                              **/*UTest.java

                                           </include>

                                          </includes>


                                    </configuration>

                              </execution>                        

                              <execution>

                              <id>integration-test</id>

                                    <phase>integration-test</phase>

                                    <goals>

                                          <goal>test</goal>

                                    </goals>

                                    <configuration>

                                   <skip>false</skip> 

                                          <includes>

                                           <include>

                                              **/*ITest.java

                                           </include>

                                          </includes>


                                    </configuration>

                              </execution>

                        </executions>

                  </plugin>  

 

Thanks,

 

Raja

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message