{"id":18494920,"url":"https://github.com/qaware/xsd2java-gradle-plugin","last_synced_at":"2025-04-08T22:31:40.521Z","repository":{"id":46516896,"uuid":"126341685","full_name":"qaware/xsd2java-gradle-plugin","owner":"qaware","description":"The XSD2Java Gradle Plugin generates java classes from an existing XSD schema.","archived":false,"fork":false,"pushed_at":"2025-03-04T00:55:44.000Z","size":236,"stargazers_count":10,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-23T19:11:11.333Z","etag":null,"topics":["gradle","gradle-plugin","hacktoberfest","kotlin-dsl","xsd2java"],"latest_commit_sha":null,"homepage":"","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qaware.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}},"created_at":"2018-03-22T13:45:20.000Z","updated_at":"2025-01-10T13:59:33.000Z","dependencies_parsed_at":"2024-11-06T13:27:11.714Z","dependency_job_id":"365289f4-f8c0-4307-be2e-56ec3115cf7e","html_url":"https://github.com/qaware/xsd2java-gradle-plugin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fxsd2java-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fxsd2java-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fxsd2java-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qaware%2Fxsd2java-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qaware","download_url":"https://codeload.github.com/qaware/xsd2java-gradle-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247940396,"owners_count":21021958,"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":["gradle","gradle-plugin","hacktoberfest","kotlin-dsl","xsd2java"],"created_at":"2024-11-06T13:22:43.235Z","updated_at":"2025-04-08T22:31:40.508Z","avatar_url":"https://github.com/qaware.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Apache License 2](http://img.shields.io/badge/license-ASF2-blue.svg)](https://github.com/qaware/xsd2java-gradle-plugin/blob/master/LICENSE)\n\n# XSD2Java Gradle Plugin\n\nThe XSD2Java Gradle Plugin generates java classes from an existing XSD schema. For this it uses the existing ANT task.\n\n\u003e [!NOTE]\n\u003e To use javax namespace, you must use a version \u003c 4.0.0 of this plugin. From 4.0.0 it uses the jakarta namespace for xml bindings.\n\n## Usage\n\nBuild script snippet for use in all Gradle versions:\n```groovy\nbuildscript {\n    repositories {\n        maven {\n            url \"https://plugins.gradle.org/m2/\"\n        }\n    }\n    dependencies {\n        classpath 'de.qaware.gradle.plugin:xsd2java-gradle-plugin:4.0.1'\n    }\n}\n\napply plugin: 'de.qaware.gradle.plugin.xsd2java'\n```\n\nBuild script snippet for new, incubating, plugin mechanism introduced in Gradle 2.1:\n```groovy\nplugins {\n    id 'de.qaware.gradle.plugin.xsd2java' version '4.0.1'\n}\n```\n## Tasks\n\nThe plugin defines the following tasks:\n\nTask name | Depends on | Type | Description\n--------- | ---------- | ---- | ---\n`xsd2java`| -          | `XSD2JavaTask` | Generates all the types as java classes from a xsd schema.\n\n## Configurations\n\nThe plugin defines the following configurations:\n\nConfiguration Name  | Description\n------------------- | ---\n`xsd2java`          | Used for dependencies that needed by the generated sources.\n`xsd2javaExtension` | Used for extensions for the XJC ANT task.\n\n## Extension Properties\n\nThe plugin defines the following extension properties in the `xsd2java` closure:\n\nProperty name | Type   | Default value | Description\n------------- | ------ | - | ---\n`schemas`     | `Container\u003cXsd2JavaTaskConfig\u003e` | - | Contains the configurations for every base directory with schemas.\n`extension`   | `Boolean` | - | Should the ant task load extensions defined in the configuration `xsd2javaExtension`. Default false\n`arguments`   | `List\u003cString\u003e` | - | A list of arguments passed to the ant task\n`outputDir`   | `File` | - | The output directory for the generated sources.\n\n### Example\n\nThe following example show the full extension configuration:\n```groovy\nplugins {\n    id 'de.qaware.gradle.plugin.xsd2java' version '4.0.1'\n}\n\nxsd2java {\n    schemas {\n        dummy {\n            schemaDirPath 'src/main/resources/xsd'\n            packageName 'de.qaware.gradle.plugin.xsd2java.dummy.xsd'\n        }\n    }\n    \n    extension true\n    arguments ['-verbose']\n    outputDir file(\"${project.buildDir}/generated-sources/xsd2java\")\n}\n```\n\nIn case you are using the Kotlin DSL for you build script, the above example looks as follows:\n\n```kotlin\nplugins {\n    id(\"de.qaware.gradle.plugin.xsd2java\") version \"4.0.1\"\n}\n\nxsd2java {\n    schemas {\n        create(\"dummy\") {\n            schemaDirPath = file(\"src/main/resources/xsd\").toPath()\n            packageName = \"de.qaware.gradle.plugin.xsd2java.dummy.xsd\"\n        }\n    }\n    \n    extension = true\n    arguments = listOf(\"-verbose\")\n    outputDir = file(\"${project.buildDir}/generated-sources/xsd2java\")\n}\n```\n\n## Maintainer\n\n- Christian Fritz (@chrfritz)\n- Mario-Leander Reimer (@lreimer)\n\n## License\n\nThis software is provided under the Apache License, Version 2.0 license. See the `LICENSE` file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqaware%2Fxsd2java-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqaware%2Fxsd2java-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqaware%2Fxsd2java-gradle-plugin/lists"}