Skip to content

Commit 8a82c58

Browse files
committed
GLSP-991: Switch Jenkins build to Java 17
-Remove direct dependency to javax.inject by switching to google.inject counterparts Due to the namespace switch from javax->jakarta with Java17 it's otherwise hard to maintain a build that works for both 11 and 17. -Remove `illegal-access=permit" flag from plugin configuration as it is no longer supported in Java17 -Update maven-shade plugin config to get rid of warnings -Introduce a new orthogonal Java11 compatibility build job that is triggered for every master commit Fixes eclipse-glsp/glsp#991
1 parent 56a1755 commit 8a82c58

5 files changed

Lines changed: 13 additions & 21 deletions

File tree

Jenkinsfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ pipeline {
22
agent any
33
tools {
44
maven 'apache-maven-latest'
5-
jdk 'openjdk-jdk11-latest'
5+
jdk 'openjdk-jdk17-latest'
66
}
77

88
environment {
@@ -74,6 +74,11 @@ pipeline {
7474
}
7575
}
7676
}
77+
stage('Trigger Java11 build') {
78+
steps {
79+
build wait: false, job: 'glsp-server-java11'
80+
}
81+
}
7782
}
7883
}
7984
}

examples/org.eclipse.glsp.example.workflow/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@
140140
<artifactSet>
141141
<excludes>
142142
<exclude>jakarta.websocket:jakarta.websocket-api</exclude>
143+
<exclude>javax.websocket:javax.websocket-api</exclude>
143144
<exclude>log4j:log4j</exclude>
144145
</excludes>
145146
</artifactSet>
@@ -151,6 +152,7 @@
151152
<exclude>META-INF/DEPENDENCIES</exclude>
152153
<exclude>META-INF/ECLIPSE_*</exclude>
153154
<exclude>META-INF/LICENSE*</exclude>
155+
<exclude>META-INF/services/javax.servlet.ServletContainerInitializer</exclude>
154156
<exclude>META-INF/services/jakarta.servlet.ServletContainerInitializer*</exclude>
155157
<exclude>META-INF/services/org.eclipse.jetty.webapp.Configuration*</exclude>
156158
<exclude>META-INF/services/org.eclipse.elk.core.data.ILayoutMetaDataProvider*</exclude>

plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/di/ClientId.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import java.lang.annotation.Retention;
2424
import java.lang.annotation.Target;
2525

26-
import javax.inject.Qualifier;
26+
import com.google.inject.BindingAnnotation;
2727

2828
/**
2929
* Helper annotation that is used for injecting the client id string into classes of diagram session (client session)
@@ -37,7 +37,7 @@
3737
* private String diagramType;
3838
* </pre>
3939
*/
40-
@Qualifier
4140
@Target({ FIELD, PARAMETER, METHOD })
4241
@Retention(RUNTIME)
42+
@BindingAnnotation
4343
public @interface ClientId {}

plugins/org.eclipse.glsp.server/src/org/eclipse/glsp/server/di/DiagramType.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/********************************************************************************
2-
* Copyright (c) 2021-2022 EclipseSource and others.
2+
* Copyright (c) 2021-2023 EclipseSource and others.
33
*
44
* This program and the accompanying materials are made available under the
55
* terms of the Eclipse Public License v. 2.0 which is available at
@@ -23,7 +23,7 @@
2323
import java.lang.annotation.Retention;
2424
import java.lang.annotation.Target;
2525

26-
import javax.inject.Qualifier;
26+
import com.google.inject.BindingAnnotation;
2727

2828
/**
2929
* Helper annotation that is used for injecting the diagram type string into classes of diagram session (client session)
@@ -38,7 +38,7 @@
3838
* </pre>
3939
*
4040
*/
41-
@Qualifier
4241
@Target({ FIELD, PARAMETER, METHOD })
4342
@Retention(RUNTIME)
43+
@BindingAnnotation
4444
public @interface DiagramType {}

pom.xml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -297,11 +297,6 @@
297297
<groupId>org.apache.maven.plugins</groupId>
298298
<artifactId>maven-source-plugin</artifactId>
299299
<version>${maven.source.version}</version>
300-
<configuration>
301-
<argLine>
302-
--illegal-access=permit
303-
</argLine>
304-
</configuration>
305300
<executions>
306301
<execution>
307302
<id>attach-sources</id>
@@ -316,21 +311,11 @@
316311
<groupId>org.apache.maven.plugins</groupId>
317312
<artifactId>maven-surefire-plugin</artifactId>
318313
<version>${maven.surefire.version}</version>
319-
<configuration>
320-
<argLine>
321-
--illegal-access=permit
322-
</argLine>
323-
</configuration>
324314
</plugin>
325315
<plugin>
326316
<groupId>org.apache.maven.plugins</groupId>
327317
<artifactId>maven-failsafe-plugin</artifactId>
328318
<version>${maven.failsafe.version}</version>
329-
<configuration>
330-
<argLine>
331-
--illegal-access=permit
332-
</argLine>
333-
</configuration>
334319
</plugin>
335320
<!-- to disable use -Dcheckstyle.skip -->
336321
<plugin>

0 commit comments

Comments
 (0)