{"id":48990744,"url":"https://github.com/basteez/jsf-autoreload","last_synced_at":"2026-04-18T14:15:10.490Z","repository":{"id":344031929,"uuid":"1180103049","full_name":"basteez/jsf-autoreload","owner":"basteez","description":"Gradle plugin to enable autoreload on jsf projects","archived":false,"fork":false,"pushed_at":"2026-04-15T07:49:04.000Z","size":799,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-15T09:39:40.056Z","etag":null,"topics":["autoreload","java","jsf"],"latest_commit_sha":null,"homepage":"","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/basteez.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-12T17:47:59.000Z","updated_at":"2026-04-15T07:49:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/basteez/jsf-autoreload","commit_stats":null,"previous_names":["basteez/jsf-autoreload"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/basteez/jsf-autoreload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basteez%2Fjsf-autoreload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basteez%2Fjsf-autoreload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basteez%2Fjsf-autoreload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basteez%2Fjsf-autoreload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basteez","download_url":"https://codeload.github.com/basteez/jsf-autoreload/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basteez%2Fjsf-autoreload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31971619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"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":["autoreload","java","jsf"],"created_at":"2026-04-18T14:14:50.858Z","updated_at":"2026-04-18T14:15:10.485Z","avatar_url":"https://github.com/basteez.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsf-autoreload\n\nJSF hot-reload plugin — monitors file changes and automatically refreshes the browser via SSE.\n\n## Features\n\n- **XHTML page reload** — detects changes to `.xhtml` Facelets pages and triggers a browser refresh\n- **CSS/JS static resource reload** — watches static resources under JSF resource directories\n- **Class file reload** — monitors `.class` file changes with configurable debounce to avoid partial reloads\n- **Auto-compile on Java source changes** — optionally runs a compile command when `.java` files change\n- **SSE-based browser refresh** — pushes reload events to the browser via Server-Sent Events (no polling)\n\n## Compatibility\n\n| Component | Supported |\n|-----------|-----------|\n| Java | 8+ |\n| JSF (javax) | 2.3+ (`javax.faces-api`) |\n| Jakarta Faces | 3.0+ (`jakarta.faces-api`) |\n| Servlet API | 3.0+ |\n| Tomcat | Officially supported |\n| Other containers | Servlet 3.0+ containers (e.g., Jetty, WildFly) may work but are untested |\n\n## Module Structure\n\n| Module | ArtifactId | Description |\n|--------|------------|-------------|\n| Core | `jsf-autoreload-core` | Core library — SSE handler, file watcher, configuration, JSF bridge |\n| Tomcat Adapter | `jsf-autoreload-tomcat` | Tomcat container adapter |\n| Maven Plugin | `jsf-autoreload-maven-plugin` | Maven plugin — `watch` and `auto-compile` goals |\n| Integration Tests | `jsf-autoreload-integration-tests` | End-to-end tests with embedded Tomcat |\n\n## Quick Start\n\n**1. Add dependencies** to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eit.bstz\u003c/groupId\u003e\n    \u003cartifactId\u003ejsf-autoreload-core\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n\u003cdependency\u003e\n    \u003cgroupId\u003eit.bstz\u003c/groupId\u003e\n    \u003cartifactId\u003ejsf-autoreload-tomcat\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n**2. Add the Maven plugin** to your `\u003cbuild\u003e\u003cplugins\u003e` section:\n\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003eit.bstz\u003c/groupId\u003e\n    \u003cartifactId\u003ejsf-autoreload-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e0.1.0-SNAPSHOT\u003c/version\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003ewatch\u003c/goal\u003e\n            \u003c/goals\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\n**3. Run** the watch goal:\n\n```sh\nmvn jsf-autoreload:watch\n```\n\nThe plugin will monitor your source directory for changes and automatically recompile and refresh the browser.\n\n## javax vs jakarta\n\nThe plugin supports both the legacy `javax.faces` and the modern `jakarta.faces` namespaces:\n\n- **javax.faces 2.3+** — use `javax.faces-api` and `javax.servlet-api` dependencies\n- **Jakarta Faces 3.0+** — use `jakarta.faces-api` and `jakarta.servlet-api` dependencies\n\nThe core library auto-detects the active namespace at runtime via `BridgeDetector` — no manual configuration is required.\n\n## Configuration Reference\n\n### web.xml Context Parameters\n\nAll context parameters use the prefix `it.bstz.jsfautoreload.` in `web.xml` and the prefix `jsfautoreload.` as system properties. System properties take precedence over `web.xml` values.\n\n| Parameter | Type | Default | Description |\n|-----------|------|---------|-------------|\n| `enabled` | boolean | `true` | Enable/disable the plugin entirely |\n| `debounceMs` | long | `500` | Debounce interval (ms) for non-class file changes |\n| `classDebounceMs` | long | `1000` | Debounce interval (ms) for class file changes |\n| `sseEndpointPath` | String | `/_jsf-autoreload/events` | SSE endpoint path for browser connection |\n| `autoCompileEnabled` | boolean | `false` | Enable automatic compilation on Java source changes |\n| `autoCompileCommand` | String | *(none)* | Shell command to execute for auto-compile |\n| `sourceDirectory` | String | `src/main/java` | Java source directory to watch for auto-compile |\n| `watchDirs` | String | *(none)* | Comma-separated additional directories to watch |\n| `excludePatterns` | String | *(none)* | Comma-separated glob patterns to exclude from watching |\n\nExample `web.xml` configuration:\n\n```xml\n\u003ccontext-param\u003e\n    \u003cparam-name\u003eit.bstz.jsfautoreload.debounceMs\u003c/param-name\u003e\n    \u003cparam-value\u003e300\u003c/param-value\u003e\n\u003c/context-param\u003e\n```\n\nOr via system property:\n\n```sh\n-Djsfautoreload.debounceMs=300\n```\n\n### Maven Plugin Parameters\n\n| Parameter | Property | Default | Description |\n|-----------|----------|---------|-------------|\n| `sourceDirectory` | `jsf-autoreload.sourceDirectory` | `src/main/java` | Source directory to monitor |\n| `compileCommand` | `jsf-autoreload.compileCommand` | `mvn compile` | Compile command to execute on change |\n| `autoCompile` | `jsf-autoreload.autoCompile` | `true` | Enable/disable auto-compile goal |\n\n## Building from Source\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/basteez/jsf-autoreload.git\n   ```\n2. Build all modules:\n   ```sh\n   mvn clean install\n   ```\n3. Run unit and integration tests:\n   ```sh\n   mvn verify\n   ```\n\n## Development Workflow\n\nThis project uses [Speckit](https://github.com/basteez/speckit) for feature planning. The full workflow for new features is:\n\n1. **Specify** — define the feature spec (`/speckit-specify`)\n2. **Plan** — create the implementation plan (`/speckit-plan`)\n3. **Tasks** — generate the task breakdown (`/speckit-tasks`)\n4. **Implement** — execute the tasks (`/speckit-implement`)\n\nThe full workflow is expected for new features. For smaller contributions like bug fixes and documentation improvements, you can skip the planning steps and contribute directly.\n\n## License\n\nThis project is licensed under the [Apache License 2.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasteez%2Fjsf-autoreload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasteez%2Fjsf-autoreload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasteez%2Fjsf-autoreload/lists"}