Skip to content

Commit

Permalink
Upgrading to OpenJDK 17 (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
z-sztrom authored Jun 12, 2023
1 parent 605ccc4 commit 68cb1c7
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 31 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2.1.9
- Necessary changes to support OpenJDK 17

## 2.1.8
- Uplifted eiffel-remrem-parent version to 2.0.10 to inherit the latest spring-boot version.

Expand Down
2 changes: 1 addition & 1 deletion cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifestEntries>
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<parent>
<groupId>com.github.eiffel-community</groupId>
<artifactId>eiffel-remrem-parent</artifactId>
<version>2.0.10</version>
<version>2.0.11</version>
</parent>

<properties>
<eiffel-remrem-generate.version>2.1.8</eiffel-remrem-generate.version>
<eiffel-remrem-semantics.version>2.2.4</eiffel-remrem-semantics.version>
<eiffel-remrem-generate.version>2.1.9</eiffel-remrem-generate.version>
<eiffel-remrem-semantics.version>2.2.5</eiffel-remrem-semantics.version>
</properties>
<artifactId>eiffel-remrem-generate</artifactId>
<version>${eiffel-remrem-generate.version}</version>
<packaging>pom</packaging>
<dependencyManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.github.eiffel-community</groupId>
Expand Down Expand Up @@ -55,14 +55,14 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>17</source>
<target>17</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin.version}</version>
<version>${jacoco-maven-plugin.version}</version>
<executions>
<execution>
<id>prepare-agent</id>
Expand Down
31 changes: 28 additions & 3 deletions service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
<artifactId>eiffel-remrem-generate</artifactId>
<version>${eiffel-remrem-generate.version}</version>
</parent>
<properties>
<start-class>com.ericsson.eiffel.remrem.generate</start-class>
</properties>
<artifactId>generate-service</artifactId>
<packaging>war</packaging>
<dependencies>
Expand Down Expand Up @@ -47,12 +50,22 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-ldap</artifactId>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
</dependency>
<dependency>
Expand Down Expand Up @@ -91,16 +104,21 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${springboot.version}</version>
<version>${springboot.version}</version>
<configuration>
<mainClass>com.ericsson.eiffel.remrem.generate.App</mainClass>
<fork>true</fork>
<skip>false</skip>
</configuration>
<executions>
Expand All @@ -114,6 +132,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<archive>
<manifestEntries>
Expand All @@ -131,6 +150,12 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<!-- Allow JUnit to access the test classes -->
<argLine>--add-opens java.base/java.lang=ALL-UNNAMED</argLine>
<argLine>--add-opens java.base/jdk.internal.reflect=ALL-UNNAMED</argLine>

</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.PropertySource;

@SpringBootApplication
@ComponentScan("com.ericsson.eiffel.remrem")
@SpringBootApplication(scanBasePackages = {"com.ericsson.eiffel.remrem", "com.ericsson.eiffel.remrem.semantics"})
@EnableAutoConfiguration(exclude = { JacksonAutoConfiguration.class })
@PropertySource(value = "file:${catalina.home}/conf/config.properties", ignoreResourceNotFound = true)
public class App extends SpringBootServletInitializer {
Expand Down
25 changes: 11 additions & 14 deletions service/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#This file is for reference only. Will not pick any values from this file.

server.port=8080
server.port: 8080

debug: false

spring.mvc.pathmatch.matching-strategy=ANT_PATH_MATCHER

#Logging configurations
spring.mvc.pathmatch.matching-strategy: ANT_PATH_MATCHER

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

#Ldap authentication configurations

activedirectory.generate.enabled:false
activedirectory.ldapUrl :
#If the password is given in {ENC(<encrypted password>)} format, then file path for jasypt.key is necessary for decryption.
activedirectory.managerPassword : {ENC(<encrypted password>)} or password
activedirectory.generate.enabled: false
activedirectory.ldapUrl:
# If the password is given in {ENC(<encrypted password>)} format, then file path for jasypt.key is necessary for decryption.
activedirectory.managerPassword: {ENC(<encrypted password>)} or password
activedirectory.managerDn:
activedirectory.rootDn :
activedirectory.rootDn:
activedirectory.userSearchFilter:

#Event Repository configurations

event-repository.enabled:false
event-repository.url :http://<host>:<port>/<context-path-if-available>
# Event Repository configurations
event-repository.enabled: false
event-repository.url: http://<host>:<port>/<context-path-if-available>

# lenientValidationEnabledToUsers true will perform the validation only on mandatory fields, non-mandatory validation failures add into Eiffel message as property remremGenerateFailures
lenientValidationEnabledToUsers: false
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,24 @@
*/
package com.ericsson.eiffel.remrem.generate.integrationtest;

import com.ericsson.eiffel.semantics.events.EiffelActivityFinishedEventMeta;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonParser;
import com.jayway.restassured.RestAssured;

import com.google.gson.ReflectionAccessFilter;
import io.restassured.RestAssured;
import org.apache.http.HttpStatus;
import org.hamcrest.Matchers;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.test.context.ActiveProfiles;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.io.File;
import java.io.IOException;
Expand All @@ -39,14 +44,15 @@
import java.util.jar.JarFile;
import java.util.jar.Manifest;

import static com.jayway.restassured.RestAssured.given;
import static io.restassured.RestAssured.given;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;

@ActiveProfiles("integration-test")
@RunWith(SpringRunner.class)
@RunWith(SpringJUnit4ClassRunner.class)
@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)
@EnableAutoConfiguration
public class EiffelRemremControllerIT {
JsonParser parser = new JsonParser();

Expand Down Expand Up @@ -183,6 +189,12 @@ public void testGetEventTypes() throws Exception {
.body(Matchers.containsString("EiffelArtifactPublishedEvent"))
.body(Matchers.containsString("EiffelActivityFinishedEvent"))
.body(Matchers.containsString("EiffelActivityStartedEvent"));
Object r = given()
.header("Authorization", credentials)
.when()
.get("/event_types/eiffelsemantics")
.then();
r.toString();
}

@Test
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mock-maker-inline

0 comments on commit 68cb1c7

Please sign in to comment.