Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for building with GraalVM Native Image #5

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@ docs/se/config/images
jmh-baseline.json

# benchmark results
nima/tests/benchmark/techempower/results
nima/tests/benchmark/techempower/results

default.iprof
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ Maven
2. Run the application

java --enable-preview -jar nima/target/example-nima-blocking.jar
3. Call the endpoints (default count is 3)

3. Build a [GraalVM Native Image](https://www.graalvm.org/22.0/reference-manual/native-image/) version of your application

native-image --enable-preview -jar nima/target/example-nima-blocking.jar

You can then run the native executable version of your application with the following:

./example-nima-blocking

4. Call the endpoints (default count is 3)

curl -i http://localhost:8080/one
curl -i http://localhost:8080/sequence
Expand Down
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>19</maven.compiler.source>
<maven.compiler.source>22</maven.compiler.source>
<maven.compiler.target>${maven.compiler.source}</maven.compiler.target>
<maven.compiler.release>${maven.compiler.source}</maven.compiler.release>

Expand Down Expand Up @@ -86,6 +86,10 @@
<dependency>
<groupId>io.helidon.health</groupId>
<artifactId>helidon-health-checks</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-yaml</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down Expand Up @@ -113,7 +117,6 @@
<version>${version.plugin.compiler}</version>
<configuration>
<compilerArgs>
<compilerArg>--enable-preview</compilerArg>
</compilerArgs>
</configuration>
</plugin>
Expand All @@ -123,7 +126,6 @@
<version>${version.plugin.surefire}</version>
<configuration>
<useModulePath>false</useModulePath>
<argLine>--enable-preview</argLine>
<trimStackTrace>false</trimStackTrace>
</configuration>
</plugin>
Expand All @@ -134,7 +136,6 @@
<configuration>
<useModulePath>false</useModulePath>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<argLine>--enable-preview</argLine>
</configuration>
</plugin>
<plugin>
Expand Down