{"id":22051698,"url":"https://github.com/agilevisionorganization/graalvm-workshop","last_synced_at":"2026-04-11T14:36:34.532Z","repository":{"id":91024939,"uuid":"436351060","full_name":"AgileVisionOrganization/graalvm-workshop","owner":"AgileVisionOrganization","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-05T22:39:56.000Z","size":13,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-28T21:34:48.108Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Handlebars","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AgileVisionOrganization.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-08T18:25:32.000Z","updated_at":"2024-05-14T09:46:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"632d21e6-b1f5-4a30-b7a8-1d7b72a53c88","html_url":"https://github.com/AgileVisionOrganization/graalvm-workshop","commit_stats":null,"previous_names":["agilevisionorganization/graalvm-workshop"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgileVisionOrganization%2Fgraalvm-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgileVisionOrganization%2Fgraalvm-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgileVisionOrganization%2Fgraalvm-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AgileVisionOrganization%2Fgraalvm-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AgileVisionOrganization","download_url":"https://codeload.github.com/AgileVisionOrganization/graalvm-workshop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245121783,"owners_count":20564181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-30T15:10:46.079Z","updated_at":"2025-12-30T23:31:24.185Z","avatar_url":"https://github.com/AgileVisionOrganization.png","language":"Handlebars","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraalVM Workshop\n## Prepare development environment\n### Local GraalVM\n1. Install [SDKMAN](https://sdkman.io/install)\n2. Install GraalVM 21.2 r11 `sdk install java 21.2.0.r11-grl`\n3. Use GraalVm `sdk use java 21.2.0.r11-grl`\n4. Install native-image extensions `gu install native-image`\n\n### Docker Compose\nExecute `docker-compose run --rm --service-ports graalvm` in the project root directory\n\n### Docker\n1. ```docker run -it --rm -v `pwd`:/root/project ghcr.io/graalvm/graalvm-ce:java11-21.2 bash```\n2. `cd /root/project/`\n3. `gu install native-image`\n4. Install [Maven](https://maven.apache.org/install.html)\n\n## \"Vanilla\" Java project\n### Compile and run using JDK\n1. `mvn clean package`\n2. `time java -jar target/generate-html-email-1.0-SNAPSHOT-jar-with-dependencies.jar`\n\n### Compile and run native-image\n1. `native-image -jar target/generate-html-email-1.0-SNAPSHOT-jar-with-dependencies.jar --no-fallback target/generate-html-email`\n2. `java -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image -jar target/generate-html-email-1.0-SNAPSHOT-jar-with-dependencies.jar`\n3. `time APP_LOGIN_EMAIL=email@ag.io ./target/generate-html-email`\n4. Configure maven to generate native image \n```xml\n\u003cproject\u003e\n  \u003cproperties\u003e\n    \u003cnative.maven.plugin.version\u003e0.9.7.1\u003c/native.maven.plugin.version\u003e\n    \u003cexe.file.name\u003egenerate-html-email\u003c/exe.file.name\u003e\n  \u003c/properties\u003e\n\n  \u003cprofiles\u003e\n    \u003cprofile\u003e\n      \u003cid\u003ejava_agent\u003c/id\u003e\n      \u003cbuild\u003e\n        \u003cplugins\u003e\n          \u003cplugin\u003e\n            \u003cgroupId\u003eorg.codehaus.mojo\u003c/groupId\u003e\n            \u003cartifactId\u003eexec-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e1.2\u003c/version\u003e\n            \u003cconfiguration\u003e\n              \u003cexecutable\u003ejava\u003c/executable\u003e\n              \u003carguments\u003e\n                \u003cargument\u003e\n                  -agentlib:native-image-agent=config-output-dir=./src/main/resources/META-INF/native-image/\n                \u003c/argument\u003e\n                \u003cargument\u003e-classpath\u003c/argument\u003e\n                \u003cclasspath/\u003e\n                \u003cargument\u003e${app.main.class}\u003c/argument\u003e\n              \u003c/arguments\u003e\n            \u003c/configuration\u003e\n          \u003c/plugin\u003e\n        \u003c/plugins\u003e\n      \u003c/build\u003e\n    \u003c/profile\u003e\n    \u003cprofile\u003e\n      \u003cid\u003enative\u003c/id\u003e\n      \u003cbuild\u003e\n        \u003cplugins\u003e\n          \u003c!-- Native Image --\u003e\n          \u003cplugin\u003e\n            \u003cgroupId\u003eorg.graalvm.buildtools\u003c/groupId\u003e\n            \u003cartifactId\u003enative-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e${native.maven.plugin.version}\u003c/version\u003e\n            \u003cextensions\u003etrue\u003c/extensions\u003e\n            \u003cexecutions\u003e\n              \u003cexecution\u003e\n                \u003cid\u003ebuild-native\u003c/id\u003e\n                \u003cgoals\u003e\n                  \u003cgoal\u003ebuild\u003c/goal\u003e\n                \u003c/goals\u003e\n                \u003cphase\u003epackage\u003c/phase\u003e\n              \u003c/execution\u003e\n            \u003c/executions\u003e\n            \u003cconfiguration\u003e\n              \u003c!-- Set this to true if you need to switch this off --\u003e\n              \u003cskip\u003efalse\u003c/skip\u003e\n              \u003cimageName\u003e${exe.file.name}\u003c/imageName\u003e\n              \u003cmainClass\u003e${app.main.class}\u003c/mainClass\u003e\n              \u003cbuildArgs\u003e\n                \u003cbuildArg\u003e--no-fallback\u003c/buildArg\u003e\n                \u003cbuildArg\u003e--report-unsupported-elements-at-runtime\u003c/buildArg\u003e\n                \u003cbuildArg\u003e--allow-incomplete-classpath\u003c/buildArg\u003e\n              \u003c/buildArgs\u003e\n            \u003c/configuration\u003e\n          \u003c/plugin\u003e\n        \u003c/plugins\u003e\n      \u003c/build\u003e\n    \u003c/profile\u003e\n  \u003c/profiles\u003e\n\u003c/project\u003e\n```\n5. `mvn clean package exec:exec -Pjava_agent`\n6. `mvn clean package -Pnative`\n\n## Spring Boot application\n### Generate base spring boot project\n1. Generate base project `spring-generate-html` using [Spring Initializr](https://start.spring.io/) or use intellij idea.\n2. Select `spring-boot-starter-web` and `lombok` as dependency with spring boot `2.5.6`, java 11\n3. Build java application `mvn clean package`\n4. Run application `java -jar target/spring-generate-html-0.0.1-SNAPSHOT.jar`\n\n### Build to native image with Native Build Tools\n1. Add to pom.xnl:\n\n```xml\n\n\u003cproject\u003e\n  \u003cproperties\u003e\n    \u003cspring.native\u003e0.10.5\u003c/spring.native\u003e\n  \u003c/properties\u003e\n\n  \u003cdependency\u003e\n    \u003cgroupId\u003eorg.springframework.experimental\u003c/groupId\u003e\n    \u003cartifactId\u003espring-native\u003c/artifactId\u003e\n    \u003cversion\u003e${spring.native}\u003c/version\u003e\n  \u003c/dependency\u003e\n\n  \u003cprofiles\u003e\n    \u003cprofile\u003e\n      \u003cid\u003enative\u003c/id\u003e\n      \u003cbuild\u003e\n        \u003cplugins\u003e\n          \u003cplugin\u003e\n            \u003cgroupId\u003eorg.springframework.experimental\u003c/groupId\u003e\n            \u003cartifactId\u003espring-aot-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e${spring.native}\u003c/version\u003e\n            \u003cexecutions\u003e\n              \u003cexecution\u003e\n                \u003cid\u003etest-generate\u003c/id\u003e\n                \u003cgoals\u003e\n                  \u003cgoal\u003etest-generate\u003c/goal\u003e\n                \u003c/goals\u003e\n              \u003c/execution\u003e\n              \u003cexecution\u003e\n                \u003cid\u003egenerate\u003c/id\u003e\n                \u003cgoals\u003e\n                  \u003cgoal\u003egenerate\u003c/goal\u003e\n                \u003c/goals\u003e\n              \u003c/execution\u003e\n            \u003c/executions\u003e\n          \u003c/plugin\u003e\n          \u003cplugin\u003e\n            \u003cgroupId\u003eorg.graalvm.buildtools\u003c/groupId\u003e\n            \u003cartifactId\u003enative-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e0.9.4\u003c/version\u003e\n            \u003cexecutions\u003e\n              \u003cexecution\u003e\n                \u003cid\u003etest-native\u003c/id\u003e\n                \u003cgoals\u003e\n                  \u003cgoal\u003etest\u003c/goal\u003e\n                \u003c/goals\u003e\n                \u003cphase\u003etest\u003c/phase\u003e\n              \u003c/execution\u003e\n              \u003cexecution\u003e\n                \u003cid\u003ebuild-native\u003c/id\u003e\n                \u003cgoals\u003e\n                  \u003cgoal\u003ebuild\u003c/goal\u003e\n                \u003c/goals\u003e\n                \u003cphase\u003epackage\u003c/phase\u003e\n              \u003c/execution\u003e\n            \u003c/executions\u003e\n            \u003cconfiguration\u003e\n              \u003c!-- ... --\u003e\n            \u003c/configuration\u003e\n          \u003c/plugin\u003e\n          \u003c!-- Avoid a clash between Spring Boot repackaging and native-maven-plugin --\u003e\n          \u003cplugin\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-maven-plugin\u003c/artifactId\u003e\n            \u003cconfiguration\u003e\n              \u003cclassifier\u003eexec\u003c/classifier\u003e\n            \u003c/configuration\u003e\n          \u003c/plugin\u003e\n        \u003c/plugins\u003e\n      \u003c/build\u003e\n    \u003c/profile\u003e\n  \u003c/profiles\u003e\n\n  \u003crepositories\u003e\n    \u003crepository\u003e\n      \u003cid\u003espring-release\u003c/id\u003e\n      \u003cname\u003eSpring release\u003c/name\u003e\n      \u003curl\u003ehttps://repo.spring.io/release\u003c/url\u003e\n    \u003c/repository\u003e\n  \u003c/repositories\u003e\n\n  \u003cpluginRepositories\u003e\n    \u003cpluginRepository\u003e\n      \u003cid\u003espring-release\u003c/id\u003e\n      \u003cname\u003eSpring release\u003c/name\u003e\n      \u003curl\u003ehttps://repo.spring.io/release\u003c/url\u003e\n    \u003c/pluginRepository\u003e\n  \u003c/pluginRepositories\u003e\n\u003c/project\u003e\n```\n2. Build to native `mvn clean -Pnative -DskipTests package`\n3. Run native application `./target/spring-generate-html`\n4. Use NativeHint or `java -DspringAot=true -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image -jar target/spring-generate-html-0.0.1-SNAPSHOT-exec.jar`\n\n### Build to native image with Buildpacks\n```xml\n    \u003cprofile\u003e\n      \u003cid\u003enative-build-image\u003c/id\u003e\n      \u003cbuild\u003e\n        \u003cplugins\u003e\n          \u003cplugin\u003e\n            \u003cgroupId\u003eorg.springframework.experimental\u003c/groupId\u003e\n            \u003cartifactId\u003espring-aot-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e${spring.native}\u003c/version\u003e\n            \u003cexecutions\u003e\n              \u003cexecution\u003e\n                \u003cid\u003etest-generate\u003c/id\u003e\n                \u003cgoals\u003e\n                  \u003cgoal\u003etest-generate\u003c/goal\u003e\n                \u003c/goals\u003e\n              \u003c/execution\u003e\n              \u003cexecution\u003e\n                \u003cid\u003egenerate\u003c/id\u003e\n                \u003cgoals\u003e\n                  \u003cgoal\u003egenerate\u003c/goal\u003e\n                \u003c/goals\u003e\n              \u003c/execution\u003e\n            \u003c/executions\u003e\n          \u003c/plugin\u003e\n          \u003cplugin\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-maven-plugin\u003c/artifactId\u003e\n            \u003cconfiguration\u003e\n              \u003cimage\u003e\n                \u003cbuilder\u003epaketobuildpacks/builder:tiny\u003c/builder\u003e\n                \u003cenv\u003e\n                  \u003cBP_NATIVE_IMAGE\u003etrue\u003c/BP_NATIVE_IMAGE\u003e\n                \u003c/env\u003e\n                \u003cbuildpacks\u003e\n                  \u003cbuildpack\u003egcr.io/paketo-buildpacks/java-native-image:5.5.0\u003c/buildpack\u003e\n                \u003c/buildpacks\u003e\n              \u003c/image\u003e\n            \u003c/configuration\u003e\n          \u003c/plugin\u003e\n        \u003c/plugins\u003e\n      \u003c/build\u003e\n    \u003c/profile\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilevisionorganization%2Fgraalvm-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagilevisionorganization%2Fgraalvm-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilevisionorganization%2Fgraalvm-workshop/lists"}