Skip to content

Commit

Permalink
[mac_contributing_info] Add instructions for Native Image build on MAC (
Browse files Browse the repository at this point in the history
apache#2625)

* [mac_contributing_info] Add instructions for Native Image build on MAC

* [mac_contributing_info] Fix as per PR suggestion
  • Loading branch information
gitgabrio authored Nov 23, 2022
1 parent 1d8915b commit 485c095
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ If you have not done so on this machine, you need to:
* Install Git and configure your GitHub access
* Install Java SDK (OpenJDK recommended)
* For Native Image, follow Quarkus instructions at [GraalVM](https://quarkus.io/guides/building-native-image)
* On MAC, check [Setup MAC for Native image build](./Develop_on_Mac.md) for further instructions.

Docker is not strictly necessary, but it is a required to run some of the integration tests.
These tests can be skipped (see the [Build](#build) section), but we recommend to install it to run these tests locally.
Expand Down
12 changes: 12 additions & 0 deletions Develop_on_Mac.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Setup MAC for Native image build
================================

The following instructions use sdkman as jvm manager. While it is not mandatory, it is recommended to ease jvm switching during development.

1. install sdkman: `curl -s "https://get.sdkman.io" | bash`
2. install brew: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"`
3. manually install GraalVM (Note: check [Quarkus documentation](https://quarkus.io/guides/building-native-image#configuring-graalvm) to get current supported version): `brew install --cask graalvm/tap/(*current_graalvm_version*)`
4. link GraalVM inside sdkman: `sdk install java (*current_graalvm_version*)-grl /Library/Java/JavaVirtualMachines/(*current_graalvm_version*)/Contents/Home`
5. go to directory containing code for native build
6. set sdkman to use GraalVM: `sdk use java (*current_graalvm_version*)-grl`
7. issue build: `mvn clean package -Pnative`

0 comments on commit 485c095

Please sign in to comment.