Skip to content

Commit

Permalink
Added support for Java 21, migrated to Jakarta namespace, updated ver…
Browse files Browse the repository at this point in the history
…sions of dependencies to latest.
  • Loading branch information
divjad--- committed Nov 29, 2023
1 parent 1157fc1 commit 5da4fcc
Show file tree
Hide file tree
Showing 122 changed files with 588 additions and 588 deletions.
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee</artifactId>
<groupId>com.kumuluz.ee</groupId>
<version>4.2.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
Expand Down
6 changes: 3 additions & 3 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee</artifactId>
<groupId>com.kumuluz.ee</groupId>
<version>4.2.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -50,8 +50,8 @@
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,11 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.common;

import com.kumuluz.ee.common.config.ServerConfig;

import java.util.EventListener;
import java.util.Map;

import javax.servlet.Servlet;

/**
* @author Tilen Faganel
* @since 1.0.0
Expand Down
8 changes: 4 additions & 4 deletions common/src/main/java/com/kumuluz/ee/common/ServletServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
package com.kumuluz.ee.common;

import com.kumuluz.ee.common.servlet.ServletWrapper;
import jakarta.servlet.DispatcherType;
import jakarta.servlet.Filter;
import jakarta.servlet.Servlet;
import jakarta.transaction.UserTransaction;

import javax.servlet.DispatcherType;
import javax.servlet.Filter;
import javax.servlet.Servlet;
import javax.sql.DataSource;
import javax.transaction.UserTransaction;
import java.util.*;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.common.filters;

import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.*;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;

public class PoweredByFilter implements Filter {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.kumuluz.ee.configuration.utils;

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

import java.util.Map;
import java.util.Optional;
import java.util.function.Function;

import static org.junit.Assert.*;
import static org.junit.jupiter.api.Assertions.assertEquals;

/**
* Tests for {@link ConfigurationInterpolationUtil}. More tests of interpolation (expressions) are in
Expand All @@ -15,7 +15,7 @@
* @author Urban Malc
* @since 4.1.0
*/
public class ConfigurationInterpolationUtilTest {
class ConfigurationInterpolationUtilTest {

private static final String TEST_VALUE = "TEST_VALUE";

Expand All @@ -37,7 +37,7 @@ private Function<String, Optional<String>> createMapResolver(Map<String, String>
}

@Test
public void noInterpolationTest() {
void noInterpolationTest() {

assertEquals("test", ConfigurationInterpolationUtil.interpolateString("test", this::emptyResolver));
assertEquals("", ConfigurationInterpolationUtil.interpolateString("", this::emptyResolver));
Expand All @@ -52,7 +52,7 @@ public void noInterpolationTest() {
}

@Test
public void simpleInterpolationTest() {
void simpleInterpolationTest() {

assertEquals(TEST_VALUE, ConfigurationInterpolationUtil.interpolateString("${replaceme}", this::testValueResolver));
assertEquals("abc" + TEST_VALUE, ConfigurationInterpolationUtil.interpolateString("abc${replaceme}", this::testValueResolver));
Expand All @@ -63,7 +63,7 @@ public void simpleInterpolationTest() {
}

@Test
public void nestedInterpolationTest() {
void nestedInterpolationTest() {

assertEquals("i1", ConfigurationInterpolationUtil.interpolateString("${${i1}}", this::identityResolver));
assertEquals("i1i2", ConfigurationInterpolationUtil.interpolateString("${i1${i2}}", this::identityResolver));
Expand All @@ -77,7 +77,7 @@ public void nestedInterpolationTest() {
}

@Test
public void defaultValueInterpolationTest() {
void defaultValueInterpolationTest() {

assertEquals("defaultValue", ConfigurationInterpolationUtil.interpolateString("${test:defaultValue}", this::emptyResolver));
assertEquals("defaultValue", ConfigurationInterpolationUtil.interpolateString("${:defaultValue}", this::emptyResolver));
Expand All @@ -90,7 +90,7 @@ public void defaultValueInterpolationTest() {
}

@Test
public void defaultValueAndNestedInterpolationTest() {
void defaultValueAndNestedInterpolationTest() {

assertEquals("defaultValue", ConfigurationInterpolationUtil.interpolateString("${first:${second:defaultValue}}", this::emptyResolver));
assertEquals("secondValue", ConfigurationInterpolationUtil.interpolateString("${first:${second:defaultValue}}",
Expand Down
20 changes: 10 additions & 10 deletions components/bean-validation/hibernate-validator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee-bean-validation</artifactId>
<groupId>com.kumuluz.ee</groupId>
<version>4.2.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -62,7 +62,7 @@
<exclusions>
<exclusion>
<groupId>org.glassfish.hk2.external</groupId>
<artifactId>javax.inject</artifactId>
<artifactId>jakarta.inject</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.jersey.core</groupId>
Expand All @@ -81,23 +81,23 @@
<artifactId>hibernate-validator</artifactId>
</exclusion>
<exclusion>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.el</artifactId>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
</exclusion>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@

import com.kumuluz.ee.beanvalidation.test.beans.Project;
import com.kumuluz.ee.beanvalidation.test.beans.User;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;

import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.Validator;
import javax.validation.ValidatorFactory;

import jakarta.validation.ConstraintViolation;
import jakarta.validation.Validation;
import jakarta.validation.Validator;
import jakarta.validation.ValidatorFactory;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

import java.util.ArrayList;
import java.util.Date;
import java.util.Set;
Expand All @@ -41,14 +42,14 @@ public class HibernateValidatorTest {

private static Validator validator;

@BeforeClass
@BeforeAll
public static void setUp() {
ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
validator = factory.getValidator();
}

@Test
public void testCorrectEntities() {
void testCorrectEntities() {

Project p1 = new Project();
p1.setName("Test project");
Expand All @@ -70,12 +71,12 @@ public void testCorrectEntities() {
Set<ConstraintViolation<User>> constraintViolations =
validator.validate(u1);

Assert.assertNotNull(constraintViolations);
Assert.assertEquals(0, constraintViolations.size());
Assertions.assertNotNull(constraintViolations);
Assertions.assertEquals(0, constraintViolations.size());
}

@Test
public void testWrongEntities() {
void testWrongEntities() {

Project p1 = new Project();
p1.setName("T");
Expand All @@ -96,7 +97,7 @@ public void testWrongEntities() {
Set<ConstraintViolation<User>> constraintViolations =
validator.validate(u1);

Assert.assertNotNull(constraintViolations);
Assert.assertEquals(4, constraintViolations.size());
Assertions.assertNotNull(constraintViolations);
Assertions.assertEquals(4, constraintViolations.size());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*/
package com.kumuluz.ee.beanvalidation.test.beans;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

/**
* @author Tilen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
*/
package com.kumuluz.ee.beanvalidation.test.beans;

import javax.validation.Valid;
import javax.validation.constraints.Email;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.util.Date;
import java.util.List;

Expand Down
2 changes: 1 addition & 1 deletion components/bean-validation/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee-components</artifactId>
<groupId>com.kumuluz.ee</groupId>
<version>4.2.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
Expand Down
2 changes: 1 addition & 1 deletion components/cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee-components</artifactId>
<groupId>com.kumuluz.ee</groupId>
<version>4.2.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
Expand Down
33 changes: 7 additions & 26 deletions components/cdi/weld/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>kumuluzee-cdi</artifactId>
<groupId>com.kumuluz.ee</groupId>
<version>4.2.0-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down Expand Up @@ -34,32 +34,13 @@
<groupId>jakarta.el</groupId>
<artifactId>jakarta.el-api</artifactId>
</dependency>

<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-core</artifactId>
<version>${weld.version}</version>
<exclusions>
<exclusion>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.3_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.spec.javax.el</groupId>
<artifactId>jboss-el-api_3.0_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.spec.javax.interceptor</groupId>
<artifactId>jboss-interceptors-api_1.2_spec</artifactId>
</exclusion>
<exclusion>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
</exclusion>
</exclusions>
<groupId>jakarta.enterprise</groupId>
<artifactId>jakarta.enterprise.cdi-api</artifactId>
</dependency>

<dependency>
<groupId>org.jboss</groupId>
<groupId>io.smallrye</groupId>
<artifactId>jandex</artifactId>
</dependency>
<dependency>
Expand All @@ -73,8 +54,8 @@
<version>${jersey.version}</version>
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</exclusion>
</exclusions>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
*/
package com.kumuluz.ee.configuration.cdi;

import javax.enterprise.util.Nonbinding;
import javax.interceptor.InterceptorBinding;
import jakarta.enterprise.util.Nonbinding;
import jakarta.interceptor.InterceptorBinding;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@
* out of or in connection with the software or the use or other dealings in the
* software. See the License for the specific language governing permissions and
* limitations under the License.
*/
*/
package com.kumuluz.ee.configuration.cdi;

import javax.enterprise.util.Nonbinding;
import jakarta.enterprise.util.Nonbinding;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
Expand Down
Loading

0 comments on commit 5da4fcc

Please sign in to comment.