Skip to content

Commit

Permalink
Migrate to jakarta namespace, upgrade to Java 17
Browse files Browse the repository at this point in the history
  • Loading branch information
Mobe91 authored and beikov committed Jan 7, 2025
1 parent 5f19d84 commit 8d68adf
Show file tree
Hide file tree
Showing 29 changed files with 117 additions and 196 deletions.
21 changes: 1 addition & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,15 @@ jobs:
# When GitHub Actions supports it: https://github.com/actions/toolkit/issues/399
# We will use the experimental flag as indicator whether a failure should cause a workflow failure
include:
- jdk: 8
- jdk: 11
- jdk: 16
- jdk: 11
build-jdk: 11
- jdk: 17
build-jdk: 17
steps:
- uses: actions/checkout@v2
- name: Set up Java 8
uses: AdoptOpenJDK/install-jdk@v1
with:
version: 8
targets: JDK8_HOME;JAVA_HOME
- name: Download Requested JDK
uses: actions/setup-java@v3
if: ${{ matrix.jdk != 8 }}
with:
java-version: ${{ matrix.jdk }}
distribution: temurin
- name: Set up Requested JDK
uses: actions/setup-java@v3
if: ${{ matrix.jdk != 8 }}
with:
java-version: ${{ matrix.jdk }}
distribution: temurin

- name: Get year/month for cache key
id: get-date
run: |
Expand All @@ -57,14 +39,13 @@ jobs:

- name: Run build script
env:
JDK8_HOME: ${{ env.JDK8_HOME }}
JDK: ${{ matrix.jdk }}
BUILD_JDK: ${{ matrix.build-jdk }}
run: ./ci/build-github.sh
shell: bash

- name: Upload test reports (if Maven failed)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: test-reports-jdk${{ matrix.jdk }}-build-jdk${{ matrix.build-jdk }}
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/publish-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java 8
uses: AdoptOpenJDK/install-jdk@v1
with:
version: 8
targets: JDK8_HOME;JAVA_HOME
- name: Download JDK 17
uses: actions/setup-java@v3
with:
Expand Down Expand Up @@ -43,4 +38,4 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: ./ci/deploy-snapshot.sh
shell: bash
shell: bash
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: java
sudo: false
dist: trusty
dist: jammy
notifications:
slack: "blazebit:$SLACK_API_TOKEN"
cache:
Expand All @@ -21,4 +21,4 @@ env:
matrix:
fast_finish: true
include:
- jdk: oraclejdk8
- jdk: openjdk17
8 changes: 0 additions & 8 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ else
export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=512m $MAVEN_OPTS"
fi

if [ "$JDK" = "9" ]; then
export JAVA_HOME="/usr/lib/jvm/java-9-oracle/"
fi

$DIR/mvnw -version

PROPERTIES="$PROPERTIES -Duser.country=US -Duser.language=en"
Expand All @@ -30,8 +26,4 @@ if [ "$BUILD_JDK" != "" ]; then
PROPERTIES="$PROPERTIES -Djava.version=$BUILD_JDK"
fi

if [ "$JDK" != "" ]; then
PROPERTIES="$PROPERTIES -Djdk8.home=/usr/lib/jvm/java-8-oracle"
fi

exec $DIR/mvnw -B clean install -V $PROPERTIES
2 changes: 1 addition & 1 deletion ci/deploy-snapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

echo "Starting snapshot deployment..."
export MAVEN_OPTS="$MAVEN_OPTS -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
exec $DIR/../mvnw -B -P "blazebit-release" -s $DIR/deploy-settings.xml -DperformRelease -DskipTests -DskipNpmDeploy -Dgpg.skip=true -Dquiet=true -Djdk8.home=$JDK8_HOME clean deploy
exec $DIR/../mvnw -B -P "blazebit-release" -s $DIR/deploy-settings.xml -DperformRelease -DskipTests -DskipNpmDeploy -Dgpg.skip=true -Dquiet=true clean deploy
12 changes: 5 additions & 7 deletions entity-view/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
</properties>

<dependencies>
<!-- Actually we only need JPA but since there is no official artifact we rather use this than provider specific apis -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<scope>provided</scope>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand All @@ -28,12 +26,12 @@
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-entity-view-api</artifactId>
<artifactId>blaze-persistence-entity-view-api-jakarta</artifactId>
<version>${version.blaze-persistence}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>blaze-persistence-entity-view-impl</artifactId>
<artifactId>blaze-persistence-entity-view-impl-jakarta</artifactId>
<version>${version.blaze-persistence}</version>
<scope>runtime</scope>
</dependency>
Expand All @@ -52,4 +50,4 @@
</dependency>
</dependencies>

</project>
</project>
8 changes: 3 additions & 5 deletions entity-view/storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
</properties>

