]> source.dussan.org Git - aspectj.git/commitdiff
Deactivate test run in 'run-all-unit-tests' module by default
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Mon, 22 Mar 2021 19:22:08 +0000 (02:22 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Tue, 23 Mar 2021 10:03:16 +0000 (17:03 +0700)
There is a new Maven profile 'repeat-all-unit-tests', and the name
already implies what a comment in the Maven module explains like this:
ATTENTION: This profile is inactive by default, because when active and
running a full reactor build, it makes almost all tests run 2x, doubling
the build time without any added value. This Maven module only exists
for convenience: As a developer, your IDE can detect and run
'RunTheseBeforeYouCommitTests'. That way, you do not have to use Maven
and get the test results reported within the IDE's JUnit user interface.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
run-all-junit-tests/pom.xml

index 97347e3eb8846c4758411577c84ad2deadec1483..bcb21ca4e13d126ed6589e8f528e6907e7fb2ebf 100644 (file)
                </dependency>
        </dependencies>
 
+       <profiles>
+               <profile>
+                       <!--
+                               ATTENTION: This profile is inactive by default, because when active and running a full reactor build, it makes
+                               almost all tests run 2x, doubling the build time without any added value. This Maven module only exists for
+                               convenience: As a developer, your IDE can detect and run 'RunTheseBeforeYouCommitTests'. That way, you do not
+                               have to use Maven and get the test results reported within the IDE's JUnit user interface.
+                       -->
+                       <id>repeat-all-unit-tests</id>
+                       <activation>
+                               <activeByDefault>false</activeByDefault>
+                       </activation>
+                       <build>
+                               <plugins>
+                                       <plugin>
+                                               <groupId>org.apache.maven.plugins</groupId>
+                                               <artifactId>maven-surefire-plugin</artifactId>
+                                               <configuration>
+                                                       <testFailureIgnore>true</testFailureIgnore>
+                                               </configuration>
+                                               <executions>
+                                                       <execution>
+                                                               <id>extra-test-run</id>
+                                                               <phase>test</phase>
+                                                               <goals>
+                                                                       <goal>test</goal>
+                                                               </goals>
+                                                       </execution>
+                                               </executions>
+                                       </plugin>
+                               </plugins>
+                       </build>
+               </profile>
+       </profiles>
+
+       <build>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                               <configuration>
+                                       <testFailureIgnore>true</testFailureIgnore>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <id>default-test</id>
+                                               <!-- By default, do not run any tests -->
+                                               <phase>none</phase>
+                                               <goals>
+                                                       <goal>test</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
 
-       <!-- <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> 
-               <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.8</source> 
-               <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> 
-               <artifactId>maven-surefire-plugin</artifactId> <configuration> <testFailureIgnore>true</testFailureIgnore> 
-               <includes> <include>**/RunTheseBeforeYouCommitTests*</include> </includes> 
-               </configuration> </plugin> </plugins> </pluginManagement> </build> -->
 </project>