Skip to content

Commit

Permalink
chore: update to Jakarta EE 11
Browse files Browse the repository at this point in the history
  • Loading branch information
hantsy committed Jan 5, 2025
1 parent daf8a6d commit 37e691e
Show file tree
Hide file tree
Showing 92 changed files with 422 additions and 554 deletions.
78 changes: 63 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@
<!-- Cargo maven plugin -->
<cargo-maven3-plugin.version>1.10.16</cargo-maven3-plugin.version>

<!-- Jakarta EE API -->
<jakartaee-api.version>10.0.0</jakartaee-api.version>
<!-- Jakarta EE API 11.x -->
<jakartaee-api.version>11.0.0-M4</jakartaee-api.version>

<!-- Arquillian BOM -->
<arquillian-bom.version>1.8.0.Final</arquillian-bom.version>
<arquillian-bom.version>1.9.2.Final</arquillian-bom.version>
<!-- Since Aruqillian core 1.9.0.Final, need to add Aruqillian Jakarta BOM which aligns to Jakarta EE -->
<arquillian-jakarta-bom.version>10.0.0.Final</arquillian-jakarta-bom.version>
<shrinkwrap-resolver-bom.version>3.3.3</shrinkwrap-resolver-bom.version>
<!-- Test Utilities -->
<junit.version>5.11.4</junit.version>
<hamcrest.version>2.2</hamcrest.version>
Expand All @@ -59,16 +62,16 @@
<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>

<!-- Glassfish server -->
<glassfish.version>7.0.20</glassfish.version>
<jersey.version>3.1.9</jersey.version>
<eclipselink.version>4.0.1</eclipselink.version>
<glassfish.version>8.0.0-M9</glassfish.version>
<jersey.version>4.0.0-M1</jersey.version>
<eclipselink.version>5.0.0-B03</eclipselink.version>
<arquillian-glassfish-jakarta.version>7.0.10</arquillian-glassfish-jakarta.version>
<!-- websocket client for test-->
<tyrus.version>2.2.0</tyrus.version>

<!-- Wildfly server -->
<wildfly.version>30.0.1.Final</wildfly.version>
<wildfly-maven-plugin.version>4.2.2.Final</wildfly-maven-plugin.version>
<wildfly.version>34.0.0.Final</wildfly.version>
<wildfly-maven-plugin.version>5.1.1.Final</wildfly-maven-plugin.version>
<wildfly-arquillian.version>5.0.1.Final</wildfly-arquillian.version>
<!-- aligned to Wildfly version. -->
<resteasy.version>6.2.11.Final</resteasy.version>
Expand All @@ -94,7 +97,20 @@
<scope>import</scope>
<type>pom</type>
</dependency>

