{"id":13821690,"url":"https://github.com/moditect/moditect","last_synced_at":"2026-01-12T11:37:07.928Z","repository":{"id":37706531,"uuid":"84088596","full_name":"moditect/moditect","owner":"moditect","description":"Tooling for the Java Module System","archived":false,"fork":false,"pushed_at":"2025-07-19T17:57:54.000Z","size":6163,"stargazers_count":565,"open_issues_count":86,"forks_count":68,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-07-19T21:02:54.640Z","etag":null,"topics":["java9","jigsaw","jpms","moditect","modules"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moditect.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-03-06T15:22:29.000Z","updated_at":"2025-07-19T17:57:59.000Z","dependencies_parsed_at":"2023-01-19T13:15:58.134Z","dependency_job_id":"e0c3c8a4-7b08-42db-bea7-6daa824aede1","html_url":"https://github.com/moditect/moditect","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/moditect/moditect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moditect%2Fmoditect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moditect%2Fmoditect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moditect%2Fmoditect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moditect%2Fmoditect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moditect","download_url":"https://codeload.github.com/moditect/moditect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moditect%2Fmoditect/sbom","scorecard":{"id":656033,"data":{"date":"2025-08-11","repo":{"name":"github.com/moditect/moditect","commit":"f551969b77ed1de6408dfc8e17d815b564d61260"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Maintained","score":10,"reason":"21 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: .mvn/wrapper/maven-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":4,"reason":"Found 4/9 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/moditect/moditect/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/moditect/moditect/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/moditect/moditect/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/moditect/moditect/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:83: update your workflow using https://app.stepsecurity.io/secureworkflow/moditect/moditect/release.yml/main?enable=pin","Warn: containerImage not pinned by hash: integrationtest/undertow/src/main/docker/Dockerfile:9: pin your Docker image by updating centos:7 to centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4","Warn: containerImage not pinned by hash: integrationtest/vert.x/src/main/docker-base/Dockerfile:9: pin your Docker image by updating centos:7 to centos:7@sha256:be65f488b7764ad3638f236b7b515b3678369a5124c47b8d32916d6487418ea4","Warn: containerImage not pinned by hash: integrationtest/vert.x/src/main/docker/Dockerfile:9","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"117 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-2w73-fqqj-c92p","Warn: Project is vulnerable to: GHSA-339q-62wm-c39w","Warn: Project is vulnerable to: GHSA-3jrv-jgp8-45v3","Warn: Project is vulnerable to: GHSA-8vh8-vc28-m2hf","Warn: Project is vulnerable to: GHSA-9442-gm4v-r222","Warn: Project is vulnerable to: GHSA-95rf-557x-44g5","Warn: Project is vulnerable to: GHSA-9623-mqmm-5rcf","Warn: Project is vulnerable to: GHSA-97cq-f4jm-mv8h","Warn: Project is vulnerable to: GHSA-cccf-7xw3-p2vr","Warn: Project is vulnerable to: GHSA-ch7q-gpff-h9hp","Warn: Project is vulnerable to: GHSA-cp7v-vmv7-6x2q","Warn: Project is vulnerable to: GHSA-fj7c-vg2v-ccrm","Warn: Project is vulnerable to: GHSA-g4cp-h53p-v3v8","Warn: Project is vulnerable to: GHSA-gjjx-gqm4-wcgm","Warn: Project is vulnerable to: GHSA-gv2w-88hx-8m9r","Warn: Project is vulnerable to: GHSA-jwgx-9mmh-684w","Warn: Project is vulnerable to: GHSA-m4mm-pg93-fv78","Warn: Project is vulnerable to: GHSA-mfhv-gwf8-4m88","Warn: Project is vulnerable to: GHSA-p9w3-gwc2-cr49","Warn: Project is vulnerable to: GHSA-pfcc-3g6r-8rg8","Warn: Project is vulnerable to: GHSA-qjwc-v72v-fq6r","Warn: Project is vulnerable to: GHSA-rf6q-vx79-mjxr","Warn: Project is vulnerable to: GHSA-rhcw-wjcm-9h6g","Warn: Project is vulnerable to: GHSA-v76w-3ph8-vm66","Warn: Project is vulnerable to: GHSA-vf6r-mmhc-3xcm","Warn: Project is vulnerable to: GHSA-vjxc-frw4-jmh5","Warn: Project is vulnerable to: GHSA-w6qf-42m7-vh68","Warn: Project is vulnerable to: GHSA-xpp6-8r3j-ww43","Warn: Project is vulnerable to: GHSA-7f88-5hhx-67m2","Warn: Project is vulnerable to: GHSA-h46c-h94j-95f3","Warn: Project is vulnerable to: GHSA-wf8f-6423-gfxg","Warn: Project is vulnerable to: GHSA-27xj-rqx5-2255","Warn: Project is vulnerable to: GHSA-288c-cq4h-88gq","Warn: Project is vulnerable to: GHSA-4gq5-ch57-c2mg","Warn: Project is vulnerable to: GHSA-4w82-r329-3q67","Warn: Project is vulnerable to: GHSA-57j2-w4cx-62h2","Warn: Project is vulnerable to: GHSA-58pp-9c76-5625","Warn: Project is vulnerable to: GHSA-5949-rw7g-wx7w","Warn: Project is vulnerable to: GHSA-5p34-5m6p-p58g","Warn: Project is vulnerable to: GHSA-5r5r-6hpj-8gg9","Warn: Project is vulnerable to: GHSA-5ww9-j83m-q7qx","Warn: Project is vulnerable to: GHSA-645p-88qh-w398","Warn: Project is vulnerable to: GHSA-6fpp-rgj9-8rwc","Warn: Project is vulnerable to: GHSA-6wqp-v4v6-c87c","Warn: Project is vulnerable to: GHSA-758m-v56v-grj4","Warn: Project is vulnerable to: GHSA-85cw-hj65-qqv9","Warn: Project is vulnerable to: GHSA-89qr-369f-5m5x","Warn: Project is vulnerable to: GHSA-8c4j-34r4-xr8g","Warn: Project is vulnerable to: GHSA-8w26-6f25-cm9x","Warn: Project is vulnerable to: GHSA-95cm-88f5-f2c7","Warn: Project is vulnerable to: GHSA-9gph-22xh-8x98","Warn: Project is vulnerable to: GHSA-9m6f-7xcq-8vf8","Warn: Project is vulnerable to: GHSA-9mxf-g3x6-wv74","Warn: Project is vulnerable to: GHSA-9vvp-fxw6-jcxr","Warn: Project is vulnerable to: GHSA-c265-37vj-cwcc","Warn: Project is vulnerable to: GHSA-c2q3-4qrh-fm48","Warn: Project is vulnerable to: GHSA-c8hm-7hpq-7jhg","Warn: Project is vulnerable to: GHSA-cf6r-3wgc-h863","Warn: Project is vulnerable to: GHSA-cggj-fvv3-cqwv","Warn: Project is vulnerable to: GHSA-cjjf-94ff-43w7","Warn: Project is vulnerable to: GHSA-cmfg-87vq-g5g4","Warn: Project is vulnerable to: GHSA-cvm9-fjm9-3572","Warn: Project is vulnerable to: GHSA-f3j5-rmmp-3fc5","Warn: Project is vulnerable to: GHSA-f9hv-mg5h-xcw9","Warn: Project is vulnerable to: GHSA-f9xh-2qgp-cq57","Warn: Project is vulnerable to: GHSA-fmmc-742q-jg75","Warn: Project is vulnerable to: GHSA-fqwf-pjwf-7vqv","Warn: Project is vulnerable to: GHSA-gjmw-vf9h-g25v","Warn: Project is vulnerable to: GHSA-gwp4-hfv6-p7hw","Warn: Project is vulnerable to: GHSA-gww7-p5w4-wrfv","Warn: Project is vulnerable to: GHSA-h3cw-g4mq-c5x2","Warn: Project is vulnerable to: GHSA-h4rc-386g-6m85","Warn: Project is vulnerable to: GHSA-h592-38cm-4ggp","Warn: Project is vulnerable to: GHSA-h822-r4r5-v8jg","Warn: Project is vulnerable to: GHSA-j823-4qch-3rgm","Warn: Project is vulnerable to: GHSA-jjjh-jjxp-wpff","Warn: Project is vulnerable to: GHSA-m6x4-97wx-4q27","Warn: Project is vulnerable to: GHSA-mc6h-4qgp-37qh","Warn: Project is vulnerable to: GHSA-mph4-vhrx-mv67","Warn: Project is vulnerable to: GHSA-mx7p-6679-8g3q","Warn: Project is vulnerable to: GHSA-mx9v-gmh4-mgqw","Warn: Project is vulnerable to: GHSA-p43x-xfjf-5jhr","Warn: Project is vulnerable to: GHSA-q93h-jc49-78gg","Warn: Project is vulnerable to: GHSA-qjw2-hr98-qgfh","Warn: Project is vulnerable to: GHSA-qmqc-x3r4-6v39","Warn: Project is vulnerable to: GHSA-qr7j-h6gg-jmgc","Warn: Project is vulnerable to: GHSA-r3gr-cxrf-hg25","Warn: Project is vulnerable to: GHSA-r695-7vr9-jgc2","Warn: Project is vulnerable to: GHSA-rf6r-2c4q-2vwg","Warn: Project is vulnerable to: GHSA-rfx6-vp9g-rh7v","Warn: Project is vulnerable to: GHSA-rgv9-q543-rqg4","Warn: Project is vulnerable to: GHSA-rpr3-cw39-3pxh","Warn: Project is vulnerable to: GHSA-v3xw-c963-f5hc","Warn: Project is vulnerable to: GHSA-v585-23hc-c647","Warn: Project is vulnerable to: GHSA-vfqx-33qm-g869","Warn: Project is vulnerable to: GHSA-w3f4-3q6j-rh82","Warn: Project is vulnerable to: GHSA-wh8g-3j2c-rqj5","Warn: Project is vulnerable to: GHSA-x2w5-5m2g-7h5m","Warn: Project is vulnerable to: GHSA-9vjp-v76f-g363","Warn: Project is vulnerable to: GHSA-grg4-wf29-r9vv","Warn: Project is vulnerable to: GHSA-269q-hmxg-m83q","Warn: Project is vulnerable to: GHSA-5jpm-x58v-624v","Warn: Project is vulnerable to: GHSA-5mcr-gq6c-3hq2","Warn: Project is vulnerable to: GHSA-cqqj-4p63-rrmm","Warn: Project is vulnerable to: GHSA-wx5j-54mm-rqqq","Warn: Project is vulnerable to: GHSA-f256-j965-7f32","Warn: Project is vulnerable to: GHSA-prj3-ccx8-p6x4","Warn: Project is vulnerable to: GHSA-wm47-8v5p-wjpj","Warn: Project is vulnerable to: GHSA-xpw8-rcwv-8f8p","Warn: Project is vulnerable to: GHSA-389x-839f-4rhx","Warn: Project is vulnerable to: GHSA-xq3w-v528-46rv","Warn: Project is vulnerable to: GHSA-6mjq-h674-j845","Warn: Project is vulnerable to: GHSA-mm9x-g8pc-w292","Warn: Project is vulnerable to: GHSA-p2v9-g2qv-p635","Warn: Project is vulnerable to: GHSA-45xm-v8gq-7jqx","Warn: Project is vulnerable to: GHSA-6cw8-7j6c-hccp","Warn: Project is vulnerable to: GHSA-qh3m-qw6v-qvhg"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T14:39:08.649Z","repository_id":37706531,"created_at":"2025-08-21T14:39:08.649Z","updated_at":"2025-08-21T14:39:08.649Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338971,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T10:58:46.209Z","status":"ssl_error","status_checked_at":"2026-01-12T10:58:42.742Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["java9","jigsaw","jpms","moditect","modules"],"created_at":"2024-08-04T08:01:26.008Z","updated_at":"2026-01-12T11:37:07.908Z","avatar_url":"https://github.com/moditect.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"# ModiTect - Tooling for the Java Module System\n\nVersion 1.0.0.Final - 2023-05-03\n\nThe ModiTect project aims at providing productivity tools for working with\nthe Java module system (\"Jigsaw\").\n\nCurrently the following tasks are supported:\n\n* Generating module-info.java descriptors for given artifacts (Maven dependencies or local JAR\n  files)\n* Adding module descriptors to your project's JAR as well as existing JAR files (dependencies)\n* Creating module runtime images\n\nCompared to authoring module descriptors by hand, using ModiTect saves you work by defining\ndependence clauses based on your project's dependencies, describing exported and opened\npackages with patterns (instead of listing all packages separately), auto-detecting service\nusages and more. You also can use ModiTect to add a module descriptor to your project JAR\nwhile staying on Java 8 with your own build.\n\nIn future versions functionality may be added to work with other tools like\njmod etc. under Maven and other dependency management tools in a comfortable\nmanner.\n\n* [Usage](#usage)\n   * [Generating module-info.java descriptors](#generating-module-infojava-descriptors)\n   * [Adding a module descriptor to the project JAR](#adding-a-module-descriptor-to-the-project-jar)\n   * [Adding module descriptors to existing JAR files](#adding-module-descriptors-to-existing-jar-files)\n   * [Creating modular runtime images](#creating-modular-runtime-images)\n* [Example](#examples)\n   * [Undertow](#undertow)\n   * [Vert.x](#vertx)\n* [Status](#status)\n* [Further Planned Features](#further-planned-features)\n* [Related Work](#related-work)\n* [License](#license)\n\n## Usage\n\nModiTect's functionality is currently exclusively exposed through a Maven\nplug-in. The core implementation is a separate module, though, so that plug-ins\nfor other build systems such as Gradle could be written, too.\n\n### Generating module-info.java descriptors\n\nTo create a module-info.java descriptor for a given artifact, configure the\n_generate-module-info_ goal as follows:\n\n```xml\n...\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.moditect\u003c/groupId\u003e\n    \u003cartifactId\u003emoditect-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0.Final\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003egenerate-module-info\u003c/id\u003e\n            \u003cphase\u003egenerate-sources\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003egenerate-module-info\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n                \u003cmodules\u003e\n                    \u003cmodule\u003e\n                        \u003cartifact\u003e\n                            \u003cgroupId\u003ecom.example\u003c/groupId\u003e\n                            \u003cartifactId\u003eexample-core\u003c/artifactId\u003e\n                            \u003cversion\u003e1.0.0.Final\u003c/version\u003e\n                        \u003c/artifact\u003e\n                        \u003cadditionalDependencies\u003e\n                            \u003cdependency\u003e\n                                \u003cgroupId\u003ecom.example\u003c/groupId\u003e\n                                \u003cartifactId\u003eexample-extended\u003c/artifactId\u003e\n                                \u003cversion\u003e1.0.0.Final\u003c/version\u003e\n                            \u003c/dependency\u003e\n                        \u003c/additionalDependencies\u003e\n                        \u003cmoduleInfo\u003e\n                            \u003cname\u003ecom.example.core\u003c/name\u003e\n                            \u003cexports\u003e\n                                !com.example.core.internal*;\n                                *;\n                            \u003c/exports\u003e\n                            \u003crequires\u003e\n                                static com.some.optional.dependency;\n                                !com.excluded.dependency;\n                                *;\n                            \u003c/requires\u003e\n                            \u003copens\u003e\n                                com.example.core.internal.controller to javafx.fxml;\n                            \u003c/opens\u003e\n                            \u003copensResources\u003e\n                                com.example.resource;\n                                com.example.resource.icon;\n                                com.example.resource.sound;\n                            \u003c/opensResources\u003e\n                            \u003cuses\u003e\n                                 com.example.SomeService;\n                            \u003c/uses\u003e\n                            \u003cprovides\u003e\n                                com.example.SomeService with com.example.SomeServiceImpl1,com.example.SomeServiceImpl2;\n                            \u003c/provides\u003e\n                            \u003caddServiceUses\u003etrue\u003c/addServiceUses\u003e\n                        \u003c/moduleInfo\u003e\n                    \u003c/module\u003e\n                    \u003cmodule\u003e\n                        ...\n                    \u003c/module\u003e\n                \u003c/modules\u003e\n                \u003cjdepsExtraArgs\u003e\n                  \u003carg\u003e--upgrade-module-path=...\u003c/arg\u003e\n                \u003c/jdepsExtraArgs\u003e\n            \u003c/configuration\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n...\n```\n\nThis will generate a module descriptor at _target/generated-sources/com.example.core/module-info.java_.\n\nFor each module to be processed, the following configuration options exist:\n\n* `artifact`: The GAV coordinates of the artifact for which a descriptor should\nbe generated (required)\n* `additionalDependencies`: Additional artifacts to be processed; useful if the\nmain artifact depends on code from another artifact but doesn't declare a\ndependency to that one (optional)\n* `moduleInfo`: Allows fine-grained configuration of the generated module\ndescriptor (optional); has the following sub-elements:\n  - `name`: Name to be used within the descriptor; if not given the name\nwill be derived from the JAR name as per the naming rules for automatic modules\n(optional)\n  - `open`: Whether the descriptor should be an open module or not (optional, defaults\nto `false`)\n  - `exports`: List of name patterns for describing the exported packages of the module,\nseparated by \";\". Patterns can be inclusive or exclusive (starting with \"!\") and may\ncontain the \"\\*\" as a wildcard. Inclusive patterns may be qualified exports (\"to xyz\").\nFor each package from the module, the given patterns are processed in the order they\nare given. As soon a package is matched by an inclusive pattern, the package will be\nadded to the list of exported packages and no further patterns will be applied. As soon\nas a package is matched by an exclusive pattern, this package will not be added to the\nlist of exported packages and no further patterns will be applied.\n(optional; the default value is \"\\*;\", i.e. all packages will be exported)\n  - `opens`: List of name patterns for describing the open packages of the module,\nseparated by \";\". Patterns can be inclusive or exclusive (starting with \"!\") and may\ncontain the \"\\*\" as a wildcard. Inclusive patterns may be qualified exports (\"to xyz\").\nFor each package from the module, the given patterns are processed in the order they\nare given. As soon a package is matched by an inclusive pattern, the package will be\nadded to the list of open packages and no further patterns will be applied. As soon\nas a package is matched by an exclusive pattern, this package will not be added to the\nlist of open packages and no further patterns will be applied.\n(optional; the default value is \"!\\*;\", i.e. no packages will be opened)\n  - `opensResources`: List of package names only containing resources as png, css or mp3 files\ni.e. everything not being java files, separated by \";\". For JavaFX 9+, it is required to force\nopen resource-only packages. Please, refer to https://github.com/javafxports/openjdk-jfx/issues/441\nfor more details. `opensResources` allows to do this. Contrary to `opens`, `opensResources`\ncannot accept patterns because Moditect manages patterns using a technical solution that can\nonly works with compiled java classes. Hence, each resource-only packages must be declared one by one.\n  - `requires`: List of name patterns for describing the dependences of the module,\n  based on the automatically determined dependences.\nPatterns are inclusive or exclusive (starting with \"!\") and may contain the \"\\*\" character as a wildcard.\nInclusive patterns may\ncontain the `static` and `transitive` modifiers, in which case those modifiers will\noverride the modifiers of the automatically determined dependence. For each of the\nautomatically determined dependences of the module, the given patterns are processed in the order they are given.\nAs soon as a dependence is matched by a pattern, the dependence will be\nadded to the list of dependences (if the pattern is inclusive) or the dependence will be\nfiltered out (for exclusive patterns) and no further patterns will be applied. Usually,\nonly a few dependences will be given explicitly in order to override their modifiers,\nfollowed by a `*;` pattern to add all remaining automatically determined dependences.\n  - `addServiceUses`: If `true`, the given artifact will be scanned for usages of\n`ServiceLoader#load()` and if usages passing a class literal are found\n(`load( MyService.class )`), an equivalent `uses()` clause will be added to the\ngenerated descriptor; usages of `load()` where a non-literal class object is\npassed, are ignored (optional, defaults to `false`)\n  - `uses`: List of names of used services, separated by \";\" only required if `addServiceUses`\ncannot be used due to dynamic invocations of `ServiceLoader#load()`, i.e. no class literal is\npassed (optional)\n  - `provides`: List of services with their provided service implementations, separated by \";\". A service and its implementation must be separated by the keyword \"with\" e.g. `serviceX with implementationX; serviceY with implementationY;`. If the module implements a particular service through several service implementations, those implementation classes must be separated by \",\" e.g. `myService with implementation1, implementation2, implementation3;`.\n  - `jdepsExtraArgs`: A list of arguments passed to the _jdeps_ invocation for creating a \"candidate descriptor\"\n\nIt is also possible to run this goal directly, specifying the different options\nas JVM parameters like this:\n\n```\nmvn moditect:generate-module-info \\\n    -Dmoditect.artifact=com.example:example-core:1.0.0.Final \\\n    -Dmoditect.moduleName=com.example.core \\\n    -Dmoditect.additionalDependencies=com.example:example-extended:1.0.0.Final \\\n    -Dmoditect.exportExcludes=com\\.example\\.core\\.internal\\..* \\\n    -Dmoditect.addServiceUses=true\n```\n\n### Adding a module descriptor to the project JAR\n\nTo add a module descriptor to the JAR produced by the current Maven project, configure\nthe _add-module-info_ goal as follows:\n\n```xml\n...\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.moditect\u003c/groupId\u003e\n    \u003cartifactId\u003emoditect-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0.Final\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003eadd-module-infos\u003c/id\u003e\n            \u003cphase\u003epackage\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003eadd-module-info\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n                \u003cjvmVersion\u003e11\u003c/jvmVersion\u003e\n                \u003cfailOnWarning\u003efalse\u003c/failOnWarning\u003e\n                \u003coutputTimestamp\u003e1980-01-01T00:00:02Z\u003c/outputTimestamp\u003e\n                \u003cmodule\u003e\n                    \u003cmoduleInfo\u003e\n                        \u003cname\u003ecom.example\u003c/name\u003e\n                        \u003cexports\u003e\n                            !com.example.internal.*;\n                            *;\n                        \u003c/exports\u003e\n                    \u003c/moduleInfo\u003e\n                \u003c/module\u003e\n              \u003cexclusions\u003e\n                \u003cexclusion\u003e\n                  \u003cgroupId\u003ecom.acme\u003c/groupId\u003e\n                  \u003cartifactId\u003ething\u003c/artifactId\u003e\n                \u003c/exclusion\u003e\n              \u003c/exclusions\u003e\n            \u003c/configuration\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n...\n```\n\nThe optional `jvmVersion` element allows to define which JVM version the module descriptor should target\n(leveraging the concept of multi-release JARs).\nWhen defined, the module descriptor will be put into `META-INF/versions/${jvmVersion}`.\nThe value must be `9` or greater.\nThe special value `base` (the default) can be used to add the descriptor to the root of the final JAR.\nPutting the descriptor under `META-INF/versions` can help to increase compatibility with older libraries scanning class files that may fail when encountering the `module-info.class` file\n(as chances are lower that such tool will look for class files under `META-INF/versions/...`).\n\nThe optional `outputTimestamp` element may be used to create reproducible output archive entries, either formatted as \nISO 8601 extended offset date-time (e.g. in UTC such as '2011-12-03T10:15:30Z' or with an offset '2019-10-05T20:37:42+06:00'),\nor as an int representing seconds since the epoch. As an alternative you may set `${project.build.outputTimestamp}` which also\nmatches the user property used by other Maven plugins such as `maven-jar-plugin`.\n\nThe optional `failOnWarning` option prevents the build from failing when set to `false`. The default is to fail.\n\nThe optional `exclusions` option may be used to filter out any `compile` or `runtime` dependencies that should not be used, as it might be the case when shading internal dependencies.\n\nThe `jdepsExtraArgs` option can be used to specify a list of arguments passed to the _jdeps_ invocation for creating a \"candidate descriptor\".\n\nThe following configuration options exist for the `\u003cmodule\u003e` configuration element:\n\n* `moduleInfoSource`: Inline representation of a module-info.java descriptor\n(optional; either this or `moduleInfoFile` or `moduleInfo` must be given)\n* `moduleInfoFile`: Path to a module-info.java descriptor\n(optional; either this or `moduleInfoSource` or `moduleInfo` must be given)\n* `moduleInfo`: A `moduleInfo` configuration as used with the `generate-module-info`\ngoal (optional; either this or `moduleInfoSource` or `moduleInfoFile` must be given)\n* `mainClass`: The fully-qualified name of the main class to be added to the\nmodule descriptor (optional)\n\nNote that `moduleInfoSource` and `moduleInfoFile` can be used on Java 8, allowing to add\na Java 9 module descriptor to your JAR also if you did not move to Java 9 for your own\nbuild yet. `moduleInfo` can only be used on Java 9 or later.\n\n### Adding module descriptors to existing JAR files\n\nTo add a module descriptor for a given dependency, configure the\n_add-module-info_ goal as follows:\n\n```xml\n...\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.moditect\u003c/groupId\u003e\n    \u003cartifactId\u003emoditect-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0.Final\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003eadd-module-infos\u003c/id\u003e\n            \u003cphase\u003egenerate-resources\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003eadd-module-info\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n                \u003coutputDirectory\u003e${project.build.directory}/modules\u003c/outputDirectory\u003e\n                \u003cmodules\u003e\n                    \u003cmodule\u003e\n                        \u003cartifact\u003e\n                            \u003cgroupId\u003ecom.example\u003c/groupId\u003e\n                            \u003cartifactId\u003eexample-core\u003c/artifactId\u003e\n                            \u003cversion\u003e1.0.0.Final\u003c/version\u003e\n                        \u003c/artifact\u003e\n                        \u003cmoduleInfoSource\u003e\n                            module com.example.core {\n                                requires java.logging;\n                                exports com.example.api;\n                                provides com.example.api.SomeService\n                                    with com.example.internal.SomeServiceImpl;\n                            }\n                        \u003c/moduleInfoSource\u003e\n                    \u003c/module\u003e\n                    \u003cmodule\u003e\n                        ...\n                    \u003c/module\u003e\n                \u003c/modules\u003e\n            \u003c/configuration\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n...\n```\n\nFor each module to be processed, the following configuration options exist:\n\n* `artifact`: The GAV coordinates of the artifact for which a descriptor should\nbe generated (either this or `file` must be given)\n* `file`: Path to the file for which a descriptor should be generated (either\n  this or `artifact` must be given)\n* `moduleInfoSource`: Inline representation of a module-info.java descriptor\n(optional; either this or `moduleInfoFile` or `moduleInfo` must be given)\n* `moduleInfoFile`: Path to a module-info.java descriptor\n(optional; either this or `moduleInfoSource` or `moduleInfo` must be given)\n* `moduleInfo`: A `moduleInfo` configuration as used with the `generate-module-info`\ngoal (optional; either this or `moduleInfoSource` or `moduleInfoFile` must be given)\n* `mainClass`: The fully-qualified name of the main class to be added to the\nmodule descriptor (optional)\n* `version`: The version to be added to the module descriptor; if not given and\n`artifact` is given, the artifact's version will be used; otherwise no version\nwill be added (optional)\n\nThe modularized JARs can be found in the folder given via `outputDirectory`.\nThe `jdepsExtraArgs` option can be used to specify a list of arguments passed to the _jdeps_ invocation for creating a \"candidate descriptor\".\n\n### Creating modular runtime images\n\nTo create a modular runtime image (see\n[JEP 220](http://openjdk.java.net/jeps/220)), configure the\n_create-runtime-image_ goal as follows:\n\n```xml\n...\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.moditect\u003c/groupId\u003e\n    \u003cartifactId\u003emoditect-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0.Final\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003ecreate-runtime-image\u003c/id\u003e\n            \u003cphase\u003epackage\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003ecreate-runtime-image\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n                \u003cmodulePath\u003e\n                    \u003cpath\u003e${project.build.directory}/modules\u003c/path\u003e\n                \u003c/modulePath\u003e\n                \u003cmodules\u003e\n                    \u003cmodule\u003ecom.example.module1\u003c/module\u003e\n                    \u003cmodule\u003ecom.example.module2\u003c/module\u003e\n                \u003c/modules\u003e\n                \u003cexcludedResources\u003e\n                    \u003cpattern\u003eglob:/com.example/**\u003c/pattern\u003e\n                \u003c/excludedResources\u003e\n                \u003cbaseJdk\u003eversion=9,vendor=openjdk,platform=linux-x64\u003c/baseJdk\u003e\n                \u003clauncher\u003e\n                    \u003cname\u003ehelloWorld\u003c/name\u003e\n                    \u003cmodule\u003ecom.example.module1\u003c/module\u003e\n                \u003c/launcher\u003e\n                \u003coutputDirectory\u003e\n                    ${project.build.directory}/jlink-image\n                \u003c/outputDirectory\u003e\n            \u003c/configuration\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n...\n```\nThe following configuration options exist:\n\n* `modulePath`: One or more directories with modules to be considered for\ncreating the image (required); the `jmods` directory of the current JVM will be\nadded implicitly, so it doesn't have to be given here\n* `modules`: The module(s) to be used as the root for resolving the modules to\nbe added to the image (required)\n* `outputDirectory`: Directory in which the runtime image should be created\n(required)\n* `launcher`: file name and main module for creating a launcher file (optional)\n* `stripDebug` whether to strip debug symbols or not (optional, defaults to `false`)\n* `excludedResources` list of patterns for excluding matching resources from the created\nruntime image\n* `baseJdk`: requirements for identifying a JDK in _~/.m2/toolchains.xml_ whose jmod files\nwill be used when creating the runtime image (optional; if not given the JDK running the\ncurrent build will be used). Must unambiguously identify one toolchain entry of type `jdk`\nthat matches all given requirements in its `\u003cprovides\u003e` configuration. This can be used for\ncreating runtime images on one platform (e.g. OS X) while targeting another (e.g. Linux).\n* `ignoreSigningInformation`: Suppresses a fatal error when signed modular JARs are linked\nin the runtime image. The signature-related files of the signed modular JARs aren’t copied\nto the runtime image.\n* `noManPages`: No man pages will be added\n* `noHeaderFiles`: No native header files will be added\n* `bindServices`: Link service provider modules and their dependencies\n* `jarInclusionPolicy`: Whether to add the application JAR and optionally its dependencies\nto the runtime image, under the _jars_ directory, allowing to run a classpath-based\napplication on a modular runtime image; allowed values are `NONE`, `APP`, and `APP_WITH_DEPENDENCIES`.\n\nIn order to identify the JDK images which should go into a custom runtime image for a classpath-based application,\nyou can run the following goal:\n\n```\nlist-application-image-modules\n```\n\nThis will run the _jdeps_ command under the hood, listing all JDK modules required by the application and its dependencies.\n\nOnce the image has been created, it can be executed by running:\n\n```\n./\u003coutputDirectory\u003e/bin/java --module com.example\n```\n\nOr, if a launcher has been configured:\n\n```\n./\u003coutputDirectory\u003e/bin/\u003clauncherName\u003e\n```\n\n## Examples\n\n### Undertow\n\nThe [POM file](integrationtest/undertow/pom.xml) in _integrationtest/undertow_\nshows a more complete example. It adds module descriptors for\n[Undertow Core](http://undertow.io/) and its dependencies, i.e. it allows to run\nthe Undertow web server based on Java 9 modules.\n\nRun\n```\ncd integrationtest/undertow\nmvn clean install\n```\nto build the example. You then can start Undertow by executing\n\n```\njava --module-path target/modules --module com.example\n```\n\nAlternatively, you can run the modular runtime image created by the example:\n\n```\n./target/jlink-image/bin/helloWorld\n```\n\nThen visit [http://localhost:8080/?name=YourName](http://localhost:8080/?name=YourName)\nin your browser for the canonical \"Hello World\" example.\n\n### Vert.x\n\nThe [POM file](integrationtest/vert.x/pom.xml) in _integrationtest/vertx_\nshows a more complete example. It adds module descriptors for\n[Vert.x](http://vertx.io) and its dependencies (Netty, Jackson) and creates a modular runtime\nimage with a \"hello world\" verticle.\n\nExecute\n\n```\ncd integrationtest/vert.x\nmvn clean install -Pjlink\n```\n\nto build the example.\n\nYou can then run the modular runtime image like so:\n\n```\n./target/jlink-image/bin/helloWorld\n```\n\nThen visit [http://localhost:8080/?name=YourName](http://localhost:8080/?name=YourName)\nin your browser for the canonical \"Hello World\" example.\n\nThe runtime image has a size of 45 MB, which could be further improved by a few adjustments to the involved libraries.\nE.g. _jackson-databind_ pulls in _java.sql_ unconditionally which could be avoided by making data converters related to\n`java.sql` types an optional feature.\n\n#### Using Docker\n\nThe Vert.x example can also be run on Docker. To do so, run the build with the \"docker-base\" profile:\n\n```\nmvn clean install -Pdocker-base\n```\n\nThis will create an image named _moditect/vertx-helloworld-base_ which contains the jlink image.\nTo run that image execute\n\n```\ndocker run --rm -t -i -p 8080:8080 moditect/vertx-helloworld-base\n```\n\nChanges to the application will require to rebuild the entire `jlink` image which actually isn't needed if just the app itself\nchanged but not its dependencies (used JDK modules or 3rd-party modules).\nTherefore another image can be build using the \"docker\" profile:\n\n```\nmvn clean install -Pdocker\n```\n\nThis will create an image named _moditect/vertx-helloworld_ which extends the base image and just adds the application module (_com.example_) on the upgrade module path.\nHence that image is very quick to be built (and distributed) once the base image is in place.\nTo run that image execute\n\n```\ndocker run --rm -t -i -p 8080:8080 moditect/vertx-helloworld\n```\n\n## Status\n\nModiTect is at an early stage of development and it still has some rough edges.\nUse it at your own risk.\n\n## Further Planned Features\n\nAdding module descriptors to existing JARs is the first functionality\nimplemented in ModiTect. Potential future developments include:\n\n* Update existing module descriptors (e.g. to remove/replace a requires clause)\n* Better support for generating and adding a module descriptor to the JAR produced by a\n  build itself (i.e. not a JAR it depends on)\n* Install/Deploy updated (modularized) JARs with a new name/classifier etc.\n* Adding transitive modifier to dependences based on whether their types are exposed in a\n  module's exported API or not\n* YOUR ideas :)\n\n## Related Work\n\n[ModuleTools](https://github.com/forax/moduletools/) by Remi Forax shows how to\nassemble module descriptors using ASM.\n\n## License\n\nModiTect is licensed under the Apache License version 2.0. ASM (which is contained within\nthe ModiTect JAR in the `org/moditect/internal/shaded/asm/` package) is licensed under the\n3 clause BSD license (see _etc/LICENSE_ASM.txt_).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoditect%2Fmoditect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoditect%2Fmoditect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoditect%2Fmoditect/lists"}