Skip to content

Commit

Permalink
Fix build with JDK >= 20 when option -Dbytecode.version is not prov…
Browse files Browse the repository at this point in the history
…ided (#1605)
  • Loading branch information
Godin committed Apr 9, 2024
1 parent 337c80f commit 2f7f841
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 8 deletions.
29 changes: 28 additions & 1 deletion org.jacoco.build/pom.xml
Expand Up @@ -744,13 +744,40 @@
<profile>
<id>maven-jdk12</id>
<activation>
<jdk>[12,)</jdk>
<jdk>[12,20)</jdk>
</activation>
<properties>
<bytecode.version>7</bytecode.version>
</properties>
</profile>

<profile>
<!-- https://bugs.openjdk.org/browse/JDK-8173605 -->
<id>maven-jdk20</id>
<activation>
<jdk>[20,)</jdk>
</activation>
<properties>
<bytecode.version>8</bytecode.version>
</properties>
</profile>

<!--
Following profile is automatically activated in IntelliJ IDEA
and used to set the correct Java language level in it
-->
<profile>
<id>intellij</id>
<activation>
<property>
<name>idea.maven.embedder.version</name>
</property>
</activation>
<properties>
<bytecode.version>5</bytecode.version>
</properties>
</profile>

<!-- This profile enables use of JDK from Maven Toolchains -->
<profile>
<id>integration-tests</id>
Expand Down
18 changes: 14 additions & 4 deletions org.jacoco.core.test.validation.java7/pom.xml
Expand Up @@ -24,14 +24,24 @@

<name>JaCoCo :: Test :: Core :: Validation Java 7</name>

<properties>
<bytecode.version>7</bytecode.version>
</properties>

<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>org.jacoco.core.test</artifactId>
</dependency>
</dependencies>

<profiles>
<profile>
<id>intellij</id>
<activation>
<property>
<name>idea.maven.embedder.version</name>
</property>
</activation>
<properties>
<bytecode.version>7</bytecode.version>
</properties>
</profile>
</profiles>
</project>
6 changes: 3 additions & 3 deletions org.jacoco.doc/docroot/doc/build.html
Expand Up @@ -287,9 +287,9 @@ <h2>Compilation and testing with different JDKs</h2>
<td>7</td>
<td>7</td>
<td>7</td>
<td>7</td>
<td>7</td>
<td>7</td>
<td>8</td>
<td>8</td>
<td>8</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 2f7f841

Please sign in to comment.