Skip to content

Commit 7e6ec52

Browse files
committed
Fix JDK used in CI tests
1 parent c81262a commit 7e6ec52

File tree

3 files changed

+35
-57
lines changed

3 files changed

+35
-57
lines changed

log4j-api-java9/pom.xml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@
8989
<groupId>org.apache.maven.plugins</groupId>
9090
<artifactId>maven-surefire-plugin</artifactId>
9191
<executions>
92+
<!-- Uses a different id than `default-test` to ignore the `java8-tests` profile -->
9293
<execution>
93-
<id>test</id>
94+
<id>run-tests</id>
9495
<goals>
9596
<goal>test</goal>
9697
</goals>
@@ -100,29 +101,4 @@
100101
</plugins>
101102
</build>
102103

103-
<profiles>
104-
<profile>
105-
<id>java8-tests</id>
106-
<activation>
107-
<property>
108-
<name>env.CI</name>
109-
<value>true</value>
110-
</property>
111-
</activation>
112-
<build>
113-
<plugins>
114-
<plugin>
115-
<groupId>org.apache.maven.plugins</groupId>
116-
<artifactId>maven-surefire-plugin</artifactId>
117-
<configuration combine.self="override">
118-
<reuseForks>false</reuseForks>
119-
<systemPropertyVariables>
120-
<java.awt.headless>true</java.awt.headless>
121-
</systemPropertyVariables>
122-
</configuration>
123-
</plugin>
124-
</plugins>
125-
</build>
126-
</profile>
127-
</profiles>
128104
</project>

log4j-jpl/pom.xml

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -65,30 +65,26 @@
6565
</dependency>
6666
</dependencies>
6767

68-
<profiles>
69-
<profile>
70-
<id>java8-tests</id>
71-
<activation>
72-
<property>
73-
<name>env.CI</name>
74-
<value>true</value>
75-
</property>
76-
</activation>
77-
<build>
78-
<plugins>
79-
<plugin>
80-
<groupId>org.apache.maven.plugins</groupId>
81-
<artifactId>maven-surefire-plugin</artifactId>
82-
<configuration combine.self="override">
83-
<reuseForks>false</reuseForks>
84-
<systemPropertyVariables>
85-
<java.awt.headless>true</java.awt.headless>
86-
</systemPropertyVariables>
87-
<useModulePath>false</useModulePath>
88-
</configuration>
89-
</plugin>
90-
</plugins>
91-
</build>
92-
</profile>
93-
</profiles>
68+
<build>
69+
<plugins>
70+
<plugin>
71+
<groupId>org.apache.maven.plugins</groupId>
72+
<artifactId>maven-surefire-plugin</artifactId>
73+
<executions>
74+
<!-- Uses a different id than `default-test` to ignore the `java8-tests` profile -->
75+
<execution>
76+
<id>run-tests</id>
77+
<goals>
78+
<goal>test</goal>
79+
</goals>
80+
</execution>
81+
<execution>
82+
<id>default-test</id>
83+
<phase>none</phase>
84+
</execution>
85+
</executions>
86+
</plugin>
87+
</plugins>
88+
</build>
89+
9490
</project>

pom.xml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -825,11 +825,17 @@
825825
<plugin>
826826
<groupId>org.apache.maven.plugins</groupId>
827827
<artifactId>maven-surefire-plugin</artifactId>
828-
<configuration>
829-
<jdkToolchain>
830-
<version>[1.8, 9)</version>
831-
</jdkToolchain>
832-
</configuration>
828+
<executions>
829+
<!-- Modifies only the `default-test` run -->
830+
<execution>
831+
<id>default-test</id>
832+
<configuration>
833+
<jdkToolchain>
834+
<version>[1.8, 9)</version>
835+
</jdkToolchain>
836+
</configuration>
837+
</execution>
838+
</executions>
833839
</plugin>
834840
</plugins>
835841
</build>

0 commit comments

Comments
 (0)