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

refactor(jee): javax.* --> jakarta.* #1794

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
java: [11, 17, 21]
java: [17, 21]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
java-version: 17
cache: maven
- run: git config user.name 'Nya Ξlimu'
- run: git config user.email '[email protected]'
Expand Down
60 changes: 24 additions & 36 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<version>2.4.25-SNAPSHOT</version>

<properties>
<java.version>11</java.version>
<java.version>17</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<model.version>2.0.73</model.version> <!-- https://jitpack.io/#elimu-ai/model -->
<hibernate.version>5.6.15.Final</hibernate.version> <!-- https://repo.maven.apache.org/maven2/org/hibernate/ -->
<jetty.version>10.0.21</jetty.version> <!-- https://repo.maven.apache.org/maven2/org/eclipse/jetty/ -->
<spring.version>5.3.18</spring.version> <!-- https://repo.maven.apache.org/maven2/org/springframework/ -->
<spring.security.version>5.6.2</spring.security.version> <!-- https://repo.maven.apache.org/maven2/org/springframework/security/ -->
<jetty.version>11.0.22</jetty.version> <!-- https://repo.maven.apache.org/maven2/org/eclipse/jetty/ -->
<spring.version>6.0.0</spring.version> <!-- https://repo.maven.apache.org/maven2/org/springframework/ -->
<spring.security.version>6.0.0</spring.security.version> <!-- https://repo.maven.apache.org/maven2/org/springframework/security/ -->
<surefire-plugin.version>3.1.2</surefire-plugin.version> <!-- https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-surefire-plugin/ -->
</properties>

Expand Down Expand Up @@ -301,13 +301,6 @@
<version>model-${model.version}</version>
</dependency>

<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<!-- https://repo.maven.apache.org/maven2/commons-fileupload/commons-fileupload/ -->
<version>1.4</version>
</dependency>

<!-- Spring Framework -->
<dependency>
<groupId>org.springframework</groupId>
Expand Down Expand Up @@ -406,16 +399,11 @@
<artifactId>aspectjweaver</artifactId>
<version>1.9.22.1</version>
</dependency>

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>

<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.1.7.Final</version>
<version>7.0.0.Final</version>
</dependency>


Expand Down Expand Up @@ -499,15 +487,9 @@
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>2.2</version>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>3.0.0</version>
</dependency>

<!-- Audio Metadata -->
Expand All @@ -519,9 +501,9 @@

<!-- Database -->
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
Expand All @@ -539,17 +521,23 @@
<version>1.4</version>
</dependency>

<dependency>
<groupId>jakarta.servlet.jsp.jstl</groupId>
<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
<version>2.0.0</version>
</dependency>

<!-- provided -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.3</version>
<groupId>jakarta.servlet.jsp</groupId>
<artifactId>jakarta.servlet.jsp-api</artifactId>
<version>3.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/config/DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Version: `CentOS 9 Stream`

## Java Virtual Machine (JVM) ☕

Install Java 11 or newer. We will be using [OpenJDK](https://openjdk.org/), but you can also use the JDK from [Oracle](https://www.oracle.com/java/).
Install Java 17 or newer. We will be using [OpenJDK](https://openjdk.org/), but you can also use the JDK from [Oracle](https://www.oracle.com/java/).

Version: `17`

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/ApplicationDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.ApplicationDao;
import ai.elimu.model.admin.Application;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.ApplicationVersionDao;
import ai.elimu.model.admin.Application;
import ai.elimu.model.admin.ApplicationVersion;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/AudioDaoJpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;

import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.AudioDao;
import ai.elimu.model.content.StoryBookParagraph;
import ai.elimu.model.content.Word;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import ai.elimu.model.contributor.AudioPeerReviewEvent;
import ai.elimu.model.contributor.Contributor;
import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import org.springframework.dao.DataAccessException;

public class AudioPeerReviewEventDaoJpa extends GenericDaoJpa<AudioPeerReviewEvent> implements AudioPeerReviewEventDao {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/ContributorDaoJpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.Calendar;
import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.ContributorDao;

import org.springframework.dao.DataAccessException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/DbMigrationDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.DbMigrationDao;

import org.springframework.dao.DataAccessException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/DeviceDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ai.elimu.dao.jpa;

import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.DeviceDao;

import org.springframework.dao.DataAccessException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/EmojiDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.EmojiDao;

import org.springframework.dao.DataAccessException;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ai/elimu/dao/jpa/GenericDaoJpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.lang.reflect.Type;
import java.util.List;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/ImageDaoJpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;

import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;

import org.springframework.dao.DataAccessException;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/LetterDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.LetterDao;

import org.springframework.dao.DataAccessException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import ai.elimu.model.analytics.LetterLearningEvent;
import ai.elimu.model.content.Letter;
import java.util.Calendar;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import org.springframework.dao.DataAccessException;

public class LetterLearningEventDaoJpa extends GenericDaoJpa<LetterLearningEvent> implements LetterLearningEventDao {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/NumberDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;

import org.springframework.dao.DataAccessException;

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/SoundDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.model.content.Sound;

import org.springframework.dao.DataAccessException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/StoryBookDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.StoryBookDao;

import org.springframework.dao.DataAccessException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import ai.elimu.model.content.StoryBook;
import java.util.Calendar;
import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import org.springframework.dao.DataAccessException;

public class StoryBookLearningEventDaoJpa extends GenericDaoJpa<StoryBookLearningEvent> implements StoryBookLearningEventDao {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/SyllableDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.SyllableDao;

import org.springframework.dao.DataAccessException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/elimu/dao/jpa/VideoDaoJpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;

import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import ai.elimu.dao.VideoDao;

import org.springframework.dao.DataAccessException;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ai/elimu/dao/jpa/WordDaoJpa.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ai.elimu.dao.jpa;

import java.util.List;
import javax.persistence.NoResultException;
import javax.persistence.Query;
import jakarta.persistence.NoResultException;
import jakarta.persistence.Query;

import ai.elimu.model.v2.enums.content.WordType;
import org.springframework.dao.DataAccessException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import ai.elimu.model.analytics.WordLearningEvent;
import ai.elimu.model.content.Word;
import java.util.Calendar;
import javax.persistence.NoResultException;
import jakarta.persistence.NoResultException;
import org.springframework.dao.DataAccessException;

public class WordLearningEventDaoJpa extends GenericDaoJpa<WordLearningEvent> implements WordLearningEventDao {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/ai/elimu/model/BaseEntity.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package ai.elimu.model;

import java.io.Serializable;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.MappedSuperclass;

@MappedSuperclass
public abstract class BaseEntity implements Serializable {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/ai/elimu/model/DbMigration.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ai.elimu.model;

import java.util.Calendar;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Temporal;
import jakarta.persistence.TemporalType;
import jakarta.validation.constraints.NotNull;

@Entity
public class DbMigration extends BaseEntity {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/ai/elimu/model/Device.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package ai.elimu.model;

import java.util.Calendar;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Temporal;
import jakarta.persistence.TemporalType;
import jakarta.validation.constraints.NotNull;

@Entity
public class Device extends BaseEntity {
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/ai/elimu/model/admin/Application.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package ai.elimu.model.admin;

import java.util.Set;
import javax.persistence.ElementCollection;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import jakarta.persistence.ElementCollection;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.FetchType;
import jakarta.persistence.ManyToOne;
import jakarta.validation.constraints.NotNull;
import ai.elimu.model.BaseEntity;
import ai.elimu.model.contributor.Contributor;
import ai.elimu.model.v2.enums.content.LiteracySkill;
Expand Down
Loading
Loading