Maven and Gradle handoff
Use the checked-in wrapper when present and retain the project's own release configuration when selecting the artifact. A common Maven candidate is target/<artifactId>-<version>.jar; a common Gradle candidate is build/libs/<project>-<version>.jar, but verify the publication task rather than selecting the newest file.
bash
if [[ -x ./mvnw ]]; then ./mvnw --batch-mode verify; else mvn --batch-mode verify; fi
java -jar target/app.jar --version
NATIVIFY_PLATFORMS=linux-x86_64 ci/nativify.sh target/app.jar target/app-nativified.jar
java -jar target/app-nativified.jar --versionbash
if [[ -x ./gradlew ]]; then ./gradlew check jar; else gradle check jar; fi
java -jar build/libs/app.jar --version
NATIVIFY_PLATFORMS=linux-x86_64 ci/nativify.sh build/libs/app.jar build/libs/app-nativified.jar
java -jar build/libs/app-nativified.jar --versionBoth platform values are examples. Replace them with the complete audited target list and wire signing/publication to the *-nativified.jar path only after successful protected-artifact smoke tests.