<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-bom</artifactId>
<version>${resteasy.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>jakarta.platform</groupId>
<artifactId>jakarta.jakartaee-api</artifactId>
Expand All @@ -113,6 +129,21 @@
<type>pom</type>
</dependency>

<dependency>
<groupId>org.jboss.arquillian.jakarta</groupId>
<artifactId>arquillian-jakarta-bom</artifactId>
<version>${arquillian-jakarta-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-bom</artifactId>
<version>${shrinkwrap-resolver-bom.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>

<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
Expand Down Expand Up @@ -278,6 +309,23 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.25</version>
<configuration>
<verbose>true</verbose>
<style>aosp</style>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
Expand Down Expand Up @@ -464,7 +512,7 @@
</artifactItem>
</artifactItems>
<outputDirectory>
${project.build.directory}/cargo/installs/glassfish-${glassfish.version}/glassfish7/glassfish/modules
${project.build.directory}/cargo/installs/glassfish-${glassfish.version}/glassfish8/glassfish/modules
</outputDirectory>
</configuration>
</execution>
Expand All @@ -475,7 +523,7 @@
<artifactId>cargo-maven3-plugin</artifactId>
<configuration>
<container>
<containerId>glassfish7x</containerId>
<containerId>glassfish8x</containerId>

<!-- <artifactInstaller>
<groupId>org.glassfish.main.distributions</groupId>
Expand All @@ -491,7 +539,7 @@
</container>
<configuration>
<!-- the configuration used to deploy -->
<home>${project.build.directory}/glassfish7x-home</home>
<home>${project.build.directory}/glassfish8x-home</home>
<properties>
<cargo.remote.password></cargo.remote.password>
</properties>
Expand All @@ -504,7 +552,7 @@
<profile>
<id>unit-test</id>
<activation>
<!-- <activeByDefault>true</activeByDefault>-->
<!-- <activeByDefault>true</activeByDefault>-->
</activation>
<properties>
<skip.unit.tests>false</skip.unit.tests>
Expand Down Expand Up @@ -610,7 +658,7 @@
</artifactItem>
</artifactItems>
<outputDirectory>
${project.build.directory}/glassfish7/glassfish/modules
${project.build.directory}/glassfish8/glassfish/modules
</outputDirectory>
</configuration>
</execution>
Expand All @@ -622,7 +670,7 @@
<version>${maven-failsafe-plugin.version}</version>
<configuration>
<environmentVariables>
<GLASSFISH_HOME>${project.build.directory}/glassfish7</GLASSFISH_HOME>
<GLASSFISH_HOME>${project.build.directory}/glassfish8</GLASSFISH_HOME>
</environmentVariables>
<systemPropertyVariables>
<arquillian.launch>glassfish-managed</arquillian.launch>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import jakarta.validation.Valid;
import jakarta.validation.constraints.Future;
import jakarta.validation.constraints.NotNull;

import org.eclipse.cargotracker.domain.model.cargo.Itinerary;
import org.eclipse.cargotracker.domain.model.cargo.TrackingId;
import org.eclipse.cargotracker.domain.model.location.UnLocode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

import org.eclipse.cargotracker.domain.model.cargo.TrackingId;

public interface CargoInspectionService {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

import org.eclipse.cargotracker.domain.model.cargo.TrackingId;
import org.eclipse.cargotracker.domain.model.handling.CannotCreateHandlingEventException;
import org.eclipse.cargotracker.domain.model.handling.HandlingEvent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package org.eclipse.cargotracker.application.internal;

import jakarta.ejb.Stateless;
import jakarta.inject.Inject;

import org.eclipse.cargotracker.application.BookingService;
import org.eclipse.cargotracker.domain.model.cargo.*;
import org.eclipse.cargotracker.domain.model.location.Location;
import org.eclipse.cargotracker.domain.model.location.LocationRepository;
import org.eclipse.cargotracker.domain.model.location.UnLocode;
import org.eclipse.cargotracker.domain.service.RoutingService;

import jakarta.ejb.Stateless;
import jakarta.inject.Inject;
import java.time.LocalDate;
import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.eclipse.cargotracker.application.internal;

import jakarta.ejb.Stateless;
import jakarta.enterprise.event.Event;
import jakarta.inject.Inject;

import org.eclipse.cargotracker.application.ApplicationEvents;
import org.eclipse.cargotracker.application.CargoInspectionService;
import org.eclipse.cargotracker.domain.model.cargo.Cargo;
Expand All @@ -9,9 +13,6 @@
import org.eclipse.cargotracker.domain.model.handling.HandlingHistory;
import org.eclipse.cargotracker.infrastructure.events.cdi.CargoInspected;

import jakarta.ejb.Stateless;
import jakarta.enterprise.event.Event;
import jakarta.inject.Inject;
import java.util.logging.Level;
import java.util.logging.Logger;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
package org.eclipse.cargotracker.application.internal;

import jakarta.ejb.Stateless;
import jakarta.inject.Inject;

import org.eclipse.cargotracker.application.ApplicationEvents;
import org.eclipse.cargotracker.application.HandlingEventService;
import org.eclipse.cargotracker.domain.model.cargo.TrackingId;
Expand All @@ -10,8 +13,6 @@
import org.eclipse.cargotracker.domain.model.location.UnLocode;
import org.eclipse.cargotracker.domain.model.voyage.VoyageNumber;

import jakarta.ejb.Stateless;
import jakarta.inject.Inject;
import java.time.LocalDateTime;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
package org.eclipse.cargotracker.application.util;

import org.eclipse.cargotracker.domain.model.cargo.*;
import org.eclipse.cargotracker.domain.model.handling.*;
import org.eclipse.cargotracker.domain.model.location.SampleLocations;
import org.eclipse.cargotracker.domain.model.voyage.SampleVoyages;

import jakarta.annotation.PostConstruct;
import jakarta.ejb.Singleton;
import jakarta.ejb.Startup;
Expand All @@ -13,6 +8,12 @@
import jakarta.inject.Inject;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

import org.eclipse.cargotracker.domain.model.cargo.*;
import org.eclipse.cargotracker.domain.model.handling.*;
import org.eclipse.cargotracker.domain.model.location.SampleLocations;
import org.eclipse.cargotracker.domain.model.voyage.SampleVoyages;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package org.eclipse.cargotracker.domain.model.cargo;

import static org.eclipse.cargotracker.domain.model.cargo.RoutingStatus.*;
import static org.eclipse.cargotracker.domain.model.cargo.TransportStatus.*;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;

import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
Expand All @@ -9,16 +15,11 @@
import org.eclipse.cargotracker.domain.model.voyage.Voyage;
import org.eclipse.cargotracker.domain.shared.DomainObjectUtils;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Iterator;
import java.util.logging.Logger;

import static org.eclipse.cargotracker.domain.model.cargo.RoutingStatus.*;
import static org.eclipse.cargotracker.domain.model.cargo.TransportStatus.*;

/**
* The actual transportation of the cargo, as opposed to the customer requirement
* (RouteSpecification) and the plan (Itinerary).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package org.eclipse.cargotracker.domain.model.cargo;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotNull;

import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.eclipse.cargotracker.domain.model.handling.HandlingEvent;
import org.eclipse.cargotracker.domain.model.location.Location;
import org.eclipse.cargotracker.domain.model.voyage.Voyage;

import jakarta.persistence.*;
import java.io.Serializable;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package org.eclipse.cargotracker.domain.model.cargo;

import jakarta.persistence.*;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;

import org.apache.commons.lang3.Validate;
import org.eclipse.cargotracker.domain.model.handling.HandlingEvent;
import org.eclipse.cargotracker.domain.model.location.Location;

import jakarta.persistence.*;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package org.eclipse.cargotracker.domain.model.cargo;

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.validation.constraints.NotNull;

import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.eclipse.cargotracker.domain.model.location.Location;
import org.eclipse.cargotracker.domain.shared.AbstractSpecification;

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDate;

Expand Down
Loading

0 comments on commit 37e691e

Please sign in to comment.