{"id":37420484,"url":"https://github.com/rawvoid/jaxb-plugins","last_synced_at":"2026-02-06T05:15:31.611Z","repository":{"id":327725667,"uuid":"1110460161","full_name":"rawvoid/jaxb-plugins","owner":"rawvoid","description":"🚀 Modern JAXB plugins collection for Java XML binding - XJC plugins with JSR-310 date/time support, annotation processing, and code generation tools","archived":false,"fork":false,"pushed_at":"2026-02-03T16:23:05.000Z","size":332,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-03T21:38:27.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/rawvoid/jaxb-plugins","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/rawvoid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-12-05T08:19:18.000Z","updated_at":"2026-02-03T16:19:21.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rawvoid/jaxb-plugins","commit_stats":null,"previous_names":["rawvoid/jaxb-plugins"],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/rawvoid/jaxb-plugins","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawvoid%2Fjaxb-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawvoid%2Fjaxb-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawvoid%2Fjaxb-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawvoid%2Fjaxb-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawvoid","download_url":"https://codeload.github.com/rawvoid/jaxb-plugins/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawvoid%2Fjaxb-plugins/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29152031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T02:39:25.012Z","status":"ssl_error","status_checked_at":"2026-02-06T02:37:22.784Z","response_time":59,"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":[],"created_at":"2026-01-16T06:05:58.082Z","updated_at":"2026-02-06T05:15:31.603Z","avatar_url":"https://github.com/rawvoid.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 JAXB Plugins Collection\n\n\u003e **Supercharge your XML binding with next-gen JAXB plugins!**\n\n[![Java](https://img.shields.io/badge/Java-21+-orange.svg)](https://www.oracle.com/java/)\n[![JAXB](https://img.shields.io/badge/JAXB-4.0+-blue.svg)](https://eclipse-ee4j.github.io/jaxb-ri/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](https://opensource.org/licenses/Apache-2.0)\n\nTired of boring, boilerplate-heavy JAXB code generation? Say hello to **JAXB Plugins Collection** – your ultimate toolkit for making XML binding actually *fun* again! 🎉\n\nThis collection of powerful plugins transforms the way you work with JAXB, giving you superpowers to customize, optimize, and streamline your generated code like never before.\n\n---\n\n## ✨ What's Inside?\n\n### 🔧 **Core Framework**\nBuilt on a rock-solid foundation with our `AbstractPlugin` class that makes creating new plugins a breeze. Features annotation-based configuration, automatic option parsing, and extensible text parsers.\n\n---\n\n## 🎯 Plugin Arsenal\n\n### 📅 **JSR310Plugin** `-Xjsr310`\n*Time travel made easy!*\n\nBring your JAXB code into the 21st century with full JSR-310 (java.time) support. Automatically maps XSD date/time types to modern Java time API classes.\n\n**🔥 Use Cases:**\n- Use `LocalDateTime` instead of `XMLGregorianCalendar`\n- Support `ZonedDateTime` for timezone-aware dates\n- Custom date formatting with patterns\n- Auto-generate XmlAdapter classes\n\n**⚡ Quick Start:**\n```bash\n-Xjsr310 \\\n  -adapter-package=com.example.adapters \\\n  -mapping \\\n  -xsd-type=dateTime \\\n  -target-class=java.time.LocalDateTime \\\n  -pattern=yyyy-MM-dd HH:mm:ss\n```\n\n**📝 Command Structure:**\n```bash\n-Xjsr310 \\\n  -adapter-package=package.name \\\n  -mapping \\\n  -xsd-type=xsdType \\\n  -target-class=java.time.Class \\\n  -pattern=dateFormat \\\n  -adapter=custom.AdapterClass \\\n  -regex=fieldPattern\n```\n\n**🎯 Default Mappings:**\n- `xs:dateTime` → `LocalDateTime`\n- `xs:date` → `LocalDate`\n- `xs:time` → `LocalTime`\n- `xs:gYearMonth` → `YearMonth`\n- `xs:gYear` → `Year`\n- `xs:gMonthDay` → `MonthDay`\n- `xs:gDay` → `Integer`\n- `xs:gMonth` → `Month`\n- `xs:duration` → `Duration`\n\n---\n\n### 🏷️ **AnnotatePlugin** `-Xannotate`\n*Your annotation wizard!*\n\nAdd, remove, or customize annotations on generated classes, fields, methods, and packages. Perfect for integrating with frameworks like Jackson, Hibernate, or your custom annotations.\n\n**🔥 Use Cases:**\n- Add `@JsonProperty` annotations for JSON serialization\n- Inject validation annotations (`@NotNull`, `@Size`)\n- Add Lombok annotations (`@Data`, `@Builder`, `@Accessor`)\n- Remove unwanted JAXB annotations\n- Apply custom framework annotations\n\n**⚡ Quick Start:**\n```bash\n-Xannotate \\\n  -add-to-class \\\n  -anno=@com.example.MyAnnotation \\\n  -regex=.*Person \\\n  -add-to-field \\\n  -anno=@com.fasterxml.jackson.annotation.JsonProperty(\"value\") \\\n  -regex=.*name\n```\n\n**📝 Command Structure:**\n```bash\n-Xannotate \\\n  -add-to-class|-add-to-field|-add-to-method|-add-to-package \\\n  -anno=@AnnotationClass(param=\"value\") \\\n  -regex=pattern \\\n  -remove-from-class|-remove-from-field|-remove-from-method|-remove-from-package \\\n  -anno=AnnotationClass \\\n  -regex=pattern\n```\n\n---\n\n### 🔄 **ConvertNamePlugin** `-Xconvert-name`\n*The naming ninja!*\n\nTake control of how JAXB converts XML names to Java identifiers. Customize class names, field names, method names, and package names with precision.\n\n**🔥 Use Cases:**\n- Convert snake_case XML to camelCase Java\n- Apply custom naming conventions\n- Fix awkward auto-generated names\n- Map legacy XML to modern Java standards\n\n**⚡ Quick Start:**\n```bash\n-Xconvert-name \\\n  -class-name \\\n  -token=XMLDocument \\\n  -name=Document \\\n  -variable-name \\\n  -regex=(.*)_ID \\\n  -name=$1Id\n```\n\n**📝 Command Structure:**\n```bash\n-Xconvert-name \\\n  -class-name|-variable-name|-interface-name|-property-name|-constant-name|-package-name \\\n  -token=originalName \\\n  -regex=pattern \\\n  -name=newName\n```\n\n---\n\n### 📦 **ElementWrapperPlugin** `-Xelement-wrapper`\n*The wrapper eliminator!*\n\nSimplify your generated code by automatically flattening wrapper classes. Moves `@XmlElementWrapper` and `@XmlElement` annotations to the using field and optionally removes the wrapper class entirely.\n\n**🔥 Use Cases:**\n- Clean up collection wrapper classes\n- Reduce boilerplate code\n- Improve API readability\n- Optimize memory usage\n\n**⚡ Quick Start:**\n```bash\n-Xelement-wrapper \\\n  -remove-wrapper-class=true\n```\n\n---\n\n### 🧩 **FlattenInnerClassPlugin** `-Xflatten-inner-class`\n*The inner-class flattener!*\n\nFlatten public inner classes generated by XJC into top-level classes when it’s safe to do so. This keeps your generated code cleaner and easier to navigate without name collisions.\n\n**🔥 Use Cases:**\n- Promote public nested classes to top-level classes\n- Reduce deeply nested generated types\n- Improve readability of generated APIs\n\n**⚡ Quick Start:**\n```bash\n-Xflatten-inner-class\n```\n\n---\n\n### 🌍 ~~**NamespacePlugin** `-Xnamespace`~~\n~~*The namespace navigator!*~~\n\n~~**This plugin is deprecated and may be removed in future versions.**~~\n\n~~Take control of XML namespace to Java package mappings. Define custom mappings and automatically generate JAXB binding files.~~\n\n~~**🔥 Use Cases:**~~\n~~- Map namespaces to meaningful package names~~\n~~- Avoid default package naming conflicts~~\n~~- Support multiple schema versions~~\n~~- Clean up package structure~~\n\n~~**⚡ Quick Start:**~~\n```bash\n-Xnamespace \\\n  -mapping \\\n  -ns=http://example.com/schema \\\n  -package=com.example.schema \\\n  -prefix=ex\n```\n\n~~**📝 Command Structure:**~~\n```bash\n-Xnamespace \\\n  -mapping \\\n  -ns=namespaceURI \\\n  -package=java.package.name \\\n  -prefix=xmlPrefix\n```\n\n---\n\n### 🗑️ **RemoveGetterPlugin** `-Xremove-getter`\n*The getter ghost!*\n\nRemove unnecessary getter methods from generated classes when you only need setters or direct field access.\n\n**🔥 Use Cases:**\n- Create immutable-like structures\n- Reduce method count for cleaner APIs\n- Optimize for specific use cases\n- Custom access patterns\n\n**⚡ Quick Start:**\n```bash\n-Xremove-getter\n```\n\n---\n\n### 🗑️ **RemoveSetterPlugin** `-Xremove-setter`\n*The setter slayer!*\n\nRemove unnecessary setter methods from generated classes when you only need getters or want read-only objects.\n\n**🔥 Use Cases:**\n- Create read-only DTOs\n- Enforce immutability\n- Secure data transfer objects\n- Clean API design\n\n**⚡ Quick Start:**\n```bash\n-Xremove-setter\n```\n\n---\n\n### 🏷️ **NsPrefixPlugin** `-Xns-prefix`\n*The namespace prefix master!*\n\nTake control of XML namespace prefixes in generated @XmlSchema annotations. Define custom mappings between XML namespaces and their prefixes, and automatically update package-info.java files.\n\n**🔥 Use Cases:**\n- Set consistent XML namespace prefixes across generated code\n- Customize prefixes for specific packages using regex patterns\n- Manage multiple namespaces in complex XML schemas\n- Replace default JAXB-generated prefixes with meaningful ones\n\n**⚡ Quick Start:**\n```bash\n-Xns-prefix \\\n  -config \\\n  -xmlns \\\n  -ns=http://example.com \\\n  -prefix=ex\n```\n\n**📝 Command Structure:**\n```bash\n-Xns-prefix \\\n  -config \\\n    -package=package.regex.pattern \\\n    -xmlns \\\n    -ns=namespaceURI \\\n    -prefix=xmlPrefix \\\n    -xmlns \\\n    -ns=anotherNamespace \\\n    -prefix=anotherPrefix \\\n  -config \\\n    -package=another.package.regex \\\n    -xmlns \\\n    -ns=namespaceURI \\\n    -prefix=prefix\n```\n\n**🎯 Advanced Examples:**\n```bash\n# Apply to all packages\n-Xns-prefix -config -xmlns -ns=http://example.com -prefix=ex\n\n# Package-specific configuration\n-Xns-prefix -config -package=com\\.example\\.* -xmlns -ns=http://example.com -prefix=ex\n\n# Multiple namespaces for a package\n-Xns-prefix -config -package=com\\.example\\.* -xmlns -ns=http://example.com -prefix=ex -xmlns -ns=http://test.com -prefix=tst\n```\n\n---\n\n## 🚀 Getting Started\n\n### 📦 Installation\n\nAdd this to your Maven `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.rawvoid\u003c/groupId\u003e\n    \u003cartifactId\u003ejaxb-plugins\u003c/artifactId\u003e\n    \u003cversion\u003e1.6.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### 🔧 Maven Plugin Setup\n\n```xml\n\u003cplugin\u003e\n    \u003cgroupId\u003eorg.jvnet.jaxb\u003c/groupId\u003e\n    \u003cartifactId\u003ejaxb-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e4.0.12\u003c/version\u003e\n    \u003cconfiguration\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003eio.github.rawvoid\u003c/groupId\u003e\n                \u003cartifactId\u003ejaxb-plugins\u003c/artifactId\u003e\n                \u003cversion\u003e1.6.0\u003c/version\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n        \u003cargs\u003e\n            \u003carg\u003e-Xjsr310\u003c/arg\u003e\n            \u003carg\u003e-Xannotate\u003c/arg\u003e\n            \u003carg\u003e-Xconvert-name\u003c/arg\u003e\n            \u003carg\u003e-Xns-prefix\u003c/arg\u003e\n        \u003c/args\u003e\n    \u003c/configuration\u003e\n\u003c/plugin\u003e\n```\n\n### 🎯 Command Line Usage\n\n```bash\nxjc -d src -p com.example \\\n    -extension \\\n    -Xjsr310 \\\n    -Xannotate \\\n    -Xconvert-name \\\n    -Xns-prefix \\\n    schema.xsd\n```\n\n---\n\n## 🎨 Advanced Examples\n\n### 🌟 **Full Stack Example**\n```bash\nxjc schema.xsd \\\n  -d src/main/java \\\n  -p com.example.api \\\n  -extension \\\n  -Xjsr310 \\\n    -adapter-package=com.example.adapters \\\n    -mapping \\\n    -xsd-type=dateTime \\\n    -target-class=java.time.LocalDateTime \\\n  -Xannotate \\\n    -add-to-class \\\n    -anno=@com.fasterxml.jackson.annotation.JsonInclude(JsonInclude.Include.NON_NULL) \\\n    -add-to-field \\\n    -anno=@com.fasterxml.jackson.annotation.JsonProperty(\"value\") \\\n    -regex=.*\\.value \\\n  -Xconvert-name \\\n    -class-name \\\n    -regex=(.*)Type \\\n    -name=$1DTO \\\n    -variable-name \\\n    -regex=(.*)_ID \\\n    -name=$1Id \\\n  -Xnamespace \\\n    -mapping \\\n    -ns=http://api.example.com \\\n    -package=com.example.api\n```\n\n### 🔥 **Microservice Example**\n```bash\nxjc -d src \\\n  -Xjsr310 \\\n    -mapping \\\n    -xsd-type=dateTime \\\n    -target-class=java.time.Instant \\\n    -mapping \\\n    -xsd-type=date \\\n    -target-class=java.time.LocalDate \\\n    -pattern=yyyy-MM-dd \\\n  -Xelement-wrapper \\\n    -remove-wrapper-class=true \\\n  -Xremove-getter \\\n  schema.xsd\n```\n\n### ☕ **Lombok Integration Example**\n```bash\nxjc schema.xsd \\\n  -d src/main/java \\\n  -p com.example.domain \\\n  -extension \\\n  -Xannotate \\\n    -add-to-class \\\n    -anno=@lombok.Data \\\n    -anno=@lombok.experimental.Accessor(chain = true) \\\n    -regex=.* \\\n  -Xremove-getter \\\n  -Xremove-setter\n```\n\n**🎯 What this does:**\n- Adds `@Data` annotation to all generated classes (generates getters, setters, toString, equals, hashCode)\n- Adds `@Accessor(chain = true)` for fluent builder pattern\n- Removes JAXB-generated getter methods (replaced by Lombok)\n- Removes JAXB-generated setter methods (replaced by Lombok)\n- Results in clean, modern Java classes with Lombok-powered functionality\n\n---\n\n## 🛠️ Building from Source\n\n```bash\ngit clone https://github.com/rawvoid/jaxb-plugins.git\ncd jaxb-plugins\nmvn clean install\n```\n\n**Requirements:**\n- Java 21+\n- Maven 3.6+\n\n---\n\n## 🤝 Contributing\n\nGot an awesome plugin idea? Found a bug? Want to make things even better? We'd love your help! 🎉\n\n1. **Fork** this repo\n2. **Create** your feature branch (`git checkout -b feature/amazing-plugin`)\n3. **Commit** your changes (`git commit -m 'Add mind-blowing plugin'`)\n4. **Push** to the branch (`git push origin feature/amazing-plugin`)\n5. **Open** a Pull Request\n\n---\n\n## 📜 License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🌟 Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=rawvoid/jaxb-plugins\u0026type=Date)](https://star-history.com/#rawvoid/jaxb-plugins\u0026Date)\n\n---\n\n## 💬 Got Questions?\n\n- 🐛 Report issues on [GitHub Issues](https://github.com/rawvoid/jaxb-plugins/issues)\n- 💬 Join the discussion in [Discussions](https://github.com/rawvoid/jaxb-plugins/discussions)\n\n---\n\n## 🙏 Acknowledgments\n\n- Built with ❤️ using [JAXB Reference Implementation](https://eclipse-ee4j.github.io/jaxb-ri/)\n- Inspired by the amazing [JAXB Annox](https://github.com/highsource/jaxb-annox) project\n- Thanks to all the contributors who make this project awesome!\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**⭐ If this project made your JAXB life easier, give it a star! ⭐**\n\nMade with ☕ and 🎵 by [Rawvoid](https://github.com/rawvoid)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawvoid%2Fjaxb-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawvoid%2Fjaxb-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawvoid%2Fjaxb-plugins/lists"}