Skip to content

Commit c16b96e

Browse files
author
Anders Breid
authored
Uplift some plugin/dependency versions. (#142)
Updated mockito: mockito-all v1.10.19 >> mockito-core v2.9.0 cucumber: info.cukes >> io.cucumber Version: 1.2.5 >> 2.4.0 Maven: maven-war-plugin 3.1.0 >> 3.2.0 Spring-boot-starter 2.0.1 >> 2.0.8 Surefire >> 2.22.0 failsafe >> 2.22.0 war >> 3.2.0
1 parent b13a212 commit c16b96e

File tree

6 files changed

+72
-61
lines changed

6 files changed

+72
-61
lines changed

pom.xml

Lines changed: 51 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,40 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4-
<modelVersion>4.0.0</modelVersion>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55

6+
<modelVersion>4.0.0</modelVersion>
67
<groupId>com.github.ericsson</groupId>
78
<artifactId>eiffel-intelligence-frontend</artifactId>
89
<version>0.0.19</version>
910
<packaging>war</packaging>
11+
1012
<parent>
1113
<groupId>org.springframework.boot</groupId>
1214
<artifactId>spring-boot-starter-parent</artifactId>
13-
<version>2.0.1.RELEASE</version>
15+
<version>2.0.8.RELEASE</version>
1416
<relativePath /> <!-- .. lookup parent from repository -->
1517
</parent>
1618

19+
<properties>
20+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
21+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
22+
<java.version>1.8</java.version>
23+
<output-relative-path>src/main/java</output-relative-path>
24+
<skipTests>false</skipTests>
25+
<skipITs>${skipTests}</skipITs>
26+
<skipUTs>${skipTests}</skipUTs>
27+
<springBootVersion>${project.parent.version}</springBootVersion>
28+
<forkCountTests>2.5C</forkCountTests>
29+
</properties>
30+
1731
<!-- Reporting Plugins -->
1832
<reporting>
1933
<plugins>
2034
<plugin>
2135
<groupId>org.apache.maven.plugins</groupId>
2236
<artifactId>maven-project-info-reports-plugin</artifactId>
23-
<version>2.8</version>
37+
<version>3.0.0</version>
2438
<reportSets><!-- only generating index, no other reports -->
2539
<reportSet>
2640
<reports>
@@ -32,24 +46,16 @@
3246
</plugins>
3347
</reporting>
3448

35-
<properties>
36-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
37-
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
38-
<java.version>1.8</java.version>
39-
<output-relative-path>src/main/java</output-relative-path>
40-
<skipTests>false</skipTests>
41-
<skipITs>${skipTests}</skipITs>
42-
<skipUTs>${skipTests}</skipUTs>
43-
</properties>
44-
4549
<dependencies>
4650
<dependency>
4751
<groupId>org.springframework.boot</groupId>
4852
<artifactId>spring-boot-starter-actuator</artifactId>
53+
<version>${springBootVersion}</version>
4954
</dependency>
5055
<dependency>
5156
<groupId>org.springframework.boot</groupId>
5257
<artifactId>spring-boot-starter-web</artifactId>
58+
<version>${springBootVersion}</version>
5359
<exclusions>
5460
<exclusion>
5561
<groupId>org.springframework.boot</groupId>
@@ -60,27 +66,25 @@
6066
<dependency>
6167
<groupId>org.springframework.boot</groupId>
6268
<artifactId>spring-boot-starter-thymeleaf</artifactId>
63-
</dependency>
64-
<dependency>
65-
<groupId>org.springframework.boot</groupId>
66-
<artifactId>spring-boot-devtools</artifactId>
67-
<optional>true</optional>
68-
</dependency>
69-
<dependency>
70-
<groupId>org.apache.httpcomponents</groupId>
71-
<artifactId>httpclient</artifactId>
72-
<version>4.5.3</version>
69+
<version>${springBootVersion}</version>
7370
</dependency>
7471
<dependency>
7572
<groupId>org.springframework.boot</groupId>
7673
<artifactId>spring-boot-starter-tomcat</artifactId>
74+
<version>${springBootVersion}</version>
7775
<scope>compile</scope>
7876
</dependency>
7977
<dependency>
8078
<groupId>org.springframework.boot</groupId>
8179
<artifactId>spring-boot-starter-test</artifactId>
80+
<version>${springBootVersion}</version>
8281
<scope>test</scope>
8382
</dependency>
83+
<dependency>
84+
<groupId>org.apache.httpcomponents</groupId>
85+
<artifactId>httpclient</artifactId>
86+
<version>4.5.3</version>
87+
</dependency>
8488
<dependency>
8589
<groupId>org.projectlombok</groupId>
8690
<artifactId>lombok</artifactId>
@@ -101,8 +105,9 @@
101105
<!-- https://mvnrepository.com/artifact/org.mockito/mockito-all -->
102106
<dependency>
103107
<groupId>org.mockito</groupId>
104-
<artifactId>mockito-all</artifactId>
105-
<version>1.10.19</version>
108+
<artifactId>mockito-core</artifactId>
109+
<version>2.9.0</version>
110+
<scope>test</scope>
106111
</dependency>
107112
<!-- https://mvnrepository.com/artifact/org.mock-server/mockserver-client-java -->
108113
<dependency>
@@ -135,27 +140,28 @@
135140
</dependency>
136141
<!-- Cucumber -->
137142
<dependency>
138-
<groupId>info.cukes</groupId>
143+
<groupId>io.cucumber</groupId>
139144
<artifactId>cucumber-junit</artifactId>
140-
<version>1.2.5</version>
145+
<version>2.4.0</version>
141146
<scope>test</scope>
142147
</dependency>
143148
<dependency>
144-
<groupId>info.cukes</groupId>
149+
<groupId>io.cucumber</groupId>
145150
<artifactId>cucumber-java</artifactId>
146-
<version>1.2.5</version>
151+
<version>2.4.0</version>
147152
<scope>test</scope>
148153
</dependency>
149154
<dependency>
150-
<groupId>info.cukes</groupId>
155+
<groupId>io.cucumber</groupId>
151156
<artifactId>cucumber-spring</artifactId>
152-
<version>1.2.5</version>
157+
<version>2.4.0</version>
153158
<scope>test</scope>
154159
</dependency>
155160
<!-- RabbitMQ -->
156161
<dependency>
157162
<groupId>com.rabbitmq</groupId>
158163
<artifactId>amqp-client</artifactId>
164+
<version>5.1.2</version>
159165
<scope>test</scope>
160166
</dependency>
161167
</dependencies>
@@ -194,6 +200,7 @@
194200
<plugin>
195201
<groupId>org.apache.maven.plugins</groupId>
196202
<artifactId>maven-war-plugin</artifactId>
203+
<version>3.2.0</version>
197204
<configuration>
198205
<failOnMissingWebXml>false</failOnMissingWebXml>
199206
</configuration>
@@ -202,6 +209,7 @@
202209
<plugin>
203210
<groupId>org.codehaus.mojo</groupId>
204211
<artifactId>build-helper-maven-plugin</artifactId>
212+
<version>3.0.0</version>
205213
<executions>
206214
<execution>
207215
<id>add-test-source</id>
@@ -224,10 +232,10 @@
224232
<plugin>
225233
<groupId>org.apache.maven.plugins</groupId>
226234
<artifactId>maven-surefire-plugin</artifactId>
227-
<version>2.20</version>
235+
<version>2.22.0</version>
228236
<configuration>
229237
<skipTests>${skipUTs}</skipTests>
230-
<forkCount>2.5C</forkCount>
238+
<forkCountTests>${forkCountTests}</forkCountTests>
231239
<reuseForks>false</reuseForks>
232240
<useSystemClassLoader>false</useSystemClassLoader>
233241
<excludes>
@@ -243,7 +251,7 @@
243251
<plugin>
244252
<groupId>org.apache.maven.plugins</groupId>
245253
<artifactId>maven-failsafe-plugin</artifactId>
246-
<version>3.0.0-M1</version>
254+
<version>2.22.0</version>
247255
<configuration>
248256
<skipTests>${skipTests}</skipTests>
249257
<skipITs>${skipITs}</skipITs>
@@ -275,7 +283,8 @@
275283
<configuration>
276284
<!-- This is where site.xml is located -->
277285
<siteDirectory>${basedir}/wiki</siteDirectory>
278-
<!-- Github pages only generates documentation from docs directory -->
286+
<!-- Github pages only generates documentation from docs
287+
directory -->
279288
<outputDirectory>${basedir}/docs</outputDirectory>
280289
</configuration>
281290
<dependencies>
@@ -299,7 +308,8 @@
299308
<goal>copy-resources</goal>
300309
</goals>
301310
<configuration>
302-
<!-- plugin requires all resources to exist within resources/ directory -->
311+
<!-- plugin requires all resources to exist within
312+
resources/ directory -->
303313
<!-- but we don't want to break links in documentation -->
304314
<outputDirectory>${basedir}/wiki/resources/images</outputDirectory>
305315
<resources>
@@ -314,8 +324,9 @@
314324

315325
<plugin>
316326
<artifactId>maven-clean-plugin</artifactId>
317-
<version>3.0.0</version>
318-
<!-- We want to remove duplicate/copied resources from site generation -->
327+
<version>3.1.0</version>
328+
<!-- We want to remove duplicate/copied resources from site
329+
generation -->
319330
<configuration>
320331
<filesets>
321332
<fileset>

src/functionaltest/java/com/ericsson/ei/config/Utils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static Properties getProperties(final String filePath) {
4848
* string containing a destination path.
4949
*/
5050
public static void extractBZip2InDir(final String firefoxBZip2FilePath, String destinationPath) {
51-
LOGGER.info("Extracting firefox BZip2 archive...");
51+
LOGGER.debug("Extracting firefox BZip2 archive...");
5252
try (TarArchiveInputStream fileInput = new TarArchiveInputStream(
5353
new BZip2CompressorInputStream(new FileInputStream(firefoxBZip2FilePath)))) {
5454
TarArchiveEntry entry;
@@ -86,7 +86,7 @@ public static void downloadFileFromUrlToDestination(final String url, final Stri
8686

8787
try {
8888
urlObj = new URL(url);
89-
LOGGER.info("Downloading file.\nSource: {}\nDestination: {}", url, destination);
89+
LOGGER.debug("Downloading file.\nSource: {}\nDestination: {}", url, destination);
9090
FileUtils.copyURLToFile(urlObj, file);
9191
} catch (MalformedURLException e) {
9292
LOGGER.error("Failed to create URL object.\nURL: {}\nError: {}", url, e.getMessage());
@@ -103,7 +103,7 @@ public static void downloadFileFromUrlToDestination(final String url, final Stri
103103
*/
104104
public static void makeBinFileExecutable(final File binFile) {
105105
if (binFile.isFile()) {
106-
LOGGER.info("Changing bin file to be executable.\nPath: {}", binFile.getPath());
106+
LOGGER.debug("Changing bin file to be executable.\nPath: {}", binFile.getPath());
107107
binFile.setExecutable(true);
108108
} else {
109109
LOGGER.error("Path is not a file.\nPath: {}", binFile.getPath());

src/integrationtest/java/com/ericsson/ei/frontend/CommonSteps.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public void beforeQueryScenario() {
7575

7676
@Given("^frontend is up and running$")
7777
public void frontend_running() {
78-
LOGGER.info("Front-end port: {}", frontendPort);
78+
LOGGER.debug("Front-end port: {}", frontendPort);
7979
assertEquals(true, frontendPort != 0);
8080
}
8181

@@ -93,7 +93,7 @@ public void aggregated_object_created() throws IOException, TimeoutException {
9393

9494
@When("^a \'(\\w+)\' request is prepared for REST API \'(.*)\'$")
9595
public void request_to_rest_api(String method, String endpoint) throws Throwable {
96-
LOGGER.info("Method: {}, Endpoint: {}", method, endpoint);
96+
LOGGER.debug("Method: {}, Endpoint: {}", method, endpoint);
9797
httpRequest = new HttpRequest(HttpMethod.valueOf(method));
9898
httpRequest.setHost(frontendHost).setPort(frontendPort).setEndpoint(endpoint);
9999
}
@@ -141,28 +141,28 @@ public void request_sent() throws Throwable {
141141

142142
@Then("^response code (\\d+) is received$")
143143
public void get_response_code(int statusCode) throws Throwable {
144-
LOGGER.info("Response code: {}", response.getStatusCode());
144+
LOGGER.debug("Response code: {}", response.getStatusCode());
145145
assertEquals(HttpStatus.valueOf(statusCode), response.getStatusCode());
146146
}
147147

148148
@Then("^response body \'(.*)\' is received$")
149149
public void get_response_body(String body) throws Throwable {
150-
LOGGER.info("Response body: {}", response.getBody());
150+
LOGGER.debug("Response body: {}", response.getBody());
151151
assertEquals(body, response.getBody());
152152
}
153153

154154
@Then("^response body from file \'(.*)\' is received$")
155155
public void get_response_body_from_file(String filename) throws Throwable {
156156
String filePath = Paths.get(RESOURCE_PATH, RESPONSES_PATH, filename).toString();
157157
String fileContent = FileUtils.readFileToString(new File(filePath), "UTF-8");
158-
LOGGER.info("File path: {}", filePath);
159-
LOGGER.info("Response body: {}", response.getBody());
158+
LOGGER.debug("File path: {}", filePath);
159+
LOGGER.debug("Response body: {}", response.getBody());
160160
assertEquals(fileContent.replaceAll("\\s+", ""), response.getBody().replaceAll("\\s+", ""));
161161
}
162162

163163
@Then("^response body contains \'(.*)\'$")
164164
public void response_body_contains(String contains) throws Throwable {
165-
LOGGER.info("Response body: {}", response.getBody());
165+
LOGGER.debug("Response body: {}", response.getBody());
166166
assertEquals(true, response.getBody().contains(contains));
167167
}
168168
}

src/integrationtest/java/com/ericsson/ei/utils/AMQPCommunication.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class AMQPCommunication {
3636
*/
3737
public AMQPCommunication(final String host, final int port, final String username, final String password)
3838
throws IOException, TimeoutException {
39-
LOGGER.info("Setting up RabbitMQ connection to '{}:{}'", host, port);
39+
LOGGER.debug("Setting up RabbitMQ connection to '{}:{}'", host, port);
4040
this.factory = new ConnectionFactory();
4141
this.factory.setHost(host);
4242
this.factory.setPort(port);
@@ -58,11 +58,11 @@ public AMQPCommunication(final String host, final int port, final String usernam
5858
* @return true if message was sent, false otherwise
5959
*/
6060
public boolean produceMessage(final String message, final String exchange, final String key) {
61-
LOGGER.info("Preparing to produce message -> Host: {}, Exchange: {}, RoutingKey: {}\nMessage: {}",
61+
LOGGER.debug("Preparing to produce message -> Host: {}, Exchange: {}, RoutingKey: {}\nMessage: {}",
6262
factory.getHost() + ":" + factory.getPort(), exchange, key, message);
6363
try {
6464
this.channel.basicPublish(exchange, key, null, message.getBytes());
65-
LOGGER.info("Message being sent.");
65+
LOGGER.debug("Message being sent.");
6666
return true;
6767
} catch (IOException e) {
6868
LOGGER.error("An error occured when trying to produce the message.", e);

src/main/java/com/ericsson/ei/frontend/utils/BackEndInstanceFileUtils.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,16 @@ public void init() throws IOException {
6363
File eiInstancesListFile = new File(eiInstancesListFilePath.toString());
6464

6565
if (eiInstancesListFile.exists() && eiInstancesListFile.length() != 0) {
66-
LOG.info("EI Instances List file path is not provided, but found a file in path: " + eiInstancesPath +
66+
LOG.debug("EI Instances List file path is not provided, but found a file in path: " + eiInstancesPath +
6767
"\nWill use that EI Instances List file.");
6868
}
6969
else {
7070
if (eiInstancesListFile.exists() && eiInstancesListFile.length() == 0) {
71-
LOG.info("EI Instances List file path is not provided, but found a file in path: " + eiInstancesPath +
71+
LOG.debug("EI Instances List file path is not provided, but found a file in path: " + eiInstancesPath +
7272
"\nThat EI Instances List file is empty!. Will try to create a default EI Instances List in that file.");
7373
}
7474
else {
75-
LOG.info("EI Instances List file path is not provided! " +
75+
LOG.debug("EI Instances List file path is not provided! " +
7676
"Will create a default EI Instances List file at file path: " + eiInstancesPath);
7777
}
7878
parseAndSetEiInstancesList();
@@ -81,12 +81,12 @@ public void init() throws IOException {
8181
} else {
8282
setEiInstancesPath(Paths.get(backendInstancesFilePath).toString());
8383
if (!(new File(eiInstancesPath).isFile())) {
84-
LOG.info("EI Instances List file don' exist! Creating file with given or "
84+
LOG.debug("EI Instances List file don' exist! Creating file with given or "
8585
+ "default EI instances list content. File path: " + eiInstancesPath);
8686
createFileWithDirs();
8787
parseAndSetEiInstancesList();
8888
} else {
89-
LOG.info("EI-Backend instances list file that will be used: " + eiInstancesPath);
89+
LOG.debug("EI-Backend instances list file that will be used: " + eiInstancesPath);
9090
}
9191
}
9292
}
@@ -206,12 +206,12 @@ private void createFileWithDirs() throws IOException {
206206
File eiInstancesParentFolder = Paths.get(eiInstancesPath).getParent().toFile();
207207

208208
if (!(eiInstancesParentFolder.isDirectory())) {
209-
LOG.info(String.format("Parentdir(s) for %s does not exist! Trying to create necessary parent dirs.",
209+
LOG.debug(String.format("Parentdir(s) for %s does not exist! Trying to create necessary parent dirs.",
210210
backendInstancesFilePath));
211211
eiInstancesParentFolder.mkdirs();
212212
}
213213

214-
LOG.info("File does not exist! Trying to create file.");
214+
LOG.debug("File does not exist! Trying to create file.");
215215
Files.createFile(Paths.get(eiInstancesPath));
216216
Files.write(Paths.get(eiInstancesPath), "[]".getBytes());
217217
}

src/main/java/com/ericsson/ei/frontend/utils/EIRequestsControllerUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public String getEIRequestURL(HttpServletRequest request) {
6969
List<NameValuePair> params = getParameters(requestQuery);
7070
requestUrl = extractUrlFromParameters(params);
7171
requestQuery = removeBackendDataFromQueryString(params);
72-
LOG.info(BACKEND_KEY_NAME + " key detected, forwarding request to url '" + requestUrl + "'.");
72+
LOG.debug(BACKEND_KEY_NAME + " key detected, forwarding request to url '" + requestUrl + "'.");
7373
} else {
7474
BackEndInformation backEndInformation = getEIBackendInformation(request);
7575
requestUrl = backEndInformation.getUrlAsString();

0 commit comments

Comments
 (0)