未验证 提交 e52ff6a1 编写于 作者: I Igor Dianov 提交者: GitHub

AAE-10754 Migrate Activiti maven projects to JDK 17 (#4337)

* Update GitHub workflow to use Java 17 LTS

* Add GraalVM js-scriptengine dependency version 22.2.0

* use nashorn-core version 15.4

* update java.release properties to 17

* add preview label support for deploy to Nexus

* update ActivityEventsTest.testActivityTimeOutEvent wait timeout to 5000

* refactor pom.xml to update java.version to 17

* AAE-14392 Integrate Nashorn in Activiti core

* chore: remove preview branch build support from CI build

* fix recursive expression cycle in 'java.release'

* Revert "AAE-14392 Integrate Nashorn in Activiti core"

This reverts commit a3d2f2cd.

* Update references in the README

* Update pom.xml
Co-authored-by: NAnahide Tchertchian <608958+atchertchian@users.noreply.github.com>

---------
Co-authored-by: NElias Ricken de Medeiros <26007058+erdemedeiros@users.noreply.github.com>
Co-authored-by: NAnahide Tchertchian <608958+atchertchian@users.noreply.github.com>
上级 8e6ab0a9
......@@ -39,10 +39,10 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Setup Java JDK 11
- name: Setup Java JDK 17
uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # 3.6.0
with:
java-version: 11
java-version: 17
distribution: 'temurin'
- uses: Alfresco/alfresco-build-tools/.github/actions/update-pom-to-next-pre-release@v1.21.0
......@@ -55,20 +55,20 @@ jobs:
echo ${{steps.update-pom-to-next-version.outputs.next-prerelease}} > VERSION
- name: Set preview version
if: ${{ contains(github.head_ref, 'preview') }}
if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'preview') }}
run: |
GITHUB_PR_NUMBER=PR-${{ github.event.pull_request.number }}
echo 0.0.1-${GITHUB_PR_NUMBER}-${GITHUB_RUN_NUMBER}-SNAPSHOT > VERSION
- name: Set VERSION env variable
if: ${{ github.event_name == 'push' || contains(github.head_ref, 'preview') }}
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'preview')) }}
run: |
VERSION=$(cat VERSION)
echo set VERSION=$VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Update pom files to the new version
if: ${{ contains(github.head_ref, 'preview') }}
if: ${{ github.event_name == 'pull_request' && (contains(github.head_ref, 'preview') || contains(github.event.pull_request.labels.*.name, 'preview')) }}
run: mvn -B versions:set -DnewVersion=$VERSION -DprocessAllModules=true -DgenerateBackupPoms=false
- name: Define Maven Command
......@@ -82,7 +82,7 @@ jobs:
echo "command=verify" >> $GITHUB_OUTPUT
fi
env:
DO_PUSH: ${{ github.event_name == 'push' || contains(github.head_ref, 'preview') }}
DO_PUSH: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'preview')) }}
- name: Build and Test with Maven (and maybe Deploy)
shell: bash
......
......@@ -19,10 +19,10 @@ If you want to read more about our Repositories structure you can read our [GitB
## Configuring IntelliJ
- Force language level 11, to fail-fast when (accidentally) using features available only in newer Java versions.
- Force language level 17, to fail-fast when (accidentally) using features available only in newer Java versions.
- Open menu _File_, menu item _Project Structure_
- Click list item _Modules_, for each module, tab _Sources_, combobox _Language level_ should be automatically set to `11 ...`
- Click list item _Modules_, for each module, tab _Sources_, combobox _Language level_ should be automatically set to `17 ...`
- Avoid that changes in some resources are ignored in the next run/debug (and you are forced to use mvn)
......
......@@ -102,6 +102,11 @@
<artifactId>groovy-jsr223</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
......
......@@ -24,7 +24,6 @@ import static org.assertj.core.api.Assertions.tuple;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import org.activiti.engine.delegate.event.ActivitiActivityCancelledEvent;
import org.activiti.engine.delegate.event.ActivitiActivityEvent;
import org.activiti.engine.delegate.event.ActivitiErrorEvent;
......@@ -486,7 +485,7 @@ public class ActivityEventsTest extends PluggableActivitiTestCase {
Calendar tomorrow = Calendar.getInstance();
tomorrow.add(Calendar.DAY_OF_YEAR, 1);
processEngineConfiguration.getClock().setCurrentTime(tomorrow.getTime());
waitForJobExecutorToProcessAllJobs(2000, 1000);
waitForJobExecutorToProcessAllJobs(5000, 1000);
// Check timeout has been dispatched
assertThat(listener.getEventsReceived()).hasSize(1);
......
......@@ -24,6 +24,7 @@
<mybatis.version>3.5.10</mybatis.version>
<subethasmtp-wiser.version>1.2</subethasmtp-wiser.version>
<xmlgraphics-commons.version>2.7</xmlgraphics-commons.version>
<nashorn-core.version>15.4</nashorn-core.version>
</properties>
<dependencyManagement>
<dependencies>
......@@ -171,6 +172,11 @@
<artifactId>joda-time</artifactId>
<version>${joda-time.version}</version>
</dependency>
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>${nashorn-core.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
......
......@@ -189,8 +189,8 @@
<project.scm.repository>Activiti</project.scm.repository>
<project.year>2020</project.year>
<java.release>11</java.release>
<java.version>1.${java.release}</java.version>
<java.release>${java.version}</java.release>
<java.version>17</java.version>
<maven.compiler.release>${java.release}</maven.compiler.release>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册