Hi,

 

I have 2 surefire "executions" in my POM file, one for the test phase and
one for the integration test phase. What I would like to do is to be able to
skip running the tests for either of the two "executions" from the command
line by passing a system property. The problem is passing
-Dmaven.test.skip=true will skip the main execution and not the child
executions. I know I can do this in the POM file but as I said I would like
to be able to do so from the command line. Is it possible to pass the id of
the execution, like this: -Dmaven.test.{execution_id}.skip=true?

 

I have the following in my POM:

 

      </plugin>

                  <plugin>

                        <groupId>org.apache.maven.plugins</groupId>

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

                        <configuration>

                              <forkMode>none</forkMode>

                              <childDelegation>true</childDelegation>

                              <skip>true</skip>

                        </configuration>

                        <executions>

                              <execution>

                                    <id>test-phase</id>

                                    <phase>test</phase>

                                    <goals>

                                          <goal>test</goal>

                                    </goals>

                                    <configuration>

                                          <skip>false</skip>

                                          <excludes>

 
<exclude>**/selenium/**</exclude>

                                          </excludes>

                                    </configuration>

                              </execution>

                              <execution>

                                    <id>integration-test-phase</id>

                                    <phase>integration-test</phase>

                                    <goals>

                                          <goal>test</goal>

                                    </goals>

                                    <configuration>

                                          <skip>false</skip>

                                          <includes>

 
<include>**/AllTestsSuite.java</include>

                                          </includes>

                                    </configuration>

                              </execution>

                        </executions>

                  </plugin>

 

Thanks

 


Bashar

 

Reply via email to