maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benjamin Bentmann (JIRA)" <j...@codehaus.org>
Subject [jira] Closed: (SUREFIRE-503) Parent pom settings not overridden
Date Sun, 01 Aug 2010 12:33:32 GMT

     [ http://jira.codehaus.org/browse/SUREFIRE-503?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Benjamin Bentmann closed SUREFIRE-503.
--------------------------------------

    Resolution: Not A Bug
      Assignee: Benjamin Bentmann

This is a misconfiguration, duplicate plugin declarations are not allowed. The proper setup
for the parent POM and the child POM is:
{code:xml}
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
        <excludes>
          <exclude>**/*ITest.java</exclude>
        </excludes>
      </configuration>
      <executions>
        <execution>
          <id>surefire-it</id>
          <phase>integration-test</phase>
          <goals>
            <goal>test</goal>
          </goals>
          <configuration>
            <excludes>
              <exclude>none</exclude>
            </excludes>
            <includes>
              <include>**/*ITest.java</include>
            </includes>
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>
{code}
{code:xml}
<build>
  <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
        <excludes>
          <exclude>**/functest/**</exclude>
          <exclude>**/perftest/**</exclude>
        </excludes>
      </configuration>
      <executions>
        <execution>
          <id>surefire-it</id>
          <phase>integration-test</phase>
          <goals>
            <goal>test</goal>
          </goals>
          <configuration>
            <excludes>
              <exclude>none</exclude>
            </excludes>
            <includes>
              <include>**/functest/**</include>
              <include>**/perftest/**</include>
            </includes>
          </configuration>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>
{code}


> Parent pom settings not overridden
> ----------------------------------
>
>                 Key: SUREFIRE-503
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-503
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.4.2
>         Environment: Windows XP SP2, Maven 2.0.9
>            Reporter: Paul Grove
>            Assignee: Benjamin Bentmann
>
> In my team parent pom from which all projects inherit I have this in the pom
> {code:xml}
> <build>
>   <plugins>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-surefire-plugin</artifactId>
>       <configuration>
>         <excludes>
>           <exclude>**/*ITest.java</exclude>
>         </excludes>
>       </configuration>
>     </plugin>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-surefire-plugin</artifactId>
>       <executions>
>         <execution>
>           <id>surefire-it</id>
>           <phase>integration-test</phase>
>           <goals>
>             <goal>test</goal>
>           </goals>
>           <configuration>
>             <excludes>
>               <exclude>none</exclude>
>             </excludes>
>             <includes>
>               <include>**/*ITest.java</include>
>             </includes>
>           </configuration>
>         </execution>
>       </executions>
>     </plugin>
>   </plugins>
> </build>
> {code}
> In my project pom I was to add some more exclusions and inclusions so I added this
> {code:xml}
> <build>
>   <plugins>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-surefire-plugin</artifactId>
>       <configuration>
>         <excludes>
>           <exclude>**/functest/**</exclude>
>           <exclude>**/perftest/**</exclude>
>         </excludes>
>       </configuration>
>     </plugin>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-surefire-plugin</artifactId>
>       <executions>
>         <execution>
>           <id>surefire-it</id>
>           <phase>integration-test</phase>
>           <goals>
>             <goal>test</goal>
>           </goals>
>           <configuration>
>             <excludes>
>               <exclude>none</exclude>
>             </excludes>
>             <includes>
>               <include>**/functest/**</include>
>               <include>**/perftest/**</include>
>             </includes>
>           </configuration>
>         </execution>
>       </executions>
>     </plugin>
>   </plugins>
> </build>
> {code}
> But when I run mvn test all the tests in functest and perftest package still run. but
if I add the exclusions and inclusions to the team parent pom it works as expected so I am
a bit confused.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message