Skip to content

Commit 1e4eaf8

Browse files
committed
Upgrade build for Java 17 as base Java version
* Configure maven-enforcer-plugin to require Java 17 * Configure maven-enforcer-plugin to require maven 3.8+ as done in GeoServer. * Upgrade github actions workflows to use Java 17 * Remove cobertura-maven-plugin (modules/extension/xsd/**), as it is not compatible with Java 11 * Update maven-javadoc-plugin configuration to use legacyMode=true and not fail due to module-info.java not present. * Plugin version upgrades: * jacoco 0.8.7 -> 0.8.13 * maven-checkstyle-plugin 3.3.0 -> 3.6.0 * maven-compiler-plugin 3.11.0 -> 3.14.0 * maven-javadoc-plugin 3.6.3 -> 3.11.2 * Add .mvn/jvm.config with necessary --add-exports and --add-opens for internal jdk.compiler packages. This ensures that build-time tools and compiler plugins interacting with javac internals can function correctly under Java 17's module system. * Centralize maven plugin versions in the root pom's pluginManagement section.
1 parent 067a38c commit 1e4eaf8

File tree

80 files changed

+384
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+384
-343
lines changed

.github/workflows/azure-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
strategy:
2424
matrix:
25-
java-version: [ 11, 17, 21 ]
25+
java-version: [ 17, 21 ]
2626
steps:
2727
- uses: actions/checkout@v4
2828
- uses: actions/setup-java@v3
@@ -57,7 +57,7 @@ jobs:
5757
- uses: actions/setup-java@v3
5858
with:
5959
distribution: 'temurin'
60-
java-version: 11
60+
java-version: 17
6161
cache: 'maven'
6262

6363
- name: Tests against Azure

.github/workflows/integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- name: Set up JDK 11
19+
- name: Set up JDK 17
2020
uses: actions/setup-java@v3
2121
with:
22-
java-version: 11
22+
java-version: 17
2323
distribution: 'temurin'
2424
- uses: actions/checkout@v4
2525
- name: Maven repository caching

.github/workflows/linux.yml

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,6 @@ env:
1010
MAVEN_OPTS: -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.count=3 -Xmx512m -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS
1111

1212
jobs:
13-
openjdk11:
14-
runs-on: [ubuntu-22.04]
15-
steps:
16-
- uses: actions/checkout@v4
17-
- name: Set up JDK 11
18-
uses: actions/setup-java@v3
19-
with:
20-
java-version: 11
21-
distribution: 'temurin'
22-
- name: Maven repository caching
23-
uses: actions/cache@v3
24-
with:
25-
path: ~/.m2/repository
26-
key: gwc-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
27-
restore-keys: |
28-
${{ runner.os }}-maven-
29-
- name: Build with Maven
30-
run: mvn -B clean install -Dspotless.apply.skip=true -Dall -T2 --file geowebcache/pom.xml
31-
- name: Remove SNAPSHOT jars from repository
32-
run: |
33-
find .m2/repository -name "*SNAPSHOT*" -type d | xargs rm -rf {}
34-
3513
openjdk17:
3614
runs-on: [ubuntu-22.04]
3715
steps:
@@ -80,10 +58,10 @@ jobs:
8058
runs-on: [ubuntu-22.04]
8159
steps:
8260
- uses: actions/checkout@v4
83-
- name: Set up JDK 11
61+
- name: Set up JDK 17
8462
uses: actions/setup-java@v3
8563
with:
86-
java-version: 11
64+
java-version: 17
8765
distribution: 'temurin'
8866
- name: Maven repository caching
8967
uses: actions/cache@v3

.github/workflows/macos.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Set up JDK 11
16+
- name: Set up JDK 17
1717
uses: actions/setup-java@v3
1818
with:
19-
java-version: 11
19+
java-version: 17
2020
distribution: 'temurin'
2121
- name: Maven repository caching
2222
uses: actions/cache@v3

.github/workflows/windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Set up JDK 11
16+
- name: Set up JDK 17
1717
uses: actions/setup-java@v3
1818
with:
19-
java-version: 11
19+
java-version: 17
2020
distribution: 'temurin'
2121
- name: Maven repository caching
2222
uses: actions/cache@v3

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
*.settings
33
*.project
44
.factorypath
5+
.pmd
56
bin
67
target
78
.DS_Store

geowebcache/arcgiscache/src/main/java/org/geowebcache/arcgis/config/CacheInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public class CacheInfo {
7373

7474
private CacheStorageInfo cacheStorageInfo;
7575

76+
@SuppressWarnings("UnusedMethod") // required by serialization
7677
private Object readResolve() {
7778
if (cacheStorageInfo == null) {
7879
cacheStorageInfo = new CacheStorageInfo();

geowebcache/arcgiscache/src/main/java/org/geowebcache/arcgis/config/CacheStorageInfo.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class CacheStorageInfo {
4242

4343
private int packetSize;
4444

45+
@SuppressWarnings("UnusedMethod") // required by serialization
4546
private Object readResolve() {
4647
if (storageFormat == null) {
4748
storageFormat = EXPLODED_FORMAT_CODE;

geowebcache/arcgiscache/src/main/java/org/geowebcache/arcgis/layer/ArcGISCacheLayer.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ public class ArcGISCacheLayer extends AbstractTileLayer {
6565
* configuration properties
6666
*/
6767

68-
private Boolean enabled;
69-
7068
/** The location of the conf.xml tiling scheme configuration file */
7169
private File tilingScheme;
7270

@@ -100,16 +98,6 @@ public String getBlobStoreId() {
10098
return null;
10199
}
102100

103-
@Override
104-
public boolean isEnabled() {
105-
return enabled;
106-
}
107-
108-
@Override
109-
public void setEnabled(boolean enabled) {
110-
this.enabled = enabled;
111-
}
112-
113101
public File getTilingScheme() {
114102
return tilingScheme;
115103
}

geowebcache/arcgiscache/src/test/java/org/geowebcache/arcgis/config/CacheInfoPersisterTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void testLoadSpatialReference() {
4444
Assert.assertEquals(0.5, sr.getZOrigin(), 1e-6);
4545
Assert.assertEquals(1, sr.getZScale(), 1e-6);
4646
Assert.assertEquals(10000, sr.getMScale(), 1e-6);
47-
Assert.assertEquals(0.0037383177570093459, sr.getXYTolerance(), 1e-6);
47+
Assert.assertEquals(0.003738317757009346, sr.getXYTolerance(), 1e-6);
4848
Assert.assertEquals(2, sr.getZTolerance(), 1e-6);
4949
Assert.assertEquals(2, sr.getMTolerance(), 1e-6);
5050
Assert.assertTrue(sr.isHighPrecision());
@@ -131,7 +131,7 @@ public void testLoadTileImageInfo() {
131131
TileImageInfo tii = (TileImageInfo) xs.fromXML(new StringReader(tileImageInfo));
132132
Assert.assertNotNull(tii);
133133
Assert.assertEquals("JPEG", tii.getCacheTileFormat());
134-
Assert.assertEquals(80f, tii.getCompressionQuality(), 1e-6f);
134+
Assert.assertEquals(80f, tii.getCompressionQuality(), 0);
135135
Assert.assertTrue(tii.isAntialiasing());
136136
Assert.assertEquals(1, tii.getBandCount());
137137
Assert.assertEquals(0.0f, tii.getLERCError(), 0d);

0 commit comments

Comments
 (0)