Skip to content

Commit 7e41e94

Browse files
committed
docs(java): validate Linux native packaging
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: de80978a-085e-476a-97a2-d2c5858446f6
1 parent 2310687 commit 7e41e94

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

java/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,21 +491,30 @@ mvn jacoco:prepare-agent@wire-up-coverage-instrumentation antrun:run@print-test-
491491

492492
Run native-runtime Maven commands from the `java` directory. Native packaging requires Node.js and npm in addition to JDK 25 and Maven because `copilot-native/scripts/fetch-native.mjs` retrieves the pinned npm runtime package.
493493

494-
The build currently supports native packaging only on Linux x64. Maven activates the `native-linux-x64` profile automatically on a Linux `amd64` host. That profile runs the native fetch-script tests, fetches the pinned `@github/copilot-linux-x64` package, builds the `linux-x64` classifier JAR, and verifies its native contents. Ensure npm can authenticate to the package registry before running the build.
494+
Validated on a native Linux x64 host: Maven activates the `native-linux-x64` profile automatically on Linux `amd64` when `copilot.native.skip.download` is not set. That profile runs the native fetch-script tests, fetches the pinned `@github/copilot-linux-x64` package during `generate-resources`, packages the `linux-x64` classifier JAR during `package`, and verifies its native contents. Ensure npm can authenticate to the package registry before running the build.
495495

496496
On macOS, Windows, Linux ARM64, and other unsupported hosts, do not force the Linux profile. A normal build produces only the OS-neutral primary, sources, and Javadoc JARs; it does not run the Linux x64 fetch-script tests, download or stage Linux native files, or produce a `linux-x64` classifier JAR. Use this command to validate that behavior:
497497

498498
```bash
499499
mvn -pl copilot-native clean verify
500500
```
501501

502-
To build only the OS-neutral artifacts on a supported host, disable native download and packaging:
502+
To build only the OS-neutral artifacts on any host, disable native download and packaging:
503503

504504
```bash
505505
mvn -pl copilot-native clean package -DskipTests -Dcopilot.native.skip.download=true
506506
```
507507

508-
Linux x64 validation is pending. The follow-up work must confirm automatic profile activation, run the fetch-script tests and full Java reactor, verify the classifier JAR contents, and confirm the placeholder-only command above suppresses all native output. Update this section with the validated Linux x64 behavior and any required command changes after that work is complete.
508+
The verified Linux x64 checks are:
509+
510+
```bash
511+
mvn -pl copilot-native help:active-profiles
512+
mvn -pl copilot-native test
513+
mvn clean verify
514+
mvn clean package -pl copilot-native -DskipTests -Dcopilot.native.skip.download=true
515+
```
516+
517+
On a supported Linux x64 host, the classifier JAR contains `native/linux-x64/runtime.node`, `native/linux-x64/platform.properties`, and `native/linux-x64/copilot`. The placeholder JAR remains OS-neutral and contains no native binaries. Unsupported hosts retain the placeholder-only behavior without producing a `-linux-x64.jar`.
509518

510519
## License
511520

0 commit comments

Comments
 (0)