Skip to content

Commit

Permalink
GLSP-991: Switch Jenkins build to Java 17 (#201)
Browse files Browse the repository at this point in the history
-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
  • Loading branch information
tortmayr committed May 8, 2023
1 parent 56a1755 commit fffccca
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 21 deletions.
7 changes: 6 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pipeline {
agent any
tools {
maven 'apache-maven-latest'
jdk 'openjdk-jdk11-latest'
jdk 'openjdk-jdk17-latest'
}

environment {
Expand Down Expand Up @@ -74,6 +74,11 @@ pipeline {
}
}
}
stage('Trigger Java11 build') {
steps {
build wait: false, job: 'glsp-server-java11'
}
}
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions examples/org.eclipse.glsp.example.workflow/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
<artifactSet>
<excludes>
<exclude>jakarta.websocket:jakarta.websocket-api</exclude>
<exclude>javax.websocket:javax.websocket-api</exclude>
<exclude>log4j:log4j</exclude>
</excludes>
</artifactSet>
Expand All @@ -151,6 +152,7 @@
<exclude>META-INF/DEPENDENCIES</exclude>
<exclude>META-INF/ECLIPSE_*</exclude>
<exclude>META-INF/LICENSE*</exclude>
<exclude>META-INF/services/javax.servlet.ServletContainerInitializer</exclude>
<exclude>META-INF/services/jakarta.servlet.ServletContainerInitializer*</exclude>
<exclude>META-INF/services/org.eclipse.jetty.webapp.Configuration*</exclude>
<exclude>META-INF/services/org.eclipse.elk.core.data.ILayoutMetaDataProvider*</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.inject.Qualifier;
import com.google.inject.BindingAnnotation;

/**
* Helper annotation that is used for injecting the client id string into classes of diagram session (client session)
Expand All @@ -37,7 +37,7 @@
* private String diagramType;
* </pre>
*/
@Qualifier
@Target({ FIELD, PARAMETER, METHOD })
@Retention(RUNTIME)
@BindingAnnotation
public @interface ClientId {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (c) 2021-2022 EclipseSource and others.
* Copyright (c) 2021-2023 EclipseSource and others.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -23,7 +23,7 @@
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.inject.Qualifier;
import com.google.inject.BindingAnnotation;

/**
* Helper annotation that is used for injecting the diagram type string into classes of diagram session (client session)
Expand All @@ -38,7 +38,7 @@
* </pre>
*
*/
@Qualifier
@Target({ FIELD, PARAMETER, METHOD })
@Retention(RUNTIME)
@BindingAnnotation
public @interface DiagramType {}
15 changes: 0 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven.source.version}</version>
<configuration>
<argLine>
--illegal-access=permit
</argLine>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -316,21 +311,11 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
<configuration>
<argLine>
--illegal-access=permit
</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven.failsafe.version}</version>
<configuration>
<argLine>
--illegal-access=permit
</argLine>
</configuration>
</plugin>
<!-- to disable use -Dcheckstyle.skip -->
<plugin>
Expand Down

0 comments on commit fffccca

Please sign in to comment.