You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org> on 2012/08/18 22:03:21 UTC

[jira] (SUREFIRE-861) Overriding excludes in profile does not achieve desired result

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

Kristian Rosenvold updated SUREFIRE-861:
----------------------------------------

    Issue Type: Improvement  (was: Bug)
    
> Overriding excludes in profile does not achieve desired result
> --------------------------------------------------------------
>
>                 Key: SUREFIRE-861
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-861
>             Project: Maven Surefire
>          Issue Type: Improvement
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.12
>         Environment: Win 7 Java 6 u 30 64bit Mvn 3.0.4
>            Reporter: Karsten Tinnefeld
>            Priority: Minor
>
> Overriding excludes in a profile does not work, the override is simply ignored. This configuration should prevent surefire from running certain tests except when the profile run-integration-tests is set:
> <project ...>
> 	<build>
> 		<pluginManagement>
> 			<plugins>
> 				<plugin>
> 					<artifactId>maven-surefire-plugin</artifactId>
> 					<version>2.12</version>
> 					<configuration>
> 						<excludes>
> 							<exclude>**/*IntegrationTest.java</exclude>
> 						</excludes>
> 					</configuration>
> 				</plugin>
> 			</plugins>
> 		</pluginManagement>
> 	</build>
> 	<profiles>
> 		<profile>
> 			<id>run-integration-tests</id>
> 			<build>
> 				<pluginManagement>
> 					<plugins>
> 						<plugin>
> 							<artifactId>maven-surefire-plugin</artifactId>
> 							<configuration>
> 								<excludes />
> 							</configuration>
> 						</plugin>
> 					</plugins>
> 				</pluginManagement>
> 			</build>
> 		</profile>
> 	</profiles>
> </project>
> As a work-around, this ugly syntax can be applied:
> <project ...>
> 	<profiles>
> 		<profile>
> 			<id>run-integration-tests</id>
> 			<build>
> 				<pluginManagement>
> 					<plugins>
> 						<plugin>
> 							<artifactId>maven-surefire-plugin</artifactId>
> 							<configuration>
> 								<excludes>
> 								    <exclude>NONE</exclude>
> 								</excludes>
> 							</configuration>
> 						</plugin>
> 					</plugins>
> 				</pluginManagement>
> 			</build>
> 		</profile>
> 	</profiles>
> </project>
> However, I consider this a bug.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira