Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
c788337
feature: add GraalVM native image build support for Seata server
xuxiaowei-com-cn Jul 8, 2026
0645a10
chore: add -e flag to all Maven commands in Makefile for consistent e…
xuxiaowei-com-cn Jul 8, 2026
10794cc
feature: add GraalVM native image build workflow for Seata server
xuxiaowei-com-cn Jul 8, 2026
1abb4a8
chore: upgrade actions/checkout to v7.0.0 and actions/setup-java to v…
xuxiaowei-com-cn Jul 8, 2026
3fd6a21
chore: clean Maven SNAPSHOT artifacts before caching in native workflow
xuxiaowei-com-cn Jul 8, 2026
8c2cc0f
chore: add -DskipTests to native compile step in native workflow
xuxiaowei-com-cn Jul 8, 2026
08341c1
chore: temporarily disable native compile step for cache testing
xuxiaowei-com-cn Jul 8, 2026
bf0fb71
Revert "chore: temporarily disable native compile step for cache test…
xuxiaowei-com-cn Jul 8, 2026
8f8dd33
chore: add mainClass and GraalVM native build args to native/nativeTe…
xuxiaowei-com-cn Jul 8, 2026
637afe5
chore: upgrade zstd-jni from 1.5.0-4 to 1.5.7-3
xuxiaowei-com-cn Jul 8, 2026
37e4ddc
chore: add ARM64 runner and fix native build dependencies
xuxiaowei-com-cn Jul 8, 2026
d5fbf67
fix: prevent native build concurrency conflicts between different OS …
xuxiaowei-com-cn Jul 8, 2026
86b6d5d
Revert "fix: prevent native build concurrency conflicts between diffe…
xuxiaowei-com-cn Jul 8, 2026
0e8c990
chore: disable concurrency for native build CI
xuxiaowei-com-cn Jul 8, 2026
239f151
Revert "chore: disable concurrency for native build CI"
xuxiaowei-com-cn Jul 8, 2026
0e7f911
chore: pin native build runner to ubuntu-24.04
xuxiaowei-com-cn Jul 8, 2026
1088d80
chore: expand native build matrix to macOS and Windows
xuxiaowei-com-cn Jul 8, 2026
46b2255
chore: improve native build step name readability
xuxiaowei-com-cn Jul 8, 2026
8dd915b
fix: add --initialize-at-run-time for io.netty.channel.kqueue in nati…
xuxiaowei-com-cn Jul 8, 2026
f197b6b
fix: correct macOS runner label from macos-26-large to macos-26-xlarge
xuxiaowei-com-cn Jul 8, 2026
0100dc0
chore: use default macos-26 runner instead of macos-26-xlarge
xuxiaowei-com-cn Jul 8, 2026
033f03c
fix: add shell: sh for SNAPSHOT cleanup step to work on Windows runners
xuxiaowei-com-cn Jul 8, 2026
66403ec
feat: add native image name with platform classifier and upload binaries
xuxiaowei-com-cn Jul 8, 2026
96bbb56
feat: add GraalVM native image reflect and resource config for seata …
xuxiaowei-com-cn Jul 8, 2026
fa72b74
fix: update GraalVM native image configs for GraalVM 25 compatibility
xuxiaowei-com-cn Jul 8, 2026
ec4be2d
fix: move GraalVM native image configs to org.apache.seata/seata-serv…
xuxiaowei-com-cn Jul 8, 2026
4f42188
style: apply Spotless JSON formatting to GraalVM native-image configs
xuxiaowei-com-cn Jul 8, 2026
ae8880b
fix: add missing reflection methods for GraalVM native image config
xuxiaowei-com-cn Jul 9, 2026
e533314
refactor: simplify logback-spring.xml by removing conditional LOG_BAS…
xuxiaowei-com-cn Jul 9, 2026
9846850
fix: add spring-boot:process-aot before native:compile for GraalVM na…
xuxiaowei-com-cn Jul 9, 2026
cdbd55a
test: update AppenderTest to reflect Janino <if> removal for GraalVM …
xuxiaowei-com-cn Jul 9, 2026
0626190
refactor: add explicit logback appender includes and clean up blank l…
xuxiaowei-com-cn Jul 9, 2026
c9f6593
refactor: add explicit logstash/kafka/metric appender-refs for GraalV…
xuxiaowei-com-cn Jul 9, 2026
e936b62
test: disable AppenderTest
xuxiaowei-com-cn Jul 9, 2026
c28c59c
Revert "refactor: add explicit logstash/kafka/metric appender-refs fo…
xuxiaowei-com-cn Jul 9, 2026
9057167
Revert "refactor: add explicit logback appender includes and clean up…
xuxiaowei-com-cn Jul 9, 2026
7f91b57
refactor: improve GraalVM native-image compatibility
xuxiaowei-com-cn Jul 9, 2026
507f5c1
refactor: move native platform detection profiles from server/pom.xml…
xuxiaowei-com-cn Jul 9, 2026
6044e6d
refactor: move default native.platform property from server/pom.xml t…
xuxiaowei-com-cn Jul 9, 2026
f74fd9b
docs: add changelog entry for GraalVM native image build support (#8162)
xuxiaowei-com-cn Jul 9, 2026
44ea34e
chore: add spotless-apply dependency to native image build targets
xuxiaowei-com-cn Jul 9, 2026
11bbce1
feat: add native-image metadata generation targets and improve Makefi…
xuxiaowei-com-cn Jul 9, 2026
998b3a0
fix: update GraalVM native-image metadata for seata-server
xuxiaowei-com-cn Jul 9, 2026
3db269d
chore: upgrade actions/cache from v4 to v6.1.0 in native build workflow
xuxiaowei-com-cn Jul 9, 2026
24ca336
fix: update GraalVM native-image metadata for seata-server
xuxiaowei-com-cn Jul 9, 2026
7101ba1
feat: add test job with PID and port 8091 health checks for native bi…
xuxiaowei-com-cn Jul 9, 2026
ab27b6b
refactor: hardcode java-version and add matrix.type support for test job
xuxiaowei-com-cn Jul 9, 2026
1d9ac1f
refactor: merge test job into build job in native workflow
xuxiaowei-com-cn Jul 9, 2026
7a075c6
fix: clean up jar files before verifying native binary
xuxiaowei-com-cn Jul 9, 2026
81feeaa
fix: reduce native compile threads to 2C and use RUNNER_TEMP for PID …
xuxiaowei-com-cn Jul 9, 2026
9750127
fix: use runner.temp instead of env.RUNNER_TEMP for PID file path
xuxiaowei-com-cn Jul 9, 2026
6c08a98
fix: cross-platform port check and pid file path in native workflow
xuxiaowei-com-cn Jul 9, 2026
f3ec29e
fix: use /health endpoint for port check instead of root path
xuxiaowei-com-cn Jul 9, 2026
7568a6b
feat: add test-native module for GraalVM native image AT mode tests
xuxiaowei-com-cn Jul 10, 2026
5f93f26
fix: add seata-spring-boot-starter to native workflow install depende…
xuxiaowei-com-cn Jul 10, 2026
6553247
feat: add MySQL service container to native build workflow for test-n…
xuxiaowei-com-cn Jul 10, 2026
38095e4
fix: replace services block with docker run for MySQL, only supported…
xuxiaowei-com-cn Jul 10, 2026
122068f
chore: upgrade Maven Wrapper to 3.3.4 and Maven to 3.9.16
xuxiaowei-com-cn Jul 10, 2026
05d08c2
feat: add test-native module for GraalVM native image AT mode tests
xuxiaowei-com-cn Jul 10, 2026
9a16896
fix: add -H:+SharedArenaSupport to GraalVM native image build args to…
xuxiaowei-com-cn Jul 10, 2026
bb9b76b
feat: add REST controllers and refactor native tests for AT mode
xuxiaowei-com-cn Jul 10, 2026
e5bd4ce
chore: add ASF license headers and clean up unused code in test-native
xuxiaowei-com-cn Jul 10, 2026
8ee009a
chore: downgrade maven-surefire-plugin from 3.5.5 to 3.0.0-M5
xuxiaowei-com-cn Jul 10, 2026
4da57b2
Revert "chore: upgrade Maven Wrapper to 3.3.4 and Maven to 3.9.16"
xuxiaowei-com-cn Jul 10, 2026
3637d93
refactor: simplify test data to single user (U001) and clean up forma…
xuxiaowei-com-cn Jul 10, 2026
47306ed
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Jul 22, 2026
60764d4
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Jul 24, 2026
4f31be9
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Jul 25, 2026
5dfed37
ci: remove macos-26-intel from native build matrix
xuxiaowei-com-cn Jul 27, 2026
66a1224
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Jul 27, 2026
2dd51d1
chore: remove redundant -e flag from Makefile targets (already in MAV…
xuxiaowei-com-cn Jul 27, 2026
4a0be0f
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Jul 27, 2026
22dc2c1
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Jul 27, 2026
1bb1a9a
chore: bump native-maven-plugin from 1.1.3 to 1.1.5
xuxiaowei-com-cn Jul 27, 2026
0dc9e68
chore: add javadoc for SingleResult no-arg constructor
xuxiaowei-com-cn Jul 27, 2026
c82615c
test: add no-arg constructor test for SingleResult
xuxiaowei-com-cn Jul 24, 2026
9d5b197
refactor: rename test-native to test-native-server and enhance GraalV…
xuxiaowei-com-cn Jul 27, 2026
d246e18
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Aug 1, 2026
bf6f9ff
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Aug 7, 2026
e5d2947
refactor: rename native.yml to native-server.yml and improve CI workflow
xuxiaowei-com-cn Aug 8, 2026
4cab0a0
chore: expand native-server CI pull_request paths to all Seata modules
xuxiaowei-com-cn Aug 8, 2026
6cdafd8
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Aug 8, 2026
88e1a77
refactor: consolidate GraalVM native-image config into reachability-m…
xuxiaowei-com-cn Aug 8, 2026
cd28bc7
refactor: refine GraalVM native-image build-time init to class-level …
xuxiaowei-com-cn Aug 8, 2026
1c36fb8
fix: rename getter/setter to match field name enableBranchAsyncRemove
xuxiaowei-com-cn Aug 8, 2026
cea4181
feat: add GraalVM runtime hints for Apollo Guice-managed classes
xuxiaowei-com-cn Aug 8, 2026
411b69a
feat: add dynamic SPI reflection hints registrar for GraalVM native-i…
xuxiaowei-com-cn Aug 8, 2026
fc093d9
chore: add Apache License header to aot.factories
xuxiaowei-com-cn Aug 9, 2026
85c72d6
fix: add Netty kqueue classes to run-time init for GraalVM native-image
xuxiaowei-com-cn Aug 9, 2026
d64b63c
feat: enable fallback compilation for GraalVM native-image build
xuxiaowei-com-cn Aug 9, 2026
8c060d2
fix: use standard -H:FallbackCompilation=true syntax for GraalVM nati…
xuxiaowei-com-cn Aug 9, 2026
72fe36e
Revert "fix: use standard -H:FallbackCompilation=true syntax for Graa…
xuxiaowei-com-cn Aug 9, 2026
fb8ffb9
Revert "feat: enable fallback compilation for GraalVM native-image bu…
xuxiaowei-com-cn Aug 9, 2026
48733c4
feat: add native metadata merge tool and enrich GraalVM reachability …
xuxiaowei-com-cn Aug 9, 2026
7c813d3
style: rename log to LOGGER for static final Logger fields
xuxiaowei-com-cn Aug 9, 2026
0664e96
feat: add HealthRestController for native server health check
xuxiaowei-com-cn Aug 9, 2026
ba1f03f
feat: enrich GraalVM reachability metadata for HTTP server and Apollo…
xuxiaowei-com-cn Aug 9, 2026
169ad5c
style: fix line wrapping and remove trailing blank line in test
xuxiaowei-com-cn Aug 9, 2026
0ca2ecf
feat: enrich GraalVM reachability metadata for Apollo Guice FastClass…
xuxiaowei-com-cn Aug 9, 2026
84cdf51
feat: enrich GraalVM reachability metadata for Netty epoll x86_64 nat…
xuxiaowei-com-cn Aug 9, 2026
19dd5bf
refactor: simplify native-image metadata path by removing Maven coord…
xuxiaowei-com-cn Aug 9, 2026
ef09967
fix: preserve JVM external conf logback support for seata-server with…
xuxiaowei-com-cn Aug 9, 2026
49bcaa5
feat: add Nacos config and registry support for seata-server GraalVM …
xuxiaowei-com-cn Aug 10, 2026
d767554
Merge remote-tracking branch 'apache/2.x' into xuxiaowei/Seata-Server…
xuxiaowei-com-cn Aug 11, 2026
fb9d6bb
chore: remove MergeNativeImageConfig.java and add __pycache__ to .git…
xuxiaowei-com-cn Aug 11, 2026
127ab4f
chore: add test-native-server profile to spotless-check target
xuxiaowei-com-cn Aug 11, 2026
6d699ff
chore: add test-native-server target to Makefile
xuxiaowei-com-cn Aug 11, 2026
8bd5e00
chore: add install-run-server-native-jar and run-server-native-jar ta…
xuxiaowei-com-cn Aug 11, 2026
51ebdd9
chore: add server native image build/run targets and split file/nacos…
xuxiaowei-com-cn Aug 11, 2026
951bed6
feat: add reachability metadata for Apollo FastClassByGuice and Nacos…
xuxiaowei-com-cn Aug 11, 2026
acf1fe6
fix: deduplicate FastClassByGuice entries in native image metadata merge
xuxiaowei-com-cn Aug 11, 2026
f08921c
chore: simplify native image JAR cleanup in CI workflow
xuxiaowei-com-cn Aug 11, 2026
c2443a9
chore: update default NACOS_GROUP to SEATA_GROUP in Makefile
xuxiaowei-com-cn Aug 11, 2026
6df624d
feat: add reachability metadata for Netty epoll native transport and …
xuxiaowei-com-cn Aug 11, 2026
b6f82ee
fix: prevent duplicate array elements in native image metadata merge
xuxiaowei-com-cn Aug 11, 2026
c59b739
feat: add aarch64 epoll native library glob for Nacos-shaded Netty in…
xuxiaowei-com-cn Aug 11, 2026
c773b70
chore: add explicit shell: sh for native compile step in CI workflow
xuxiaowei-com-cn Aug 11, 2026
d23dd50
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Aug 12, 2026
141418d
feat: add nacos config mode test job and rename build job
xuxiaowei-com-cn Aug 12, 2026
dcef442
refactor: simplify pull_request paths trigger for native-server workflow
xuxiaowei-com-cn Aug 12, 2026
3e326c3
fix: add build dependency to nacos job
xuxiaowei-com-cn Aug 12, 2026
b8828ce
refactor: replace download-artifact with gh run download polling for …
xuxiaowei-com-cn Aug 12, 2026
decbc63
refactor: wait for build job completion before downloading artifact i…
xuxiaowei-com-cn Aug 12, 2026
5fd74cf
fix: adjust retry timeout for Windows in native-server workflow
xuxiaowei-com-cn Aug 12, 2026
920f3b3
fix: add chmod +x after download-artifact in nacos job
xuxiaowei-com-cn Aug 12, 2026
c6e1f6b
feat: add Nacos Docker container startup in nacos job
xuxiaowei-com-cn Aug 12, 2026
27e1e69
fix: clean up jar files after install in nacos job
xuxiaowei-com-cn Aug 12, 2026
9ebb901
Merge branch '2.x' into xuxiaowei/Seata-Server-GraalVM
xuxiaowei-com-cn Aug 20, 2026
c23bceb
fix: build and run Nacos from source in native-server workflow
xuxiaowei-com-cn Aug 20, 2026
7f121a4
fix: checkout Nacos into separate directory in native-server workflow
xuxiaowei-com-cn Aug 20, 2026
937f1c0
fix: use Maven wrapper when building and starting Nacos
xuxiaowei-com-cn Aug 20, 2026
9e97052
fix: enable Maven batch mode for Nacos steps
xuxiaowei-com-cn Aug 20, 2026
8307aa5
fix: remove shell override from Maven version step
xuxiaowei-com-cn Aug 20, 2026
5856e0e
fix: remove shell overrides from native server steps
xuxiaowei-com-cn Aug 20, 2026
49fb2b1
fix: disable Nacos auth when starting Nacos
xuxiaowei-com-cn Aug 20, 2026
5d2a969
feat: add RegistryNamingServerProperties setter reflection metadata f…
xuxiaowei-com-cn Aug 22, 2026
8f6f610
feat: add reflection metadata for JSON codecs, crypto, and TLS provid…
xuxiaowei-com-cn Aug 22, 2026
e460a1a
feat: add AppleProvider reflection and ICU normalization resource met…
xuxiaowei-com-cn Aug 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
402 changes: 402 additions & 0 deletions .github/workflows/native-server.yml

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,5 @@ Thumbs.db
/console/src/main/resources/static/saga-statemachine-designer/
/console/src/main/resources/static/index.html
/console/src/main/resources/static/version.json

__pycache__/
129 changes: 120 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,26 @@ SHELL := /usr/bin/env bash
# matching the target name — make will always execute them regardless of file timestamps)
.PHONY: help clean spotless-check spotless-apply checkstyle checkstyle-diff license test \
package-only package \
install-server-jar install-namingserver-jar \
install-run-namingserver-native-jar run-namingserver-native-jar \
install-run-server-jar run-server-jar \
install-run-server-jar-registry-seata run-server-jar-registry-seata \
install-server-jar \
install-namingserver-jar \
install-run-namingserver-native-jar \
run-namingserver-native-jar \
install-run-server-native-file-jar \
run-server-native-file-jar \
install-run-server-jar \
run-server-jar \
install-run-server-jar-registry-seata \
run-server-jar-registry-seata \
test-native-namingserver \
test-native-server \
run-merge-native-namingserver \
install-namingserver-native package-namingserver-native \
run-namingserver-native
install-namingserver-native \
package-namingserver-native \
run-namingserver-native \
install-server-native \
package-server-native \
run-server-native-file \
run-server-native-nacos

help: ## Show help information
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-34s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
Expand All @@ -45,16 +57,52 @@ MVN ?= $(shell command -v mvn >/dev/null 2>&1 && echo "mvn" || echo "./mvnw")
MAVEN_ARGS ?= -T 4C -e -B -V

NACOS_SERVER_ADDR ?= 127.0.0.1:8848
NACOS_NAMESPACE ?=
NACOS_GROUP ?= SEATA_GROUP
NACOS_DATAID ?= seataServer.properties
NACOS_USERNAME ?=
NACOS_PASSWORD ?=

# Dynamically resolve the namingserver version from the Maven project (e.g. 2.8.0-SNAPSHOT)
# Shared Nacos environment variables for config (nacos) + registry (nacos) + store (file) mode
define NACOS_MODE_ENV
SEATA_CONFIG_TYPE=nacos \
SEATA_CONFIG_NACOS_SERVERADDR=$(NACOS_SERVER_ADDR) \
SEATA_CONFIG_NACOS_NAMESPACE=$(NACOS_NAMESPACE) \
SEATA_CONFIG_NACOS_GROUP=$(NACOS_GROUP) \
SEATA_CONFIG_NACOS_CONTEXTPATH= \
SEATA_CONFIG_NACOS_USERNAME=$(NACOS_USERNAME) \
SEATA_CONFIG_NACOS_PASSWORD=$(NACOS_PASSWORD) \
SEATA_CONFIG_NACOS_ACCESSKEY= \
SEATA_CONFIG_NACOS_SECRETKEY= \
SEATA_CONFIG_NACOS_RAMROLENAME= \
SEATA_CONFIG_NACOS_DATAID=$(NACOS_DATAID) \
SEATA_REGISTRY_TYPE=nacos \
SEATA_REGISTRY_PREFERREDNETWORKS=30.240.* \
SEATA_REGISTRY_IGNOREDINTERFACES=VMware.* \
SEATA_REGISTRY_METADATA_WEIGHT=100 \
SEATA_REGISTRY_NACOS_APPLICATION=seata-server \
SEATA_REGISTRY_NACOS_SERVERADDR=$(NACOS_SERVER_ADDR) \
SEATA_REGISTRY_NACOS_NAMESPACE=$(NACOS_NAMESPACE) \
SEATA_REGISTRY_NACOS_GROUP=$(NACOS_GROUP) \
SEATA_REGISTRY_NACOS_CLUSTER=default \
SEATA_REGISTRY_NACOS_CONTEXTPATH= \
SEATA_REGISTRY_NACOS_USERNAME=$(NACOS_USERNAME) \
SEATA_REGISTRY_NACOS_PASSWORD=$(NACOS_PASSWORD) \
SEATA_REGISTRY_NACOS_ACCESSKEY= \
SEATA_REGISTRY_NACOS_SECRETKEY= \
SEATA_REGISTRY_NACOS_RAMROLENAME= \
SEATA_STORE_TYPE=file
endef

# Dynamically resolve the namingserver/server version from the Maven project (e.g. 2.8.0-SNAPSHOT)
SERVER_VERSION ?= $(shell $(MVN) help:evaluate -Dexpression=project.version -q -DforceStdout)
NATIVE_PLATFORM=$(shell $(MVN) help:evaluate -Dexpression=native.platform -q -DforceStdout)
NATIVE_PLATFORM ?= $(shell $(MVN) help:evaluate -Dexpression=native.platform -q -DforceStdout)

clean: ## Clean the project
$(MVN) $(MAVEN_ARGS) clean

spotless-check: ## Run Spotless code format check
$(MVN) $(MAVEN_ARGS) spotless:check -Ptest-native-metadata-merge -Ptest-native-namingserver
$(MVN) $(MAVEN_ARGS) spotless:check -Ptest-native-metadata-merge -Ptest-native-namingserver -Ptest-native-server

spotless-apply: ## Apply Spotless code formatting
$(MVN) $(MAVEN_ARGS) spotless:apply -Ptest-native-metadata-merge -Ptest-native-namingserver
Expand Down Expand Up @@ -118,6 +166,32 @@ run-namingserver-native-jar: ## Run namingserver with GraalVM native-image agent
@echo " make run-merge-native-namingserver"
${GRAALVM_HOME}/bin/java -agentlib:native-image-agent=config-output-dir=./target/native-image-config -jar ./namingserver/target/seata-namingserver.jar --console.user.username=seata --console.user.password=seata

install-run-server-native-file-jar: install-server-jar ## Build, install, and run server with GraalVM native-image agent
@$(MAKE) --no-print-directory run-server-native-file-jar

run-server-native-file-jar: ## Run server with GraalVM native-image agent (without prior build/install)
@echo "=== Workload steps (run in separate terminals) ==="
@echo "1. Start server in seata registry mode connecting to server:"
@echo " make install-run-server-jar-registry-seata"
@echo " or"
@echo " make run-server-jar-registry-seata"
@echo "2. Run the native server test suite:"
@echo " make test-native-server"
@echo "3. After tests pass, stop this server (Ctrl+C) so the agent flushes metadata,"
@echo " then merge the collected metadata:"
@echo " make run-merge-native-server"
SEATA_CONFIG_TYPE=file \
SEATA_REGISTRY_TYPE=file \
SEATA_STORE_TYPE=file \
${GRAALVM_HOME}/bin/java -agentlib:native-image-agent=config-output-dir=./target/native-image-config -jar ./server/target/seata-server.jar

install-run-server-native-nacos-jar: install-server-jar ## Build, install, and run server with GraalVM native-image agent
@$(MAKE) --no-print-directory run-server-native-nacos-jar

run-server-native-nacos-jar: ## Run server with GraalVM native-image agent (without prior build/install)
$(NACOS_MODE_ENV) \
${GRAALVM_HOME}/bin/java -agentlib:native-image-agent=config-output-dir=./target/native-image-config -jar ./server/target/seata-server.jar

install-run-server-jar: install-server-jar ## Build, install, and run the server JAR
@$(MAKE) --no-print-directory run-server-jar

Expand All @@ -137,10 +211,17 @@ run-server-jar-registry-seata: ## Run the server JAR (without prior build/instal
test-native-namingserver: ## Run namingserver GraalVM native-image compatibility tests (requires GraalVM with native-image)
$(MVN) $(MAVEN_ARGS) clean test -Ptest-native-namingserver -pl test-suite/test-native-namingserver

test-native-server:
$(MVN) $(MAVEN_ARGS) clean test -Ptest-native-server -pl test-suite/test-native-server

run-merge-native-namingserver: ## Merge collected native-image metadata into the namingserver resource directory (required to regenerate native metadata)
EXECUTE_NATIVE_METADATA_MERGE_NAMINGSERVER=true \
$(MVN) $(MAVEN_ARGS) clean test -Dtest=ExecuteMergeNativeImageMetadataTests#namingServer -pl test-suite/test-native-metadata-merge -Ptest-native-metadata-merge

run-merge-native-server: ## Merge collected native-image metadata into the server resource directory (required to regenerate native metadata)
EXECUTE_NATIVE_METADATA_MERGE_SERVER=true \
$(MVN) $(MAVEN_ARGS) clean test -Dtest=ExecuteMergeNativeImageMetadataTests#server -pl test-suite/test-native-metadata-merge -Ptest-native-metadata-merge

install-namingserver-native: install-namingserver-jar ## Build namingserver GraalVM native image (requires install-namingserver-jar including its spotless-apply dependency)
@$(MAKE) --no-print-directory package-namingserver-native

Expand All @@ -158,3 +239,33 @@ run-namingserver-native: ## Run the namingserver native image binary directly
CONSOLE_USER_USERNAME=seata \
CONSOLE_USER_PASSWORD=seata \
./namingserver/target/seata-namingserver-$(SERVER_VERSION)-$(NATIVE_PLATFORM)

install-server-native: install-server-jar ## Build server GraalVM native image (requires install-server-jar including its spotless-apply dependency)
@$(MAKE) --no-print-directory package-server-native

package-server-native: spotless-apply ## Build server GraalVM native image (requires install-server-native or install-server-jar to be executed first; spotless-apply runs first as a direct prerequisite)
$(MVN) $(MAVEN_ARGS) clean package -DskipTests -pl server spring-boot:process-aot -Pnative native:compile

run-server-native-file: ## Run the server native image binary directly
@echo "=== Workload steps (run in separate terminals) ==="
@echo "1. Start server in seata registry mode connecting to server:"
@echo " make install-run-server-jar-registry-seata"
@echo " or"
@echo " make run-server-jar-registry-seata"
@echo "2. Run the native server test suite:"
@echo " make test-native-server"
SEATA_CONFIG_TYPE=file \
SEATA_REGISTRY_TYPE=file \
SEATA_STORE_TYPE=file \
./server/target/seata-server-$(SERVER_VERSION)-$(NATIVE_PLATFORM)

run-server-native-nacos: ## Run the server native image binary directly
@echo "=== Workload steps (run in separate terminals) ==="
@echo "1. Start server in seata registry mode connecting to server:"
@echo " make install-run-server-jar-registry-seata"
@echo " or"
@echo " make run-server-jar-registry-seata"
@echo "2. Run the native server test suite:"
@echo " make test-native-server"
$(NACOS_MODE_ENV) \
./server/target/seata-server-$(SERVER_VERSION)-$(NATIVE_PLATFORM)
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Add changes here for all PR submitted to the 2.x branch.
### feature:

- [[#8165](https://github.com/apache/incubator-seata/pull/8165)]/[[#8200](https://github.com/apache/incubator-seata/pull/8200)] add GraalVM native image build support for seata-namingserver
- [[#8162](https://github.com/apache/incubator-seata/pull/8162)] add GraalVM native image build support for seata-server
- [[#8140](https://github.com/apache/incubator-seata/pull/8140)] support automatic updated marking after BusinessActionContext modifications
- [[#8188](https://github.com/apache/incubator-seata/pull/8188)] support action status report and TccHook rollback interceptors in Saga annotation mode for anti-suspension and empty rollback

Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
### feature:

- [[#8165](https://github.com/apache/incubator-seata/pull/8165)]/[[#8200](https://github.com/apache/incubator-seata/pull/8200)] 为 seata-namingserver 添加 GraalVM 原生镜像构建支持
- [[#8162](https://github.com/apache/incubator-seata/pull/8162)] 为 seata-server 添加 GraalVM 原生镜像构建支持
- [[#8140](https://github.com/apache/incubator-seata/pull/8140)] 支持在 BusinessActionContext 变更后自动标记 updated
- [[#8188](https://github.com/apache/incubator-seata/pull/8188)] Saga 注解模式支持 action status 上报和 TccHook 回滚切面,增强防悬挂和空回滚能力

Expand Down
2 changes: 1 addition & 1 deletion dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<hessian.version>4.0.63</hessian.version>
<fastjson2.version>2.0.52</fastjson2.version>
<groovy.version>4.0.31</groovy.version>
<zstd.version>1.5.0-4</zstd.version>
<zstd.version>1.5.7-3</zstd.version>
<jackson.version>2.18.3</jackson.version>
<jackson3.version>3.1.1</jackson3.version>
<xstream.version>1.4.21</xstream.version>
Expand Down
6 changes: 5 additions & 1 deletion distribution/release-seata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,13 @@
<outputDirectory>seata-server/conf/</outputDirectory>
</file>

<!-- Use logback-spring-jvm.xml (with &lt;if&gt; conditional for external conf support)
as the distribution config, renamed to logback-spring.xml so the existing
launch script (-Dlogging.config=.../conf/logback-spring.xml) picks it up. -->
<file>
<source>../server/src/main/resources/logback-spring.xml</source>
<source>../server/src/main/resources/logback-spring-jvm.xml</source>
<outputDirectory>seata-server/conf/</outputDirectory>
<destName>logback-spring.xml</destName>
</file>

<file>
Expand Down
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,12 @@
</profile>

<!-- profile: native -->
<profile>
<id>test-native-server</id>
<modules>
<module>test-suite/test-native-server</module>
</modules>
</profile>
<profile>
<id>test-native-namingserver</id>
<modules>
Expand Down
Loading
Loading