diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f91f646 --- /dev/null +++ b/.gitattributes @@ -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 + diff --git a/.gitignore b/.gitignore index 56708e3..178fde3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,9 @@ hs_err_pid* .idea/ build/ .gradle/ + +# Ignore Gradle project-specific cache directory +.gradle + +# Ignore Gradle build output directory +build diff --git a/.travis.yml b/.travis.yml index 29ac4f7..1dd35a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/build.gradle b/build.gradle index 5820e09..8ed8a4a 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/gradle.properties b/gradle.properties index e3300c0..a0d1851 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 9355b41..cea7a79 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -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 diff --git a/jitpack.yml b/jitpack.yml index a202792..727c9ab 100644 --- a/jitpack.yml +++ b/jitpack.yml @@ -1,2 +1,2 @@ jdk: - - openjdk21 \ No newline at end of file + - openjdk21 diff --git a/src/main/java/com/epam/reportportal/extension/bugtracking/CommonPredicates.java b/src/main/java/com/epam/reportportal/extension/bugtracking/CommonPredicates.java index 35ab09d..179358a 100644 --- a/src/main/java/com/epam/reportportal/extension/bugtracking/CommonPredicates.java +++ b/src/main/java/com/epam/reportportal/extension/bugtracking/CommonPredicates.java @@ -21,7 +21,7 @@ import java.util.function.Predicate; /** - * Some common {@link org.apache.commons.collections.Predicate} + * Some common {@link Predicate} * * @author Andrei Varabyeu */ @@ -34,4 +34,4 @@ private CommonPredicates() { public static final Predicate> IS_EMPTY = input -> null == input || input.isEmpty(); public static final Predicate> IS_MAP_EMPTY = input -> null == input || input.isEmpty(); -} \ No newline at end of file +} diff --git a/src/main/java/com/epam/reportportal/extension/common/IntegrationTypeProperties.java b/src/main/java/com/epam/reportportal/extension/common/IntegrationTypeProperties.java index 6cba363..bc4a6c3 100644 --- a/src/main/java/com/epam/reportportal/extension/common/IntegrationTypeProperties.java +++ b/src/main/java/com/epam/reportportal/extension/common/IntegrationTypeProperties.java @@ -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; diff --git a/src/main/java/com/epam/reportportal/extension/lookup/ExtensionContainer.java b/src/main/java/com/epam/reportportal/extension/lookup/ExtensionContainer.java index 0a7b5c2..cb54196 100644 --- a/src/main/java/com/epam/reportportal/extension/lookup/ExtensionContainer.java +++ b/src/main/java/com/epam/reportportal/extension/lookup/ExtensionContainer.java @@ -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 { - private final Map extensions; + private final Map 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 get(String key) { - return (T) extensions.get(key); + public T get(String key) { + return extensions.get(key); } } diff --git a/src/main/java/com/epam/reportportal/extension/util/CommandParamUtils.java b/src/main/java/com/epam/reportportal/extension/util/CommandParamUtils.java index 730a8f6..35354d1 100644 --- a/src/main/java/com/epam/reportportal/extension/util/CommandParamUtils.java +++ b/src/main/java/com/epam/reportportal/extension/util/CommandParamUtils.java @@ -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; diff --git a/src/main/java/com/epam/reportportal/extension/util/RequestEntityValidator.java b/src/main/java/com/epam/reportportal/extension/util/RequestEntityValidator.java index 6fc1b8f..88a734c 100644 --- a/src/main/java/com/epam/reportportal/extension/util/RequestEntityValidator.java +++ b/src/main/java/com/epam/reportportal/extension/util/RequestEntityValidator.java @@ -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; diff --git a/src/test/java/com/epam/reportportal/extension/common/ExtensionPointTest.java b/src/test/java/com/epam/reportportal/extension/common/ExtensionPointTest.java index 1a509d8..46a999e 100644 --- a/src/test/java/com/epam/reportportal/extension/common/ExtensionPointTest.java +++ b/src/test/java/com/epam/reportportal/extension/common/ExtensionPointTest.java @@ -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)); - } -} \ No newline at end of file + @Test + public void findByExtensionNegative() { + Assertions.assertTrue( + ExtensionPoint.findByExtension(String.class).isPresent(), "Incorrect find by extension"); + } +}