maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arūnas Vasmanas (JIRA) <j...@apache.org>
Subject [jira] [Updated] (SUREFIRE-1180) Does not overrides include/exclude using -Dtest property
Date Mon, 21 Sep 2015 13:08:04 GMT

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

Arūnas Vasmanas updated SUREFIRE-1180:
--------------------------------------
    Affects Version/s: 2.12
                       2.12.1
                       2.12.2
                       2.12.3
                       2.12.4
                       2.13
                       2.14
                       2.14.1
                       2.15
                       2.16
                       2.17
                       2.18
                       2.18.1
          Description: 
Does not run test using -Dtest example:
mvn verify -Dtest=**/*DemoTest.java -DfailIfNoTests=false -Pe2e-test

if enable in pom.xml <include>${test}</include> line so test would run.
It seems that -Dtest property does not overrides <include>

Works on 2.11 version.

Added pom.xml example:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.1</modelVersion>
	<groupId>com.demo</groupId>
	<artifactId>demo</artifactId>
	<packaging>jar</packaging>
	<version>1.0-SNAPSHOT</version>
	<name>demo-app</name>
	<url>http://maven.apache.org</url>
	
	<dependencies>
	   <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
				<scope>test</scope>
            </dependency>
	</dependencies>
	
	<properties>
		      <surefire-output>${project.build.directory}/surefire-reports</surefire-output>
		      <test>**/*</test>
	</properties>

	<build>
		
		
	<pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>

	  <plugin>
	  <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.18.1</version>
      </plugin>
	  <plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>2.18.1</version>
					 <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
				</plugin>
	  </plugins>
	</pluginManagement>
	
		
	</build>
	
	<profiles>
			<profile>
			<id>e2e-test</id>
		    <activation>
				<property>
					<name>e2e</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<!-- Separates the unit tests from the integration tests. -->
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
					
							<!--
								Skip the default running of this plug-in (or everything is run
								twice...see below)
							-->
							<skip>true</skip>
							<!-- Show 100% of the lines from the stack trace (doesn't work) -->
							<trimStackTrace>false</trimStackTrace>
						</configuration>
						<executions>
							<execution>
								<id>e2e-test</id>
								<phase>integration-test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<!--
										Never skip running the tests when the integration-test phase
										is invoked
									-->
									<skip>false</skip>
									<reportsDirectory>${surefire-output}</reportsDirectory>
									<includes>
										<!-- Include integration tests within integration-test phase. -->
										
<!-- 										<include>${test}</include> -->
								
									</includes>
								
								</configuration>
							</execution>
						</executions>
					</plugin>
					
				</plugins>
			</build>
		</profile>
	</profiles>

</project>

{code}

  was:
Does not run test using -Dtest example:
mvn verify -Dtest=**/*DemoTest.java -DfailIfNoTests=false -Pe2e-test

if enable in pom.xml <include>${test}</include> line so test would run.
Added pom.xml example

{code}
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.1</modelVersion>
	<groupId>com.demo</groupId>
	<artifactId>demo</artifactId>
	<packaging>jar</packaging>
	<version>1.0-SNAPSHOT</version>
	<name>demo-app</name>
	<url>http://maven.apache.org</url>
	
	<dependencies>
	   <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
				<scope>test</scope>
            </dependency>
	</dependencies>
	
	<properties>
		      <surefire-output>${project.build.directory}/surefire-reports</surefire-output>
		      <test>**/*</test>
	</properties>

	<build>
		
		
	<pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>

	  <plugin>
	  <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.18.1</version>
      </plugin>
	  <plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>2.18.1</version>
					 <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
				</plugin>
	  </plugins>
	</pluginManagement>
	
		
	</build>
	
	<profiles>
			<profile>
			<id>e2e-test</id>
		    <activation>
				<property>
					<name>e2e</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<!-- Separates the unit tests from the integration tests. -->
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
					
							<!--
								Skip the default running of this plug-in (or everything is run
								twice...see below)
							-->
							<skip>true</skip>
							<!-- Show 100% of the lines from the stack trace (doesn't work) -->
							<trimStackTrace>false</trimStackTrace>
						</configuration>
						<executions>
							<execution>
								<id>e2e-test</id>
								<phase>integration-test</phase>
								<goals>
									<goal>test</goal>
								</goals>
								<configuration>
									<!--
										Never skip running the tests when the integration-test phase
										is invoked
									-->
									<skip>false</skip>
									<reportsDirectory>${surefire-output}</reportsDirectory>
									<includes>
										<!-- Include integration tests within integration-test phase. -->
										
<!-- 										<include>${test}</include> -->
								
									</includes>
								
								</configuration>
							</execution>
						</executions>
					</plugin>
					
				</plugins>
			</build>
		</profile>
	</profiles>

</project>

{code}

          Component/s: Maven Surefire Plugin

> Does not overrides include/exclude using -Dtest property
> --------------------------------------------------------
>
>                 Key: SUREFIRE-1180
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1180
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.12, 2.12.1, 2.12.2, 2.12.3, 2.12.4, 2.13, 2.14, 2.14.1, 2.15,
2.16, 2.17, 2.18, 2.18.1
>            Reporter: Arūnas Vasmanas
>
> Does not run test using -Dtest example:
> mvn verify -Dtest=**/*DemoTest.java -DfailIfNoTests=false -Pe2e-test
> if enable in pom.xml <include>${test}</include> line so test would run.
> It seems that -Dtest property does not overrides <include>
> Works on 2.11 version.
> Added pom.xml example:
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> 	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> 	<modelVersion>4.0.1</modelVersion>
> 	<groupId>com.demo</groupId>
> 	<artifactId>demo</artifactId>
> 	<packaging>jar</packaging>
> 	<version>1.0-SNAPSHOT</version>
> 	<name>demo-app</name>
> 	<url>http://maven.apache.org</url>
> 	
> 	<dependencies>
> 	   <dependency>
>                 <groupId>junit</groupId>
>                 <artifactId>junit</artifactId>
>                 <version>4.11</version>
> 				<scope>test</scope>
>             </dependency>
> 	</dependencies>
> 	
> 	<properties>
> 		      <surefire-output>${project.build.directory}/surefire-reports</surefire-output>
> 		      <test>**/*</test>
> 	</properties>
> 	<build>
> 		
> 		
> 	<pluginManagement>
> 		<plugins>
> 			<plugin>
> 				<groupId>org.apache.maven.plugins</groupId>
> 				<artifactId>maven-compiler-plugin</artifactId>
> 				<version>2.3.2</version>
> 				<configuration>
> 					<source>1.7</source>
> 					<target>1.7</target>
> 				</configuration>
> 			</plugin>
> 	  <plugin>
> 	  <groupId>org.apache.maven.plugins</groupId>
>                     <artifactId>maven-surefire-plugin</artifactId>
>                     <version>2.18.1</version>
>       </plugin>
> 	  <plugin>
> 					<groupId>org.apache.maven.plugins</groupId>
> 					<artifactId>maven-failsafe-plugin</artifactId>
> 					<version>2.18.1</version>
> 					 <executions>
>           <execution>
>             <goals>
>               <goal>integration-test</goal>
>               <goal>verify</goal>
>             </goals>
>           </execution>
>         </executions>
> 				</plugin>
> 	  </plugins>
> 	</pluginManagement>
> 	
> 		
> 	</build>
> 	
> 	<profiles>
> 			<profile>
> 			<id>e2e-test</id>
> 		    <activation>
> 				<property>
> 					<name>e2e</name>
> 				</property>
> 			</activation>
> 			<build>
> 				<plugins>
> 					<plugin>
> 						<!-- Separates the unit tests from the integration tests. -->
> 						<groupId>org.apache.maven.plugins</groupId>
> 						<artifactId>maven-surefire-plugin</artifactId>
> 						<configuration>
> 					
> 							<!--
> 								Skip the default running of this plug-in (or everything is run
> 								twice...see below)
> 							-->
> 							<skip>true</skip>
> 							<!-- Show 100% of the lines from the stack trace (doesn't work) -->
> 							<trimStackTrace>false</trimStackTrace>
> 						</configuration>
> 						<executions>
> 							<execution>
> 								<id>e2e-test</id>
> 								<phase>integration-test</phase>
> 								<goals>
> 									<goal>test</goal>
> 								</goals>
> 								<configuration>
> 									<!--
> 										Never skip running the tests when the integration-test phase
> 										is invoked
> 									-->
> 									<skip>false</skip>
> 									<reportsDirectory>${surefire-output}</reportsDirectory>
> 									<includes>
> 										<!-- Include integration tests within integration-test phase. -->
> 										
> <!-- 										<include>${test}</include> -->
> 								
> 									</includes>
> 								
> 								</configuration>
> 							</execution>
> 						</executions>
> 					</plugin>
> 					
> 				</plugins>
> 			</build>
> 		</profile>
> 	</profiles>
> </project>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message