Skip to content

Commit 68cb1c7

Browse files
authored
Upgrading to OpenJDK 17 (#209)
1 parent 605ccc4 commit 68cb1c7

File tree

8 files changed

+68
-31
lines changed

8 files changed

+68
-31
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 2.1.9
2+
- Necessary changes to support OpenJDK 17
3+
14
## 2.1.8
25
- Uplifted eiffel-remrem-parent version to 2.0.10 to inherit the latest spring-boot version.
36

cli/pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<plugin>
109109
<groupId>org.apache.maven.plugins</groupId>
110110
<artifactId>maven-jar-plugin</artifactId>
111-
111+
<version>2.4</version>
112112
<configuration>
113113
<archive>
114114
<manifestEntries>

pom.xml

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
<parent>
77
<groupId>com.github.eiffel-community</groupId>
88
<artifactId>eiffel-remrem-parent</artifactId>
9-
<version>2.0.10</version>
9+
<version>2.0.11</version>
1010
</parent>
1111

1212
<properties>
13-
<eiffel-remrem-generate.version>2.1.8</eiffel-remrem-generate.version>
14-
<eiffel-remrem-semantics.version>2.2.4</eiffel-remrem-semantics.version>
13+
<eiffel-remrem-generate.version>2.1.9</eiffel-remrem-generate.version>
14+
<eiffel-remrem-semantics.version>2.2.5</eiffel-remrem-semantics.version>
1515
</properties>
1616
<artifactId>eiffel-remrem-generate</artifactId>
1717
<version>${eiffel-remrem-generate.version}</version>
1818
<packaging>pom</packaging>
19-
<dependencyManagement>
19+
<dependencyManagement>
2020
<dependencies>
2121
<dependency>
2222
<groupId>com.github.eiffel-community</groupId>
@@ -55,14 +55,14 @@
5555
<artifactId>maven-compiler-plugin</artifactId>
5656
<version>3.6.1</version>
5757
<configuration>
58-
<source>1.8</source>
59-
<target>1.8</target>
58+
<source>17</source>
59+
<target>17</target>
6060
</configuration>
6161
</plugin>
6262
<plugin>
6363
<groupId>org.jacoco</groupId>
6464
<artifactId>jacoco-maven-plugin</artifactId>
65-
<version>${jacoco-maven-plugin.version}</version>
65+
<version>${jacoco-maven-plugin.version}</version>
6666
<executions>
6767
<execution>
6868
<id>prepare-agent</id>

service/pom.xml

+28-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
<artifactId>eiffel-remrem-generate</artifactId>
99
<version>${eiffel-remrem-generate.version}</version>
1010
</parent>
11+
<properties>
12+
<start-class>com.ericsson.eiffel.remrem.generate</start-class>
13+
</properties>
1114
<artifactId>generate-service</artifactId>
1215
<packaging>war</packaging>
1316
<dependencies>
@@ -47,12 +50,22 @@
4750
</exclusion>
4851
</exclusions>
4952
</dependency>
53+
<dependency>
54+
<groupId>org.mockito</groupId>
55+
<artifactId>mockito-core</artifactId>
56+
<version>${mockito.version}</version>
57+
</dependency>
58+
<dependency>
59+
<groupId>org.mockito</groupId>
60+
<artifactId>mockito-inline</artifactId>
61+
<version>${mockito.version}</version>
62+
</dependency>
5063
<dependency>
5164
<groupId>org.springframework.security</groupId>
5265
<artifactId>spring-security-ldap</artifactId>
5366
</dependency>
5467
<dependency>
55-
<groupId>com.jayway.restassured</groupId>
68+
<groupId>io.rest-assured</groupId>
5669
<artifactId>rest-assured</artifactId>
5770
</dependency>
5871
<dependency>
@@ -91,16 +104,21 @@
91104
<groupId>org.springframework.boot</groupId>
92105
<artifactId>spring-boot</artifactId>
93106
</dependency>
107+
<dependency>
108+
<groupId>javax.servlet</groupId>
109+
<artifactId>javax.servlet-api</artifactId>
110+
<version>3.0.1</version>
111+
<scope>provided</scope>
112+
</dependency>
94113
</dependencies>
95114
<build>
96115
<plugins>
97116
<plugin>
98117
<groupId>org.springframework.boot</groupId>
99118
<artifactId>spring-boot-maven-plugin</artifactId>
100-
<version>${springboot.version}</version>
119+
<version>${springboot.version}</version>
101120
<configuration>
102121
<mainClass>com.ericsson.eiffel.remrem.generate.App</mainClass>
103-
<fork>true</fork>
104122
<skip>false</skip>
105123
</configuration>
106124
<executions>
@@ -114,6 +132,7 @@
114132
<plugin>
115133
<groupId>org.apache.maven.plugins</groupId>
116134
<artifactId>maven-war-plugin</artifactId>
135+
<version>3.3.1</version>
117136
<configuration>
118137
<archive>
119138
<manifestEntries>
@@ -131,6 +150,12 @@
131150
<groupId>org.apache.maven.plugins</groupId>
132151
<artifactId>maven-surefire-plugin</artifactId>
133152
<version>2.22.0</version>
153+
<configuration>
154+
<!-- Allow JUnit to access the test classes -->
155+
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
156+
<argLine>--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED</argLine>
157+
158+
</configuration>
134159
</plugin>
135160
<plugin>
136161
<groupId>org.apache.maven.plugins</groupId>

service/src/main/java/com/ericsson/eiffel/remrem/generate/App.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
import org.springframework.context.annotation.ComponentScan;
2626
import org.springframework.context.annotation.PropertySource;
2727

28-
@SpringBootApplication
29-
@ComponentScan("com.ericsson.eiffel.remrem")
28+
@SpringBootApplication(scanBasePackages = {"com.ericsson.eiffel.remrem", "com.ericsson.eiffel.remrem.semantics"})
3029
@EnableAutoConfiguration(exclude = { JacksonAutoConfiguration.class })
3130
@PropertySource(value = "file:${catalina.home}/conf/config.properties", ignoreResourceNotFound = true)
3231
public class App extends SpringBootServletInitializer {
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#This file is for reference only. Will not pick any values from this file.
22

3-
server.port=8080
3+
server.port: 8080
44

55
debug: false
66

7-
spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER
8-
9-
#Logging configurations
7+
spring.mvc.pathmatch.matching-strategy: ANT_PATH_MATCHER
108

9+
#Logging configurations
1110
logging.level.root: INFO
1211
logging.level.org.springframework.web: INFO
1312
logging.level.com.ericsson.eiffel.remrem.producer: INFO
@@ -16,19 +15,17 @@ logging.level.com.ericsson.eiffel.remrem.producer: INFO
1615
jasypt.encryptor.jasyptKeyFilePath: <The location of the key which was used to encrypt the password, used for decryption of the Encrypted passwords in application >
1716

1817
#Ldap authentication configurations
19-
20-
activedirectory.generate.enabled:false
21-
activedirectory.ldapUrl :
22-
#If the password is given in {ENC(<encrypted password>)} format, then file path for jasypt.key is necessary for decryption.
23-
activedirectory.managerPassword : {ENC(<encrypted password>)} or password
18+
activedirectory.generate.enabled: false
19+
activedirectory.ldapUrl:
20+
# If the password is given in {ENC(<encrypted password>)} format, then file path for jasypt.key is necessary for decryption.
21+
activedirectory.managerPassword: {ENC(<encrypted password>)} or password
2422
activedirectory.managerDn:
25-
activedirectory.rootDn :
23+
activedirectory.rootDn:
2624
activedirectory.userSearchFilter:
2725

28-
#Event Repository configurations
29-
30-
event-repository.enabled:false
31-
event-repository.url :http://<host>:<port>/<context-path-if-available>
26+
# Event Repository configurations
27+
event-repository.enabled: false
28+
event-repository.url: http://<host>:<port>/<context-path-if-available>
3229

3330
# lenientValidationEnabledToUsers true will perform the validation only on mandatory fields, non-mandatory validation failures add into Eiffel message as property remremGenerateFailures
3431
lenientValidationEnabledToUsers: false

service/src/test/java/com/ericsson/eiffel/remrem/generate/integrationtest/EiffelRemremControllerIT.java

+16-4
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,24 @@
1414
*/
1515
package com.ericsson.eiffel.remrem.generate.integrationtest;
1616

17+
import com.ericsson.eiffel.semantics.events.EiffelActivityFinishedEventMeta;
18+
import com.google.gson.Gson;
19+
import com.google.gson.GsonBuilder;
1720
import com.google.gson.JsonParser;
18-
import com.jayway.restassured.RestAssured;
1921

22+
import com.google.gson.ReflectionAccessFilter;
23+
import io.restassured.RestAssured;
2024
import org.apache.http.HttpStatus;
2125
import org.hamcrest.Matchers;
2226
import org.junit.Before;
2327
import org.junit.Test;
2428
import org.junit.runner.RunWith;
2529
import org.springframework.beans.factory.annotation.Value;
30+
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2631
import org.springframework.boot.test.context.SpringBootTest;
2732
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
2833
import org.springframework.test.context.ActiveProfiles;
29-
import org.springframework.test.context.junit4.SpringRunner;
34+
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
3035

3136
import java.io.File;
3237
import java.io.IOException;
@@ -39,14 +44,15 @@
3944
import java.util.jar.JarFile;
4045
import java.util.jar.Manifest;
4146

42-
import static com.jayway.restassured.RestAssured.given;
47+
import static io.restassured.RestAssured.given;
4348
import static org.junit.Assert.assertFalse;
4449
import static org.junit.Assert.assertNull;
4550
import static org.junit.Assert.assertTrue;
4651

4752
@ActiveProfiles("integration-test")
48-
@RunWith(SpringRunner.class)
53+
@RunWith(SpringJUnit4ClassRunner.class)
4954
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)
55+
@EnableAutoConfiguration
5056
public class EiffelRemremControllerIT {
5157
JsonParser parser = new JsonParser();
5258

@@ -183,6 +189,12 @@ public void testGetEventTypes() throws Exception {
183189
.body(Matchers.containsString("EiffelArtifactPublishedEvent"))
184190
.body(Matchers.containsString("EiffelActivityFinishedEvent"))
185191
.body(Matchers.containsString("EiffelActivityStartedEvent"));
192+
Object r = given()
193+
.header("Authorization", credentials)
194+
.when()
195+
.get("/event_types/eiffelsemantics")
196+
.then();
197+
r.toString();
186198
}
187199

188200
@Test
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mock-maker-inline

0 commit comments

Comments
 (0)