{"id":36421103,"url":"https://github.com/labai/labai-jsr305","last_synced_at":"2026-01-11T17:36:05.819Z","repository":{"id":57720897,"uuid":"419422552","full_name":"labai/labai-jsr305","owner":"labai","description":"Jsr305 (nullables) extension for jaxb maven plugin","archived":false,"fork":false,"pushed_at":"2023-11-25T18:28:40.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2023-11-25T19:27:46.472Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/labai.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}},"created_at":"2021-10-20T17:14:40.000Z","updated_at":"2023-06-20T08:13:23.000Z","dependencies_parsed_at":"2023-11-23T21:25:29.517Z","dependency_job_id":"85de9be0-4287-4311-ae39-7f1bef72e6a0","html_url":"https://github.com/labai/labai-jsr305","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/labai/labai-jsr305","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labai%2Flabai-jsr305","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labai%2Flabai-jsr305/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labai%2Flabai-jsr305/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labai%2Flabai-jsr305/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/labai","download_url":"https://codeload.github.com/labai/labai-jsr305/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/labai%2Flabai-jsr305/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28315879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: 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-11T17:36:05.175Z","updated_at":"2026-01-11T17:36:05.813Z","avatar_url":"https://github.com/labai.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# labai-jaxb-jsr305\n\n## About\nExtension for jaxb maven plugin for generating @NotNull annotation on mandatory fields.\n\n### Purpose\n\nWhen kotlin access Java classes, it assumes that every field is not null by default. \nIn most cases it is not true for classes, generated from xsd. \nIf to reverse to nullable by default, it also will not always be true, as some fields \nare not nullable by xsd scheme.\n\nThis plugin adds @NotNull annotation on those fields, which are mandatory by xsd. \nIt adds nullable-by-default annotation on package level also. \n\nFor kotlin it will make fields, which can't be null by xsd, as non-nullable - no need for '?' or '!!' operators.\nOther fields are nullable and you need to handle null case.\n\n\n### Usage\n\nAdd configuration to maven jaxb plugin in pom.xml:\n\ncom.github.labai:labai-jsr305-jaxb-plugin\ncom.github.labai:labai-jsr305x-annotations\n\nAnd add argument _-XJsr305Annotations_.\n\n#### Example \n(see examples/example3-jaxb-maven-plugin)\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.8\u003c/version\u003e\n\n    \u003cconfiguration\u003e\n        \u003cargs\u003e\n            \u003carg\u003e-extension\u003c/arg\u003e\n            \u003carg\u003e-Xnamespace-prefix\u003c/arg\u003e\n        \u003c/args\u003e\n    \u003c/configuration\u003e\n    \u003cexecutions\u003e\n        \u003cexecution\u003e\n            \u003cid\u003exsd.pain.001.001.11\u003c/id\u003e\n            \u003cphase\u003egenerate-sources\u003c/phase\u003e\n            \u003cgoals\u003e\n                \u003cgoal\u003egenerate\u003c/goal\u003e\n            \u003c/goals\u003e\n            \u003cconfiguration\u003e\n                \u003cschemaDirectory\u003esrc/main/resources/xsd/pain.001.001.11\u003c/schemaDirectory\u003e\n                \u003cgeneratePackage\u003eexample3.generated.pain_001_001_11\u003c/generatePackage\u003e\n                \u003cforceRegenerate\u003etrue\u003c/forceRegenerate\u003e\n                \u003cargs\u003e\n                    \u003carg\u003e-XJsr305Annotations\u003c/arg\u003e\n                    \u003carg\u003e-XJsr305Annotations:generateListItemNonnull=true\u003c/arg\u003e\n                \u003c/args\u003e\n            \u003c/configuration\u003e\n        \u003c/execution\u003e\n    \u003c/executions\u003e\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ejakarta.xml.bind\u003c/groupId\u003e\n            \u003cartifactId\u003ejakarta.xml.bind-api\u003c/artifactId\u003e\n            \u003cversion\u003e4.0.2\u003c/version\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.glassfish.jaxb\u003c/groupId\u003e\n            \u003cartifactId\u003ejaxb-runtime\u003c/artifactId\u003e\n            \u003cversion\u003e4.0.5\u003c/version\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.github.labai\u003c/groupId\u003e\n            \u003cartifactId\u003elabai-jsr305-jaxb-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e0.1.0\u003c/version\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.github.labai\u003c/groupId\u003e\n            \u003cartifactId\u003elabai-jsr305x-annotations\u003c/artifactId\u003e\n            \u003cversion\u003e0.0.2\u003c/version\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\u003c/plugin\u003e\n```\n\nAlso you will need to add dependency:\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.labai\u003c/groupId\u003e\n    \u003cartifactId\u003elabai-jsr305x-annotations\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Parameters\n\nYou may want to use another NotNull annotation \n(e.g. kotlin supports a couple of them: https://kotlinlang.org/docs/java-interop.html#nullability-annotations).\nThen you may provide additional parameters:\n\n| Parameter                                   | Description                                                       | Default                                         |\n|:--------------------------------------------|:------------------------------------------------------------------|:------------------------------------------------|\n| -XJsr305Annotations:nonnullClass            | @Notnull annotation on field, method or parameter                 | @com.github.labai.jsr305x.api.NotNull           |\n| -XJsr305Annotations:defaultNullableClass    | @NullableByDefault on package-info.java (default for all package) | @com.github.labai.jsr305x.api.NullableByDefault |\n| -XJsr305Annotations:generateDefaultNullable | generate @NullableByDefault                                       | true                                            |\n| -XJsr305Annotations:generateListItemNonnull | generate @NotNull for list items, e.g. List\u003c@NotNull Item\u003e        | false                                           |\n| -XJsr305Annotations:verbose                 | More logs                                                         | true                                            |\n\nAn example:\n\n```xml\n\u003carg\u003e-XJsr305Annotations:defaultNullableClass=org.your.DefaultNullable\u003c/arg\u003e\n\u003carg\u003e-XJsr305Annotations:nonnullClass=org.your.NonNull\u003c/arg\u003e\n\u003carg\u003e-XJsr305Annotations:generateListItemNonnull=true\u003c/arg\u003e\n```\n\n### Versions\n\n- 0.1.x - Jakarta Jaxb4, Java17+\n- 0.0.x - Jaxb2, Java8\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabai%2Flabai-jsr305","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flabai%2Flabai-jsr305","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flabai%2Flabai-jsr305/lists"}