{"id":28395104,"url":"https://github.com/webfx-project/webfx-cli","last_synced_at":"2025-10-28T09:03:45.349Z","repository":{"id":50570046,"uuid":"320409954","full_name":"webfx-project/webfx-cli","owner":"webfx-project","description":"The Command Line Interface for WebFX. The terminal tool for developing WebFX applications.","archived":false,"fork":false,"pushed_at":"2025-06-22T08:47:44.000Z","size":987,"stargazers_count":13,"open_issues_count":1,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-22T09:32:41.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://webfx.dev","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/webfx-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2020-12-10T22:56:27.000Z","updated_at":"2025-06-22T08:47:47.000Z","dependencies_parsed_at":"2024-01-07T16:46:04.764Z","dependency_job_id":"6185fe80-7270-4d89-bea8-dbbf9860415d","html_url":"https://github.com/webfx-project/webfx-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/webfx-project/webfx-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfx-project%2Fwebfx-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfx-project%2Fwebfx-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfx-project%2Fwebfx-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfx-project%2Fwebfx-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webfx-project","download_url":"https://codeload.github.com/webfx-project/webfx-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webfx-project%2Fwebfx-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262172575,"owners_count":23270046,"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":"2025-05-31T19:39:02.342Z","updated_at":"2025-10-28T09:03:45.344Z","avatar_url":"https://github.com/webfx-project.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Deploy to Sonatype](https://github.com/webfx-project/webfx-cli/actions/workflows/build-and-deploy-to-sonatype.yml/badge.svg)\n![Scc Code Count Badge](https://sloc.xyz/github/webfx-project/webfx-cli/?category=code)\n![Scc Blanks Count Badge](https://sloc.xyz/github/webfx-project/webfx-cli/?category=blanks)\n![Scc Lines Count Badge](https://sloc.xyz/github/webfx-project/webfx-cli/?category=lines)\n![Scc Comments Count Badge](https://sloc.xyz/github/webfx-project/webfx-cli/?category=comments)\n![Scc COCOMO Badge](https://sloc.xyz/github/webfx-project/webfx-cli/?category=cocomo)\n![Discover Vulnerabilities Using CodeQL](https://github.com/webfx-project/webfx-cli/actions/workflows/discover-vulnerabilities.yml/badge.svg)\n\n# WebFX CLI\n\nThe WebFX CLI is the Command Line Interface for WebFX. It's an essential tool for developing WebFX applications.\n\n\u003cp align=\"center\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://docs.webfx.dev/webfx-readmes/webfx-cli-dark.svg\"\u003e\n      \u003cimg src=\"https://docs.webfx.dev/webfx-cli.svg\" /\u003e\n    \u003c/picture\u003e\n\u003c/p\u003e\n\nThe WebFX CLI creates and maintains all the application modules, including all the necessary build chain module files, from the information declared in the webfx.xml files and the module source code. For example, it will automatically compute all the dependencies of a module (in pom.xml) from an analysis of the module's Java source code.\n\nMore information is given in the WebFX [documentation][webfx-cli-docs], including the installation and the command line usage.\n\n## How it works\n\nThe WebFX CLI scans the entire application repository, together with possible library sources, to understand which packages belong to which modules. Use this information, it can then determine which modules a Java source file is using, just by detecting which packages it is using. Each time a Java file references a package that is not declared in its own module, the CLI will introduce a dependency to the external module that the package belongs to (it can be module within the application or within a library source).  \n\n## Known limitation\n\nThe current Java source file analyser is a simple implementation based on regular expressions. It can only detect packages that are explicitly written in the Java source file (such as the ones listed in the imports, or in the code when using a fully qualified class name). However, where developers have used packages implicitly, the CLI currently cannot detect them. For example:\n\n```java\npackage mypackage;\n\nimport packageA; // Where ClassA is defined in moduleA\nimport packageC; // Where ClassC is defined in moduleC\n\npublic class MyClass {\n\n    public void myMethod() {\n        ClassA a = new CLassA();\n        ClassC c = a.getB().getC(); // implicit usage of packageB where ClassB is defined \u003c= not detected by the CLI \n    }\n\n}\n```\n\n## Workaround\n\nThere are 2 possible workarounds. The first is to rewrite the code in an explicit way, for example: \n\n```java\npackage mypackage;\n\nimport packageA; // Where ClassA is defined in moduleA\nimport packageB; // Where ClassB is defined in moduleB\nimport packageC; // Where ClassC is defined in moduleC\n\npublic class MyClass {\n\n    public void myMethod() {\n        ClassA a = new CLassA();\n        ClassB b = a.getB();\n        ClassC c = b.getC(); \n    }\n\n}\n```\n\nThe second way is to list the modules missed by the CLI in the webfx.xml:\n\n```xml\n\n\u003cdependencies\u003e\n    \u003cused-by-source-modules\u003e\n        \u003cundetected-module\u003emoduleC\u003c/undetected-module\u003e\n    \u003c/used-by-source-modules\u003e\n\u003c/dependencies\u003e\n\n```\n\n## Get involved!\n\nWe are looking for a contributor with expertise in Java language parsing. The task will be to replace the current implementation with a proper Java parser, in order to fix the implicit package limitation. If you would like to work on this topic, please apply in the related [issue][webfx-cli-issue]. Thank you! \n\n## License\n\nThe WebFX CLI is a free, open-source software licensed under the [Apache License 2.0](LICENSE)\n\n[webfx-cli-docs]: https://docs.webfx.dev/#_introducing_the_webfx_cli\n[webfx-cli-issue]: https://github.com/webfx-project/webfx-cli/issues/1","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfx-project%2Fwebfx-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebfx-project%2Fwebfx-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebfx-project%2Fwebfx-cli/lists"}