Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPMRPP-93672 migrate to Spring Boot 3 #63

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

# Binary files should be left untouched
*.jar binary

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ hs_err_pid*
.idea/
build/
.gradle/

# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
2 changes: 1 addition & 1 deletion .travis.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be deleted as we don't use travis

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ env:
script: ./gradlew build --full-stacktrace

jdk:
- oraclejdk11
- openjdk21

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
Expand Down
14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,28 @@ dependencyManagement {
mavenBom(releaseMode ? 'com.epam.reportportal:commons-bom:5.13.0' : 'com.epam.reportportal:commons-bom:5.13.0')
}
}
ext['spring-boot.version'] = "${springBootVersion}"

dependencies {
if (releaseMode) {
implementation 'com.epam.reportportal:commons-dao'
api 'com.epam.reportportal:commons'
} else {
implementation 'com.github.reportportal:commons-dao:adbb40e'
api 'com.github.reportportal:commons:6e23763'
implementation 'com.github.reportportal:commons-dao:3e0d736'
api 'com.github.reportportal:commons:bcb72b3'
}
api 'org.pf4j:pf4j:3.10.0'

api 'org.pf4j:pf4j:3.12.1'
api 'org.pf4j:pf4j-update:2.3.0'

implementation 'org.hibernate:hibernate-core:5.6.15.Final'
implementation 'org.hibernate:hibernate-core:6.6.4.Final'

testImplementation 'junit:junit'
testImplementation "org.junit.jupiter:junit-jupiter-api"
}


wrapper {
gradleVersion = '8.10'
gradleVersion = '8.12'
}

tasks.preTagCommit.enabled = false
Expand Down
3 changes: 3 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
version=5.13.0
description=EPAM Report portal. Plugin extension APIs
springBootVersion=3.4.1
org.gradle.parallel=true
org.gradle.caching=true
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
jdk:
- openjdk21
- openjdk21
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.function.Predicate;

/**
* Some common {@link org.apache.commons.collections.Predicate}
* Some common {@link Predicate}
*
* @author Andrei Varabyeu
*/
Expand All @@ -34,4 +34,4 @@ private CommonPredicates() {
public static final Predicate<Collection<?>> IS_EMPTY = input -> null == input || input.isEmpty();

public static final Predicate<Map<?, ?>> IS_MAP_EMPTY = input -> null == input || input.isEmpty();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.epam.ta.reportportal.entity.integration.IntegrationTypeDetails;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
package com.epam.reportportal.extension.lookup;

import org.springframework.stereotype.Service;

import java.util.LinkedHashMap;
import java.util.Map;
import org.springframework.stereotype.Service;

@Service
public class ExtensionContainer {
@Deprecated(forRemoval = true)
public class ExtensionContainer<T> {

private final Map<String, Object> extensions;
private final Map<String, T> extensions;

public ExtensionContainer() {
this.extensions = new LinkedHashMap<>();
}

public void add(String key, Object extension) {
public void add(String key, T extension) {
extensions.put(key, extension);
}

public void remove(String key) {
public void remove(String key) {
extensions.remove(key);
}

public <T> T get(String key) {
return (T) extensions.get(key);
public T get(String key) {
return extensions.get(key);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import com.epam.reportportal.rules.commons.validation.Suppliers;
import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.reportportal.rules.exception.ErrorType;
import javax.validation.ConstraintViolation;
import javax.validation.Path;
import jakarta.validation.ConstraintViolation;
import jakarta.validation.Path;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.reportportal.rules.exception.ErrorType;
import javax.validation.Validation;
import javax.validation.Validator;
import jakarta.validation.Validation;
import jakarta.validation.Validator;
import java.util.List;
import java.util.stream.Collectors;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
*/
package com.epam.reportportal.extension.common;

import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Test;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class ExtensionPointTest {

@Test
public void findByExtensionPositive() {
Assert.assertThat("Incorrect find by extension",
ExtensionPoint.findByExtension(ExtensionPoint.BTS.getExtensionClass()).isPresent(),
CoreMatchers.is(true)
);
}
@Test
public void findByExtensionPositive() {
Assertions.assertTrue(
ExtensionPoint.findByExtension(ExtensionPoint.BTS.getExtensionClass()).isPresent(),
"Incorrect find by extension");
}

@Test
public void findByExtensionNegative() {
Assert.assertThat("Incorrect find by extension", ExtensionPoint.findByExtension(String.class).isPresent(), CoreMatchers.is(false));
}
}
@Test
public void findByExtensionNegative() {
Assertions.assertTrue(
ExtensionPoint.findByExtension(String.class).isPresent(), "Incorrect find by extension");
}
}
Loading