Skip to content

Commit 568ef10

Browse files
committed
Added support for Java Modules
1 parent f6f54fb commit 568ef10

3 files changed

Lines changed: 47 additions & 5 deletions

File tree

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os: [ ubuntu-latest, macos-latest, windows-latest ]
16-
java: [ '8', '11', '17', '21' ]
16+
java: [ '11', '17', '21' ]
1717

1818
steps:
1919
- uses: actions/checkout@v4

pom.xml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
</distributionManagement>
5050

5151
<properties>
52-
<!-- project properties -->
53-
<version.java>1.8</version.java>
5452
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5553

5654
<!-- dependency properties -->
@@ -178,9 +176,28 @@
178176
<groupId>org.apache.maven.plugins</groupId>
179177
<artifactId>maven-compiler-plugin</artifactId>
180178
<version>${version.maven-compiler-plugin}</version>
179+
<executions>
180+
<execution>
181+
<id>default-compile</id>
182+
</execution>
183+
<execution>
184+
<id>java8-compile</id>
185+
<goals>
186+
<goal>compile</goal>
187+
</goals>
188+
<!-- recompile everything with Java 8 except the module-info.java -->
189+
<configuration>
190+
<release>8</release>
191+
<excludes>
192+
<exclude>module-info.java</exclude>
193+
</excludes>
194+
</configuration>
195+
</execution>
196+
</executions>
181197
<configuration>
182-
<source>${version.java}</source>
183-
<target>${version.java}</target>
198+
<release>11</release>
199+
<source>11</source>
200+
<target>11</target>
184201
</configuration>
185202
</plugin>
186203

@@ -222,6 +239,7 @@
222239
<artifactId>maven-surefire-plugin</artifactId>
223240
<version>${version.maven-surefire-plugin}</version>
224241
<configuration>
242+
<useModulePath>false</useModulePath>
225243
<includes>
226244
<include>%regex[.*Should.*]</include>
227245
</includes>

src/main/java/module-info.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright 2019 Thunderberry.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
module nl.altindag.ssl {
17+
18+
requires transitive org.slf4j;
19+
requires transitive ch.qos.logback.classic;
20+
requires transitive jul.to.slf4j;
21+
requires transitive java.logging;
22+
requires transitive org.apache.logging.log4j.to.slf4j;
23+
24+
}

0 commit comments

Comments
 (0)