Marat Radchenko (JIRA) wrote:
[ http://jira.codehaus.org/browse/SUREFIRE-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113289 ]
Marat Radchenko commented on SUREFIRE-351:
------------------------------------------

This is not a bug. Instead, use the following:

{code:xml}
<plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
        <executions>
          <execution>
            <id>it</id>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <skip>false</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
{code}

P.S. duplicate declarations of the same plugin isn't a good idea.
I run to a similar problem also the other day, maybe duplicate declarations should be warned-out by maven in the future (a check during parsing for duplicates and a message stating the duplicated plugin)

maven-surefire-plugin's <skip/> parameter isn't getting set correctly
---------------------------------------------------------------------

                Key: SUREFIRE-351
                URL: http://jira.codehaus.org/browse/SUREFIRE-351
            Project: Maven Surefire
         Issue Type: Bug
         Components: plugin
   Affects Versions: 2.3
        Environment: Maven version: 2.0.7
Java version: 1.5.0_10
OS name: "linux" version: "2.6.18-4-686" arch: "i386"
           Reporter: Tom Cort
            Fix For: 2.3.1

        Attachments: output.txt


I'm trying to get maven-surefire-plugin to skip the unit tests during the 
'test' phase and run them during the 'integration-test' phase. I was successful 
in getting the plugin to skip tests during the 'test' phase and to execute 
during the 'integration-test' phase, but even if I set skip to false the tests 
are still skipped during the 'integration-test' phase. Here is the relevant 
part of my pom.xml:
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.3</version>
        <configuration>
          <skip>false</skip>
        </configuration>
        <executions>
          <execution>
            <id>it</id>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <skip>false</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
I'm attaching the full output of "mvn -e -X clean install" You'll notice that 
even though the 'it' execution has skip set to false in pom.xml, it says
[DEBUG]   (f) skip = true
and
[INFO] [surefire:test {execution: it}]
[INFO] Tests are skipped.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to