{"id":51272963,"url":"https://github.com/flamingock/mongock-graalvm-example","last_synced_at":"2026-06-29T19:31:45.088Z","repository":{"id":205879478,"uuid":"715309924","full_name":"flamingock/mongock-graalvm-example","owner":"flamingock","description":"Example of Mongock with GraalVM(workaround)","archived":false,"fork":false,"pushed_at":"2023-11-06T22:19:33.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-14T10:15:40.275Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/flamingock.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}},"created_at":"2023-11-06T22:11:29.000Z","updated_at":"2025-10-02T18:55:52.000Z","dependencies_parsed_at":"2023-11-07T03:58:42.783Z","dependency_job_id":null,"html_url":"https://github.com/flamingock/mongock-graalvm-example","commit_stats":null,"previous_names":["mongock/graalvm-example","flamingock/graalvm-example","flamingock/mongock-graalvm-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/flamingock/mongock-graalvm-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamingock%2Fmongock-graalvm-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamingock%2Fmongock-graalvm-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamingock%2Fmongock-graalvm-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamingock%2Fmongock-graalvm-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flamingock","download_url":"https://codeload.github.com/flamingock/mongock-graalvm-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flamingock%2Fmongock-graalvm-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34941026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-29T02:00:05.398Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-06-29T19:31:44.566Z","updated_at":"2026-06-29T19:31:45.082Z","avatar_url":"https://github.com/flamingock.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example of workaround  Mongock with GraalVM(Workorund)\n\n## Scope\nMongock currently doesn't provide official support for Graalvm. Although it will be officially supported in the next major release, \nthere is a clear(and increasing) demand to have a solution in the short term.\n\nThis workaround tries to satisfies this need in the best manner possible.\n\n## Key points\n1. **The `ChangeUnitsList`**: You need to add all the ChangeUnits class you want to run(potentially, ase some of them may be already executed and will be ignored, as usual), as shown \n```java\n    public static final List\u003cClass\u003c?\u003e\u003e changeUnits = Arrays.asList(\n            ACreateCollection.class,\n            BInsertDocument.class,\n            CInsertAnotherDocument.class\n    );\n```\n2. The feature `ChangeUnitsRegistrationFeature`. You don't need to do anything, just be aware it exists as you will need it at the image's creation time\n3. `.setLockGuardEnabled(false)` in the builder.\n3. `.sdkmanrc` provided. If you are not using `sdkman`, please ensure you are using graalvm\n4. Ensure MongoDB is running\n\n\n## Steps\n\n- Build jar application with \n```shell\n./gradlew build \n```\n\n- build native image executable with\n```shell\nnative-image --no-fallback \\\n--features=io.mongock.example.graalvm.ChangeUnitsRegistrationFeature \\\n--initialize-at-build-time=org.slf4j.simple.SimpleLogger,org.slf4j.LoggerFactory,org.slf4j.impl.StaticLoggerBinder \\\n-jar  build/libs/graalvm-example-1.0-SNAPSHOT.jar\n```\n\n- run executable with\n```shell\n./graalvm-example-1.0-SNAPSHOT\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflamingock%2Fmongock-graalvm-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflamingock%2Fmongock-graalvm-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflamingock%2Fmongock-graalvm-example/lists"}