<dependencies>
<!-- Actually we only need JPA but since there is no official artifact we rather use this than provider specific apis -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<scope>provided</scope>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -95,4 +93,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
import com.blazebit.persistence.view.EntityViewManager;
import com.blazebit.persistence.view.EntityViewSetting;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.metamodel.EntityType;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
import jakarta.persistence.metamodel.EntityType;
import java.io.Serializable;
import java.time.Clock;
import java.time.Instant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
import com.blazebit.persistence.view.metamodel.ManagedViewType;
import com.blazebit.persistence.view.metamodel.ViewType;

import javax.persistence.metamodel.EntityType;
import javax.persistence.metamodel.IdentifiableType;
import javax.persistence.metamodel.Metamodel;
import jakarta.persistence.metamodel.EntityType;
import jakarta.persistence.metamodel.IdentifiableType;
import jakarta.persistence.metamodel.Metamodel;
import java.lang.annotation.Annotation;
import java.util.Collection;
import java.util.Map;
Expand Down
6 changes: 2 additions & 4 deletions jpa/model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
</properties>

<dependencies>
<!-- Actually we only need JPA but since there is no official artifact we rather use this than provider specific apis -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<scope>provided</scope>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@

import com.blazebit.job.Job;

import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.MappedSuperclass;
import javax.persistence.PrePersist;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import jakarta.persistence.Column;
import jakarta.persistence.Embedded;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.PrePersist;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import java.time.Instant;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
import com.blazebit.job.JobInstanceProcessingContext;
import com.blazebit.job.JobInstanceState;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.MappedSuperclass;
import javax.persistence.PrePersist;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import jakarta.persistence.Column;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.PrePersist;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;
import java.time.Instant;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
import com.blazebit.job.JobInstanceProcessingContext;
import com.blazebit.job.Schedule;

import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import jakarta.persistence.Column;
import jakarta.persistence.Embedded;
import jakarta.persistence.FetchType;
import jakarta.persistence.ForeignKey;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import jakarta.validation.constraints.NotNull;

/**
* An abstract mapped superclass implementing the {@link JpaJobTrigger} interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

import com.blazebit.job.JobTrigger;

import javax.persistence.FetchType;
import javax.persistence.ForeignKey;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import jakarta.persistence.FetchType;
import jakarta.persistence.ForeignKey;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.MappedSuperclass;
import jakarta.persistence.Table;
import jakarta.validation.constraints.NotNull;

/**
* An abstract mapped superclass implementing the {@link JpaTriggerBasedJobInstance} interface.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.blazebit.job.jpa.model;

import java.io.Serializable;
import javax.persistence.Transient;
import jakarta.persistence.Transient;

/**
* An abstract mapped superclass holding the id and implementing equals and hashCode based on that.
Expand Down Expand Up @@ -57,7 +57,7 @@ public ID id() {

/**
* Returns the id of the entity.
* Subclasses must annotate this method accordingly with {@link javax.persistence.Id} or {@link javax.persistence.EmbeddedId}.
* Subclasses must annotate this method accordingly with {@link jakarta.persistence.Id} or {@link jakarta.persistence.EmbeddedId}.
*
* @return the id of the entity
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@

package com.blazebit.job.jpa.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Lob;
import javax.persistence.Transient;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import jakarta.persistence.Lob;
import jakarta.persistence.Transient;
import java.io.Serializable;
import java.time.Instant;
import java.util.HashMap;
Expand Down
8 changes: 3 additions & 5 deletions jpa/storage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
</properties>

<dependencies>
<!-- Actually we only need JPA but since there is no official artifact we rather use this than provider specific apis -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<scope>provided</scope>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -90,4 +88,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
import com.blazebit.job.jpa.model.JpaTriggerBasedJobInstance;
import com.blazebit.job.spi.TransactionSupport;

import javax.persistence.EntityManager;
import javax.persistence.Query;
import javax.persistence.TypedQuery;
import javax.persistence.metamodel.EntityType;
import jakarta.persistence.EntityManager;
import jakarta.persistence.Query;
import jakarta.persistence.TypedQuery;
import jakarta.persistence.metamodel.EntityType;
import java.io.Serializable;
import java.time.Clock;
import java.time.Instant;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
import com.blazebit.job.jpa.model.JpaPartitionKey;
import com.blazebit.job.spi.PartitionKeyProvider;

import javax.persistence.EntityManager;
import javax.persistence.metamodel.EntityType;
import javax.persistence.metamodel.IdentifiableType;
import javax.persistence.metamodel.Metamodel;
import jakarta.persistence.EntityManager;
import jakarta.persistence.metamodel.EntityType;
import jakarta.persistence.metamodel.IdentifiableType;
import jakarta.persistence.metamodel.Metamodel;
import java.lang.annotation.Annotation;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
Expand Down
Loading

0 comments on commit 8d68adf

Please sign in to comment.