Skip to content

Commit

Permalink
Add maven property scout.excludeTestCategories
Browse files Browse the repository at this point in the history
Maven property scout.excludeTestCategories allows to set excluded JUnit
test categories.
This additional property is required as not all tests depend on
platform.test module and therefore test category class may not be
available. If a test category class is not available maven surefire
cannot load JUnit test category classes and will fail. In later surefire
releases this would generate only a warning.

In a future scout release these test categories will be replaced by
JUnit 5 tags and then the build may be simplified.

Change-Id: I1a9d245a30b86b2845296f080d8ca65882fd16d9
  • Loading branch information
Ralph Steiner committed Apr 21, 2020
1 parent d56edb4 commit 13e51ed
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
15 changes: 15 additions & 0 deletions org.eclipse.scout.rt.mom.jms.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,19 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>${scout.excludeTestCategories}</excludedGroups>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
18 changes: 18 additions & 0 deletions org.eclipse.scout.rt.platform.test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>

<properties>
<surefire.excludedGroups>${scout.excludeTestCategories}</surefire.excludedGroups>
</properties>

<dependencies>
<!-- Build Dependencies -->
<dependency>
Expand Down Expand Up @@ -53,5 +57,19 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludedGroups>${scout.excludeTestCategories}</excludedGroups>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
2 changes: 2 additions & 0 deletions org.eclipse.scout.rt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
<sonar.exclusions>**/resources/WebContent/**</sonar.exclusions>
<sonar.coverage.exclusions>*.test/**,
**/resources/WebContent/**</sonar.coverage.exclusions>

<scout.excludeTestCategories/> <!-- may be set as a system property to disable test with test category (defined in platform.test) -->
</properties>

<dependencyManagement>
Expand Down

0 comments on commit 13e51ed

Please sign in to comment.