{"id":22707537,"url":"https://github.com/xvik/gradle-pom-plugin","last_synced_at":"2025-04-13T12:31:50.108Z","repository":{"id":2432954,"uuid":"46540535","full_name":"xvik/gradle-pom-plugin","owner":"xvik","description":"Gradle POM plugin","archived":false,"fork":false,"pushed_at":"2025-01-31T04:29:12.000Z","size":605,"stargazers_count":38,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T03:35:13.314Z","etag":null,"topics":["gradle","gradle-plugin","maven-publish","pom"],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xvik.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2015-11-20T05:01:06.000Z","updated_at":"2025-01-31T04:29:10.000Z","dependencies_parsed_at":"2023-11-18T06:25:16.118Z","dependency_job_id":"4051a5d0-25fb-42fd-942b-4fa554afdc01","html_url":"https://github.com/xvik/gradle-pom-plugin","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-pom-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-pom-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-pom-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xvik%2Fgradle-pom-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xvik","download_url":"https://codeload.github.com/xvik/gradle-pom-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248714515,"owners_count":21149911,"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","maven-publish","pom"],"created_at":"2024-12-10T10:13:21.086Z","updated_at":"2025-04-13T12:31:50.084Z","avatar_url":"https://github.com/xvik.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gradle POM plugin\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](http://www.opensource.org/licenses/MIT)\n[![CI](https://github.com/xvik/gradle-pom-plugin/actions/workflows/CI.yml/badge.svg)](https://github.com/xvik/gradle-pom-plugin/actions/workflows/CI.yml)\n[![Appveyor build status](https://ci.appveyor.com/api/projects/status/github/xvik/gradle-pom-plugin?svg=true)](https://ci.appveyor.com/project/xvik/gradle-pom-plugin)\n[![codecov](https://codecov.io/gh/xvik/gradle-pom-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/xvik/gradle-pom-plugin)\n\n### About\n\nPlugin simplifies [maven-publish](https://docs.gradle.org/current/userguide/publishing_maven.html) plugin\nusage and corrects generated pom.\n\nPlugin should make gradle more familiar for maven users (at least simpler to use).\nWith it, multi-module projects could be organized [the same way as maven projects](#multi-module-projects):\nall dependencies managed in the root project (and, optionally, published as bom). \n\nFeatures:\n\n* Fix [dependencies scopes](#dependencies) in the generated pom\n    - Fix [war](https://docs.gradle.org/current/userguide/war_plugin.html#sec:war_dependency_management) plugin's provided dependencies\n* Add `provided` and `optional` configuration (in maven meaning).    \n* Add global pom configuration shortcuts (applied to all publications):\n    - [maven.pom](#pom-configuration) type-safe pom configuration (same as in publication object)  \n    - [maven.pomXml](#pom-configuration) configuration closure (applied to all publications).\n    - [maven.withPomXml](#manual-pom-modification) configuration closure for manual xml modifications (same as maven-publish's withXml, but applied for all publications)\n* Moves declared BOMs on top in the generated dependencyManagement section (fixes java-platform behaviour)\n* Automatic pom enhancements [could be disabled](#pom-generation-options) to see the native gradle behaviour)\n* Optionally, could remove used BOMs, applying resolved versions instead (useful with gradle platforms to simplify resulted poms)\n* Simplifies [multi-module projects configuration](#multi-module-projects)\n* [Easy debug](#debug) (could show all applied modifications)\n* Compatible with:\n    - Gradle java, groovy and [java-library](https://docs.gradle.org/current/userguide/java_library_plugin.html) plugin\n    - Gradle [java-platform](https://docs.gradle.org/current/userguide/java_platform_plugin.html) plugin (BOM case)   \n    - Spring [dependency-management](#usage-with-spring-dependency-management-plugin) plugin\n\nIf you develop `java` or `groovy` library you may look at [java-lib plugin](https://github.com/xvik/gradle-java-lib-plugin)\nwhich already includes this plugin and configures maven publication for you \n(don't confuse with gradle's `java-library` plugin which only declares `api` and `implementation` configurations).\n\nIf your project is hosted on github you may look at [github-info plugin](https://github.com/xvik/gradle-github-info-plugin) \nwhich fills some pom sections for you automatically. \n\nAlso, you can use [java-library generator](https://github.com/xvik/generator-lib-java) to setup new project with\nall plugins configured.\n\n##### Summary\n\n* Configuration closure: `maven`  \n* Configurations: `provided`, `optional`\n* Enable plugins: [maven-publish](https://docs.gradle.org/current/userguide/publishing_maven.html)\n\n### Setup\n\n[![Maven Central](https://img.shields.io/maven-central/v/ru.vyarus/gradle-pom-plugin.svg)](https://maven-badges.herokuapp.com/maven-central/ru.vyarus/gradle-pom-plugin)\n[![Gradle Plugin Portal](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/ru/vyarus/pom/ru.vyarus.pom.gradle.plugin/maven-metadata.xml.svg?colorB=007ec6\u0026label=plugins%20portal)](https://plugins.gradle.org/plugin/ru.vyarus.pom)\n\n```groovy\nbuildscript {\n    repositories {\n        gradlePluginPortal()\n    }\n    dependencies {\n        classpath 'ru.vyarus:gradle-pom-plugin:3.0.0'\n    }\n}\napply plugin: 'ru.vyarus.pom'\n```\n\nOR\n\n```groovy\nplugins {\n    id 'ru.vyarus.pom' version '3.0.0'\n}\n```\n\n#### Compatibility\n\nPlugin compiled for java 8, compatible with java 17.\n\nGradle | Version\n--------|-------\n7.0     | 3.0.0\n5.0     | [2.2.2]((https://github.com/xvik/gradle-pom-plugin/tree/2.2.2)\n4.6     | [1.3.0](https://github.com/xvik/gradle-pom-plugin/tree/1.3.0)\nolder   | [1.2.0](https://github.com/xvik/gradle-pom-plugin/tree/1.2.0)\n\n#### Snapshots\n\n\u003cdetails\u003e\n      \u003csummary\u003eSnapshots may be used through JitPack\u003c/summary\u003e\n\n* Go to [JitPack project page](https://jitpack.io/#ru.vyarus/gradle-pom-plugin)\n* Select `Commits` section and click `Get it` on commit you want to use (you may need to wait while version builds if no one requested it before)\n    or use `master-SNAPSHOT` to use the most recent snapshot\n\n* Add to `settings.gradle` (top most!) (exact commit hash might be used as version):\n\n  ```groovy\n  pluginManagement {\n      resolutionStrategy {\n          eachPlugin {\n              if (requested.id.id == 'ru.vyarus.pom') {\n                  useModule('ru.vyarus:gradle-pom-plugin:master-SNAPSHOT')\n              }\n          }\n      }\n      repositories {                        \n          gradlePluginPortal()\n          maven { url 'https://jitpack.io' }                    \n      }\n  }    \n  ``` \n* Use plugin without declaring version: \n\n  ```groovy\n  plugins {\n      id 'ru.vyarus.pom'\n  }\n  ```  \n\n\u003c/details\u003e  \n\n### Usage\n\n**NOTE**: in version 3.0 old conventions were replaced by configuration extension - see [migration guide](#migration-from-2x-to-3) \n\nIf [java](https://docs.gradle.org/current/userguide/java_plugin.html),\n[groovy](https://docs.gradle.org/current/userguide/groovy_plugin.html), \n[java-library](https://docs.gradle.org/current/userguide/java_library_plugin.html) or\n[java-platform](https://docs.gradle.org/current/userguide/java_platform_plugin.html) plugins enabled,\n`maven-publish` would be registered automatically. For example:\n\n```groovy\nplugins {\n    id 'java' // or groovy or java-library\n    id 'ru.vyarus.pom'\n}\n```\n\n```groovy\nplugins {\n    id 'java-platform'\n    id 'ru.vyarus.pom'\n}\n```\n\nin both cases `maven-publish` plugin would be activated implicitly.\n\nConfiguration closures added when [maven-publish](https://docs.gradle.org/current/userguide/publishing_maven.html) plugin \nregistered (and so will be available even if you don't use java plugins above and only register maven-publish manually).\n\nFor example the following is also a valid usage:\n\n```groovy\nplugins {\n    id 'maven-publish'\n    id 'ru.vyarus.pom'\n}\n```\n \nPublication **must be [configured manually](https://docs.gradle.org/current/userguide/publishing_maven.html#sec:publishing_component_to_maven)**, for example:\n\n```groovy\npublishing {\n    publications {\n        mavenJava(MavenPublication) {\n            from components.java\n        }\n    }\n}\n``` \n\n(see [java-lib](https://github.com/xvik/gradle-java-lib-plugin) plugin for automatic publication registration)\n\nMaven scopes reference:\n\nMaven scope | Gradle configuration\n------------| ----------------\ncompile     | implementation, api\nruntime     | runtimeOnly\nprovided    | provided  (**not** compileOnly!)\noptional    | optional, [feature variants](#feature-variants)\n\nAlso, see [good article](https://reflectoring.io/maven-scopes-gradle-configurations/) describing maven/gradle scope analogies.\n\n`compileOnly` should be used only for compile-time only dependencies like nullability annotations.\n\n`api` configuration appear only when `java-library` plugin is enabled. Read [this article](https://reflectoring.io/gradle-pollution-free-dependencies/) \nto better understand api-implementation difference for gradle (or simply use `implementaion` by default). \n\n#### Dependencies\n\nPlugin fixes dependencies scopes in the generated pom:\n\n Configuration | Fixed scope | Native behaviour | Note    \n---------------|-----------|----|---\n api       | compile   | compile |  ony with [java-library](https://docs.gradle.org/current/userguide/java_library_plugin.html#sec:java_library_separation) plugin \n implementation | **compile** |  runtime |   \n compileOnly       |  -   | dependencies not added |   \n runtimeOnly        | runtime | runtime |\n providedCompile | **provided** | compile | only with [war](https://docs.gradle.org/current/userguide/war_plugin.html#sec:war_dependency_management) plugin\n providedRuntime | **provided** | compile | only with [war](https://docs.gradle.org/current/userguide/war_plugin.html#sec:war_dependency_management) plugin\n\nNote: in context of gradle `java-library` plugin, both `api` and `implementation` dependencies stored in pom as `compile` dependencies\nbecause there is only build time difference (it's a gradle optimization) between configurations and module still need `implementation` dependencies.\nFor the end user they both are usual transitive dependencies and must have compile scope. \n\nFor example:\n\n```groovy\nplugins {\n    id: 'java'\n    id 'ru.vyarus.pom'\n}\ndependencies {    \n    implementation 'com.foo:dep-compile:1.0'\n    runtimeOnly 'com.foo:dep-runtime:1.0'\n    provided 'com.foo:dep-provided:1.0'\n    optional 'com.foo:dep-optional:1.0' \n}\n```\n\nWill result in:\n\n```xml\n\u003cdependencies\u003e\n     \u003cdependency\u003e\n        \u003cgroupId\u003ecom.foo\u003c/groupId\u003e\n        \u003cartifactId\u003edep-compile\u003c/artifactId\u003e\n        \u003cversion\u003e1.0\u003c/version\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.foo\u003c/groupId\u003e\n        \u003cartifactId\u003edep-runtime\u003c/artifactId\u003e\n        \u003cversion\u003e1.0\u003c/version\u003e\n        \u003cscope\u003eruntime\u003c/scope\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.foo\u003c/groupId\u003e\n        \u003cartifactId\u003edep-provided\u003c/artifactId\u003e\n        \u003cversion\u003e1.0\u003c/version\u003e\n        \u003cscope\u003eprovided\u003c/scope\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.foo\u003c/groupId\u003e\n        \u003cartifactId\u003edep-optional\u003c/artifactId\u003e\n        \u003cversion\u003e1.0\u003c/version\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n        \u003coptinoal\u003etrue\u003c/optinoal\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nAnd\n\n```groovy\nplugins {\n    id: 'java-library'\n    id 'ru.vyarus.pom'\n}\ndependencies {    \n    implementation 'com.foo:dep-compile:1.0'\n    api 'com.foo:dep-api-compile:1.0'        \n}\n```\n\nWill produce:\n\n```xml\n\u003cdependencies\u003e\n     \u003cdependency\u003e\n        \u003cgroupId\u003ecom.foo\u003c/groupId\u003e\n        \u003cartifactId\u003edep-compile\u003c/artifactId\u003e\n        \u003cversion\u003e1.0\u003c/version\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.foo\u003c/groupId\u003e\n        \u003cartifactId\u003edep-api-compile\u003c/artifactId\u003e\n        \u003cversion\u003e1.0\u003c/version\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nNOTE: scope modifications could be disabled with `pomGeneration` section (see below)\n\n##### Provided dependencies\n\nProvided dependencies assumed to be present in target environment or already exists in \nprojects consuming library. Provided dependencies will not be loaded as transitive dependencies,\nthey will exist in pom just for consultation.\n\nAdditional `provided` configuration created for provided dependencies. Gradle `implementation` extends from it\nso for gradle `provided` dependencies would be the same as `implementation` and the difference \nwill only appear in the resulted pom.\n\n###### compileOnly\n\nGradle states that  `compileOnly` is the [official gradle analog](https://blog.gradle.org/introducing-compile-only-dependencies)\nfor maven `provided` scope. But it's not: first of all, gradle does not add such dependencies to pom at all.\nMore importantly, `compileOnly` dependencies are *not visible* in other scopes. So, for example,\nto use these dependencies in test, you'll have to add them *again* in test scope.\n\nThe only application for `compileOnly` scope is compile-time libraries, like nullability annotations.     \nThis *is not* a provided scope.\n\nPlugin does not do anything with `compileOnly`: these dependencies will not be present in the resulted pom.\n\n###### Make other scopes as provided\n\nIf you already have some other scope and want to identify its dependencies in pom as provided then:\n\n```groovy\nconfigurations.provided.extendsFrom configurations.apt\n\ndependencies {\n    implementation 'com.google.code.gson:gson:2.6.2'\n\n    apt 'org.immutables:gson:2.1.19'\n}\n```      \n\nSuppose `apt` configuration was added by some plugin. Now, apt dependencies will be marked provided in the resulted pom:\n\n```xml\n \u003cdependencies\u003e \n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.google.code.gson\u003c/groupId\u003e\n        \u003cartifactId\u003egson\u003c/artifactId\u003e\n        \u003cversion\u003e2.6.2\u003c/version\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.immutables\u003c/groupId\u003e\n        \u003cartifactId\u003egson\u003c/artifactId\u003e\n        \u003cversion\u003e2.1.19\u003c/version\u003e\n        \u003cscope\u003eprovided\u003c/scope\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n###### War plugin\n\nGradle [war](https://docs.gradle.org/current/userguide/war_plugin.html#sec:war_dependency_management) plugin declares it's own\nprovided configurations `providedCompile` and `providedRuntime` and these dependencies are not going into \nresulted war, but contained in the generated pom as `compile`. Plugin fixes such dependencies scope to `provided`\n(how it could be declared in pure maven).  \n\n##### Optional dependencies\n\nOptional dependencies supposed to be used for not required dependencies, for example, activating\nadditional features.\n\nAdditional `optional` configuration created for optional dependencies. Gradle `implementation` extends from it\nso for gradle `optional` dependencies would be the same as `implementation` and the difference \nwill only appear in the resulted pom.\n\n##### Feature variants\n\nGradle states that native replacement for optional dependencies is \n[gradle feature variants](https://docs.gradle.org/5.6.4/userguide/feature_variants.html#header). For example:\n\n```groovy\njava {\n    registerFeature('someFeature') {\n        usingSourceSet(sourceSets.main)\n    }     \n}\n\ndependencies {                                                       \n    someFeatureImplementation 'com.google.code.findbugs:annotations:3.0.0'                \n}\n```\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n      \u003cgroupId\u003ecom.google.code.findbugs\u003c/groupId\u003e\n      \u003cartifactId\u003eannotations\u003c/artifactId\u003e\n      \u003cversion\u003e3.0.0\u003c/version\u003e\n      \u003cscope\u003ecompile\u003c/scope\u003e\n      \u003coptional\u003etrue\u003c/optional\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nLooks good, but these dependencies *will not* work as you expect from optionals:\nthese dependencies will not be visible in other scopes. So if you need to test this behavior\nthen you'll have to add another dependency in test scope. \n\nProbably, there is a way to workaround this, but, still, simple things must be done simple, so\n`optional` configuration would just do what the majority of library developers need.\n\n#### Pom configuration\n\nBy default, `maven-publish` plugin fills pom only with dependencies and artifact id, group and version. \nOther information could be configured through `pom` object:\n\n```groovy\nmaven {\n    pom {\n        name = 'Project Name'\n        description = 'My awesome project'\n        licenses {\n            license {\n                name = \"The MIT License\"\n                url = \"http://www.opensource.org/licenses/MIT\"\n                distribution = 'repo'\n            }\n        }\n        scm {\n            url = 'https://github.com/me/my-repo.git'\n            connection = 'scm:git@github.com:me/my-repo.git'\n            developerConnection = 'scm:git@github.com:me/my-repo.git'\n        }\n        developers {\n            developer {\n                id = \"dev1\"\n                name = \"Dev1 Name\"\n                email = \"dev1@email.com\"\n            }\n        }\n    }\n}\n```\n\nNOTE: this is type-safe pom configuration (compatible with kotlin). **The same** object used as in direct \n[publication configuration](https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom),\nbut this one is applied to all publications.\nPay attention that `=` used for assignments.\n      \n\n##### Non-standard pom tags \n\nIn the option above, only pre-defined properties could be applied, but if you need \n(for whatever reason) to add some custom tags, then you can use groovy closure:\n\n```groovy\nmaven {\n    pomXml {\n        name 'Project Name'\n        description 'My awesome project'\n        licenses {\n            license {\n                name \"The MIT License\"\n                url \"http://www.opensource.org/licenses/MIT\"\n                distribution 'repo'\n            }\n        }\n        whateverTag 'something'\n        whateverSection {\n            whateverElse 12 \n        }\n    }\n}\n```\n\nClosure doesn't restrict structure: any tags may be used.\n\nNOTE: for `pomXml` groovy closure is used and so all properties configured with a method call:\nit would be a mistake to use `=` there.\n\nHere is a [complete example](https://github.com/xvik/gradle-pom-plugin/blob/master/src/test/groovy/ru/vyarus/gradle/plugin/pom/PomSectionsTest.groovy#L28)\nof all possible maven pom sections definition (you can use any tags if needed, not just these).\n\nINFO: `pomXml` option is a legacy plugin mechanism (developed in times when maven-publish plugin does not \nprovide anything except direct pom modification). Before pom plugin version 3.0 this was the main configuration \n(applied with `pom` convention)\n\n###### Duplicate xml sections detection\n\nGroovy closure (`pomXml`) could also be useful when you want to avoid duplicates.\n\nFor example, static model would always apply specified sections: \n\n```groovy\nmaven.pom {\n    developers {\n        developer {\n            id = 'test'\n            name = 'Test Test'\n        }\n    }\n}\n\nmaven.pom {\n    developers {\n        developer {\n            id = 'test'\n            name = 'Test Test'\n        }\n    }\n}\n```\n\nThis would produce duplicate in the resulted xml:\n\n\n```xml\n\u003cdevelopers\u003e\n    \u003cdeveloper\u003e\n        \u003cid\u003etest\u003c/id\u003e\n        \u003cname\u003eTest Test\u003c/name\u003e\n    \u003c/developer\u003e\n    \u003cdeveloper\u003e\n        \u003cid\u003etest\u003c/id\u003e\n        \u003cname\u003eTest Test\u003c/name\u003e\n    \u003c/developer\u003e\n\u003c/developers\u003e\n```\n\nWhereas groovy closure:\n\n```groovy\nmaven.pomXml {\n    developers {\n        developer {\n            id 'test'\n            name 'Test Test'\n        }\n    }\n}\n\nmaven.pomXml {\n    developers {\n        developer {\n            id 'test'\n            name 'Test Test'\n        }\n    }\n}\n```\n\nWould correctly detect duplication and the resulted xml would be:\n\n```xml\n\u003cdevelopers\u003e\n    \u003cdeveloper\u003e\n        \u003cid\u003etest\u003c/id\u003e\n        \u003cname\u003eTest Test\u003c/name\u003e\n    \u003c/developer\u003e\n\u003c/developers\u003e\n```\n\nIt is a very rare requirement to avoid duplications (appeared when pom is configured from multiple places),\nbut still could appear, and, in this case, groovy closue (`pomXml`) could be very useful.\n\n###### Clashed tag names\n\nAs `pomXml` closure is normal groovy closure, you may face situations when tag name clash with some method in your gradle project.\n\nBy default, there is only one such case:\n\n```groovy\nmaven.pomXml {\n    parent {\n        name 'name'\n        relativePath 'path'\n    }\n}\n```\n\n`relativePath` tag will not be present in resulted pom, because it clashes with gradle [Project.relativePath](https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:relativePath(java.lang.Object)) method\nand it will be called instead of \"just holding\" tag name.\n\nSpecial prefix '_' may be used in such cases:\n\n```groovy\nmaven.pomXml {\n    parent {\n        name 'name'\n        _relativePath 'path'\n    }\n}\n```\n\nThis prefix will solve clash with real method and will be dropped during xml generation. You can use this prefix with any tag.\n\nAnother (standard) solution for this problem is using [delegate](http://groovy-lang.org/closures.html#closure-owner) reference: `delegate.relativePath`.\nBut, for me, solution with prefix is simpler and easier to read.\n\n\n##### Defaults\n\nIf `name` and `description` not specified, they will be applied implicitly from `project.name` and `project.description`.\n\nIf pom already have some tags (e.g. set manually with withXml or by some plugin), plugin will *override values* and *properly merge* pom.\n*No duplicate tags will be created.*\n\n*Multiple `pom`, `pomXml` (and `withPomXml`) configurations may be defined* (useful for multi-module projects).\n\nIf [multiple publications](https://docs.gradle.org/current/userguide/publishing_maven.html#N17EB8) declared, \nthen pom configuration will affect *all of them*. If you need different data in poms then use pom closure only\nfor general info and [gradle native dsl](#gradle-pom-dsl) for different parts.\n\n##### Testing\n\nTo test resulted pom you can use [pom generation task](https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:generate-pom):\n\n```bash\n$ gradlew generatePomFileForMavenJavaPublication\n```\n\nNote that 'MavenJava' in task name is publication name and in your case task name could be different.\n\nPom will be generated by default in `build/publications/mavenJava/pom-default.xml`\n\n#### Manual pom modification\n\nIf, for any reason, you need to modify pom manually (like in [withXml closure](https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom))\nyou can use `withPomXml` configuration action:\n\n```groovy\nmaven {\n    pom {\n        scm {\n            url = 'https://github.com/me/my-repo.git'\n            connection = 'scm:git@github.com:me/my-repo.git'\n            developerConnection = 'scm:git@github.com:me/my-repo.git'\n        }\n    }\n\n    withPomXml {\n        asNode().appendNode('description', 'A demonstration of maven POM customization')\n    }\n}\n```\n\n`withPomXml` action is exactly the same as [withXml in publication](https://docs.gradle.org/current/dsl/org.gradle.api.publish.maven.MavenPom.html#org.gradle.api.publish.maven.MavenPom:withXml(org.gradle.api.Action))\n\nSee [Node api](http://docs.groovy-lang.org/latest/html/api/groovy/util/Node.html) and [groovy xml guide](http://groovy-lang.org/processing-xml.html#_manipulating_xml).\n\n*Multiple `withPomXml` actions could be used* (useful for multi-module projects).\n\n`withPomXml` called after `pom` and `withPom` actions merging into main pom, but before applying default name and description (because you may define them manually).\nSo xml Node passed into closure contains all modification applied by the plugin (except default name and description).\n\n**NOTE** pom plugin uses [withXml](https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom) to apply pom modifications. \nIf other plugins use withXml too and these plugins registered after pom plugin, then their xml modification will be executed after pom plugin and after `withPomXml` block.\nMost likely, this will not be an issue, but just keep it in mind when using manual xml modifications.\n\n#### Pom configurations order\n\nPom could be modified within publication (maven-publish plugin `pom` and `withXml`)\nand withing 3 blocks in pom plugin: `maven.pom`, `maven.withPom` and `maven.withPomXml`:\n\n```groovy\npublishing {\n    publications {\n        maven(MavenPublication) {\n            from components.java  \n\n            // (1)\n            pom {\n               ...\n            }\n\n            // (2)\n            pom.withXml {\n                ...\n            }\n        }\n    }\n}\n\nmaven {\n    // (3)\n    pom {\n        ...\n    }\n    // (4)\n    withPom {\n        ...\n    }\n    // (5)\n    withPomXml {\n        ...\n    }\n}\n```\n\nConfiguration order:\n\n1. Publication pom (static) (1)\n2. Plugin static pom (3)\n3. Publication withXml (2)\n4. Plugin withPom (4)\n5. Plugin withPomXml (5)\n\nThe reason for this is: (1) and (3) are static model changes (which are then generated into xml node),\nso they execute earlier.\n\n(4) and (5) are applied within publication `withXml` block and so couldn't be execured before `withXml` \ndeclared directly within publication (2).\n\n#### Pom generation options\n\nPlugin behaviour could be controlled with `maven` configuration's methods.\n\nFor example, to disable scopes correction:\n\n```groovy\nmaven {\n    disableScopesCorrection()\n}\n```\n\n(you may use it to see the default gradle behaviour) \n\nAll options:\n\n- `disableScopesCorrection()` - disable dependencies scopes correction (to see native gradle behaviour)\n- `disableBomsReorder()` - disable moving declared BOMs on top of dependencyManagement section (to see native gradle behaviour)  \n- `forceVersions()` - always put dependency version, even when platforms or BOM with spring plugin used\n  (use [recommended gradle way](https://docs.gradle.org/current/userguide/publishing_maven.html#publishing_maven:resolved_dependencies) to force version)\n- `removeDependencyManagement()` - removes `dependencyManagement` section from the generated pom\n    and implicitly activates `forceVersions()` (otherwise pom could become invalid).\n    Useful with gradle platforms (see examples below)\n\n(if you prefer property style declaration then you can use extension fields instead of methods (names differ from methods!):\nforcedVersions, removedDependencyManagement, disabledScopesCorrection (e.g. pomGeneration.forcedVersions = true))\n\n##### Improving BOMs usage\n\nIf you use BOMs for dependency management:\n\n```groovy\ndependencies {\n    // declare BOM\n    implementation platform('com.group:some-bom:1.0')\n    // dependency version managed by BOM\n    implementation 'com.other.group:some-dep'\n}\n```\n\n(could be spring plugin instead of platform, behaviour is the same)\n\nThe resulted pom would look like (native behavior):\n\n```xml\n\u003cdependencyManagement\u003e\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.group\u003c/groupId\u003e\n            \u003cartifactId\u003esome-bom\u003c/artifactId\u003e\n            \u003cversion\u003e1.0\u003c/version\u003e\n            \u003ctype\u003epom\u003c/type\u003e\n            \u003cscope\u003eimport\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\u003c/dependencyManagement\u003e\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.other.group\u003c/groupId\u003e\n        \u003cartifactId\u003esome-dep\u003c/artifactId\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nNote that dependency version is not set (assuming resolution through bom).\n\nIn order to force dependency versions use:\n\n```groovy\nmaven {\n    forceVersions()\n}\n```\n\nTo completely remove dependency management section from generated pom:\n\n```groovy\nmaven {\n    removeDependencyManagement()\n}\n```\n\nthe resulted pom would become:\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.other.group\u003c/groupId\u003e\n        \u003cartifactId\u003esome-dep\u003c/artifactId\u003e\n        \u003cversion\u003e1.0\u003c/version\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\nGradle platforms are very handy for dependency management in the root project (maven style),\nbut they should not \"leak\" into resulted poms. See the complete multi-module declaration example below.\n\n### Gradle pom dsl\n\nPlugin was initially created when pom declaration in `maven-publish` plugin was clumsy, but\nsince gradle 4.8 you can use [dsl like in pom plugin](https://docs.gradle.org/4.8/release-notes.html#customizing-the-generated-pom) in raw gradle:\n\n```groovy\npublishing {\n    publications {\n        maven(MavenPublication) {\n            from components.java\n            // native gradle syntax!\n            pom {\n                name = 'first'\n                scm {\n                  url = \"http://subversion.example.com/svn/project/trunk/\"\n                }\n            }\n        }\n    }\n}\n```\n\nSo why use pom plugin now?\n\nBecause maven publication configuration could be moved to external plugin\n(like [ru.vyarus.java-lib](https://github.com/xvik/gradle-java-lib-plugin) which\n configures maven-compatible publication artifacts) and, in this case, only pom should\n be customized:\n \n```groovy\nplugins {\n    id 'ru.vyarus.java-lib'\n}\n\nmaven.pom {\n    name = 'first'\n    scm {\n      url = \"http://subversion.example.com/svn/project/trunk/\"\n    }\n}\n```  \n\nAlso, pom plugin applies pom declaration to all registered maven publications which\nis useful, for example, for gradle plugin where publication is prepared by closed source plugin.\n\nIf pom plugin used together with gradle dsl then pom plugin will merge its configuration into dsl:\n\n```groovy\nplugins {\n    id 'ru.vyarus.pom'\n}\n\npublishing {\n    publications {\n        maven(MavenPublication) {\n            from components.java\n            // native gradle syntax!\n            pom {\n                name = 'first'\n                description = 'desc'\n                scm {\n                  connection = \"scm:svn:http://subversion.example.com/svn/project/trunk/\"\n                  url = \"http://subversion.example.com/svn/project/trunk/\"\n                }\n            }\n        }\n    }\n}\n\nmaven.pom {\n    name = 'custom name'\n    scm {\n      url = \"http://custom.url/\"\n    }\n}\n```\n\nAnd the resulted pom will contain:\n\n```xml\n\u003cpom\u003e\n    \u003cname\u003ecustom name\u003c/name\u003e\n    \u003cdescription\u003edesc\u003c/description\u003e\n    \u003cscm\u003e\n        \u003cconnection\u003escm:svn:http://subversion.example.com/svn/project/trunk/\u003c/connection\u003e\n        \u003curl\u003ehttp://custom.url/\u003c/url\u003e            \n    \u003c/scm\u003e\n\u003c/pom\u003e\n``` \n\n(and, of course, fixed dependencies)\n\n### Multi-module projects\n\n#### BOM options \n\nIn order to unify dependencies management in multi-module project you'll have to use\nsomething like BOM (all versions in one place, modules just declare what they use).\n\nThere are two ways to declare BOMs with gradle:\n\n- spring's [dependency-management](https://github.com/spring-gradle-plugins/dependency-management-plugin) plugin\n- gradle's [java-platform](https://docs.gradle.org/current/userguide/java_platform_plugin.html) plugin\n\nFrom my experience gradle platforms works much better. There is a major drawback: gradle platform\nwill not allow you to declare dependency exclusions. It is a surprise for maven users, but you'll have to \nchange your mind and apply required exclusions only in target module (where you apply dependency).\n\nYou can read more about gradle native BOMs support in [this article](https://www.nexocode.com/blog/posts/spring-dependencies-in-gradle/) (for an overview)\n\nThere are also some differences in boms import behaviour: spring plugin will behave exactly \nas maven. You can read more: [why spring plugin is still useful](https://github.com/spring-gradle-plugins/dependency-management-plugin/issues/211#issuecomment-387362326).\n\nMajor drawback for spring plugin is: it applies bom to all configurations (yes, it's possible to apply\nonly to some, but also cause other problems). For example, I often see spotbugs plugin affected,\nbecause it uses custom configuration which could be ruined by the bom imported into project \n(and so I have to manually force all required versions there).\n\nFor simple cases always prefer gradle native support. For complex cases, try to use platform too and\ngo to spring plugin only if you can't avoid it. Don't get me wrong, spring plugin is very good, \nbut you'll have much fewer problems with platforms.\n\n#### Example BOM publication\n\nHere is an example of multi-module project where:\n\n- All dependencies declared in the root project with java-platform (maven way!)\n- Root project published as BOM (not canonical BOM: contains all dependencies and all project modules; \n  this way allows including other boms and optional dependencies - simpler to use)\n- All subprojects are java projects. All depend on platform, declared in root, but platform\n   is removed from generated pom (to avoid bom delcare module, which again use bom for dependencies resolution)\n\n```groovy\nplugins {\n    id 'java-platform'\n    id 'ru.vyarus.pom'\n}\n\njavaPlatform {\n    allowDependencies()\n}\n\n// root project is a BOM, published as 'module-bom' artifact\n// Here must be all dependency versions, used by all modules\ndependencies {\n    // import other BOMs\n    api platform('ru.vyarus.guicey:guicey-bom:5.2.0-1')\n    // dependencies\n    constraints {\n        api 'org.webjars:webjars-locator:0.40'\n    }\n\n    // add subprojects to BOM\n    project.subprojects.each {\n        api it\n    }\n}\n\n// without it root project's name and description would be used\nmaven.pom {\n    name = 'test-bom'\n    description = 'Test project BOM'\n}\n\npublishing {\n    publications {\n        bom(MavenPublication) {\n            // artifact name required for published artifact instead of root project name\n            artifactId = 'test-bom'\n            from components.javaPlatform\n        }\n    }\n}\n\n// maven pom related configuration applied to all projects (including root)\nallprojects {\n    \n    repositories { mavenCentral(); mavenLocal() }\n\n    group = 'com.sample'\n    \n    // general pom info, required for all poms (including BOM)\n\n    // such delay is required because java-lib (and java) plugin would be applied only\n    // in the subprojects section and so this would configure root project configuration\n    // without delay\n    plugins.withId('java') {\n        maven.pom {\n            developers {\n                developer {\n                    id = 'johnd'\n                    name = 'John Doe'\n                    email = 'johnd@somemail.com'\n                }\n            }\n        }\n    }\n\n    // disable gradle metadata publishing (because it confuse and cause problems)\n    tasks.withType(GenerateModuleMetadata).configureEach {\n        enabled = false\n    }\n}\n\n// all sub-modules are java normal modules, using root project as bom\nsubprojects {\n    apply plugin: 'java'\n    apply plugin: 'ru.vyarus.pom'\n    \n    sourceCompatibility = 1.8\n\n    // common dependencies for all modules\n    dependencies {\n        // use versions declared in the root module\n        implementation platform(project(':'))\n\n        compileOnly 'com.github.spotbugs:spotbugs-annotations:4.2.3'\n        implementation 'org.slf4j:slf4j-api'\n    }\n\n    // use only direct dependencies in the generated pom, removing BOM\n    maven {\n        removeDependencyManagement()\n    }\n \n    publishing {\n        publications {\n            mavenJava(MavenPublication) {\n                from components.java\n            }\n        }\n    }\n}\n```\n\nSuppose there are one module (settings.gradle):\n\n```groovy\ninclude 'test'\n```\n\nIn that module we ony declare required dependencies:\n\n```groovy\ndependencies {\n    implementation 'org.webjars:webjars-locator'\n}\n```\n\nNow if we generate poms (`generatePomFileForBomPublication` and `generatePomFileForMavenPublication`) the root project's bom would be (`com.sample:test-bom` artifact):\n\n```xml\n\u003cdependencyManagement\u003e\n    \u003cdependencies\u003e\n        \u003c!-- constraints --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.webjars\u003c/groupId\u003e\n            \u003cartifactId\u003ewebjars-locator\u003c/artifactId\u003e\n            \u003cversion\u003e0.40\u003c/version\u003e\n        \u003c/dependency\u003e\n        \u003c!-- imported BOM --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eru.vyarus.guicey\u003c/groupId\u003e\n            \u003cartifactId\u003eguicey-bom\u003c/artifactId\u003e\n            \u003cversion\u003e5.2.0-1\u003c/version\u003e\n            \u003ctype\u003epom\u003c/type\u003e\n            \u003cscope\u003eimport\u003c/scope\u003e\n        \u003c/dependency\u003e\n        \u003c!-- module --\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ecom.sample\u003c/groupId\u003e\n            \u003cartifactId\u003etest\u003c/artifactId\u003e\n            \u003cversion\u003e1.0\u003c/version\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\u003c/dependencyManagement\u003e\n```\n\nAnd pom for modules (`com.sample:test` artifact):\n\n```xml\n\u003cdependencies\u003e\n    \u003c!-- compileOnly dependency does not appear here --\u003e\n    \u003c!-- dependency declared for all modules --\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.slf4j\u003c/groupId\u003e\n        \u003cartifactId\u003eslf4j-api\u003c/artifactId\u003e\n        \u003cversion\u003e1.7.30\u003c/version\u003e\n        \u003cscope\u003ecompile\u003c/scope\u003e\n    \u003c/dependency\u003e\n    \u003c!-- dependency declared in module --\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eorg.webjars\u003c/groupId\u003e\n        \u003cartifactId\u003ewebjars-locator\u003c/artifactId\u003e\n        \u003cversion\u003e0.40\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n(alternatively, `publishToMavenLocal` could be used to look generated artifacts in local maven repo)\n\nThe complete multi-module project example could be generated with [java-library generator](https://github.com/xvik/generator-lib-java).\n\n### Debug\n\nPlugin could print all xml changes to simplify debugging. \n\nTo enable debug:\n\n```groovy\nmaven {\n    debug()\n}\n```\n\nFor example, enabling debug for a build like this:\n\n```groovy\nplugins {\n    id 'java'\n    id 'ru.vyarus.pom'\n}\n\ngroup 'ru.vyarus'\nversion 1.0\ndescription 'sample description'\n\ndependencies {                                         \n    // compile\n    implementation 'org.javassist:javassist:3.16.1-GA'         \n    provided 'com.google.code.findbugs:annotations:3.0.0'\n    // runtime\n    runtimeOnly 'ru.vyarus:guice-ext-annotations:1.1.1'  \n    optional 'ru.vyarus:generics-resolver:2.0.0'\n    // disappear    \n    compileOnly 'junit:junit:4.12'\n}\n\npublishing {\n    publications {\n        maven(MavenPublication) {\n            from components.java\n        }\n    }\n}    \n\nmaven {\n    debug()\n\n    pom {\n        developers {\n            developer {\n                id = \"dev\"\n                name = \"Dev Dev\"\n                email = \"dev@gmail.com\"\n            }\n        }\n    }\n\n    withPom {\n        scm {\n            url 'http://sdsds.dd'\n        }\n    }\n\n\n    withPomXml {\n        asNode().appendNode('inceptionYear', 2020)\n    }\n}\n```\n\nWould print:\n\n```\n\u003e Configure project :\nPOM\u003e Apply 1 pom model customizations for maven publication\n\nPOM\u003e --------------------------------- Applied XML model changes for maven publication\n\t  10 |   \u003cartifactId\u003espock_Check_pom_modificat_0_testProjectDir16654992632092536392\u003c/artifactId\u003e\n\t  11 |   \u003cversion\u003e1.0\u003c/version\u003e\n\t  12 | +  \u003cdevelopers\u003e+\n\t  13 | +    \u003cdeveloper\u003e+\n\t  14 | +      \u003cid\u003edev\u003c/id\u003e+\n\t  15 | +      \u003cname\u003eDev Dev\u003c/name\u003e+\n\t  16 | +      \u003cemail\u003edev@gmail.com\u003c/email\u003e+\n\t  17 | +    \u003c/developer\u003e+\n\t  18 | +  \u003c/developers\u003e+\n     --------------------------------\n\n\u003e Task :generatePomFileForMavenPublication\nPOM\u003e Correct compile dependencies for maven publication\n\t - org.javassist:javassist:3.16.1-GA (original scope: runtime)\n\t - com.google.code.findbugs:annotations:3.0.0 (original scope: runtime)\n\t - ru.vyarus:generics-resolver:2.0.0 (original scope: runtime)\n\nPOM\u003e Correct optional dependencies for maven publication\n\t - ru.vyarus:generics-resolver:2.0.0 (original scope: compile)\n\nPOM\u003e Correct provided dependencies for maven publication\n\t - com.google.code.findbugs:annotations:3.0.0 (original scope: compile)\n\nPOM\u003e Apply 1 withXml closures for maven publication\nPOM\u003e Apply 1 withPomXml customizations for maven publication\nPOM\u003e Apply default name for maven publication\nPOM\u003e Apply default description for maven publication\n\nPOM\u003e --------------------------------- Applied direct XML changes for maven publication\n\t  16 |       \u003cartifactId\u003ejavassist\u003c/artifactId\u003e\n\t  17 |       \u003cversion\u003e3.16.1-GA\u003c/version\u003e\n\t  18 |       -\u003cscope\u003eruntime\u003c-+\u003cscope\u003ecompile\u003c+/scope\u003e\n\t\n\t  22 |       \u003cartifactId\u003eannotations\u003c/artifactId\u003e\n\t  23 |       \u003cversion\u003e3.0.0\u003c/version\u003e\n\t  24 |       -\u003cscope\u003eruntime\u003c-+\u003cscope\u003eprovided\u003c+/scope\u003e\n\t\n\t  28 |       \u003cartifactId\u003egenerics-resolver\u003c/artifactId\u003e\n\t  29 |       \u003cversion\u003e2.0.0\u003c/version\u003e\n\t  30 |       -\u003cscope\u003eruntime\u003c-+\u003cscope\u003ecompile\u003c+/scope\u003e\n\t  31 | +      \u003coptional\u003etrue\u003c/optional\u003e+\n\t\n\t  38 |     \u003c/dependency\u003e\n\t  39 |   \u003c/dependencies\u003e\n\t  40 | +  \u003cscm\u003e+\n\t  41 | +    \u003curl\u003ehttp://sdsds.dd\u003c/url\u003e+\n\t  42 | +  \u003c/scm\u003e+\n\t  43 | +  \u003cinceptionYear\u003e2020\u003c/inceptionYear\u003e+\n\t  44 | +  \u003cname\u003espock_Check_pom_modificat_0_testProjectDir16654992632092536392\u003c/name\u003e+\n\t  45 | +  \u003cdescription\u003esample description\u003c/description\u003e+\n     --------------------------------\n```\n\nNOTE: changes for `pom` block (first xml diff) would be shown only starting from gradle 8.4\n\nXml changes declared directly in publication are not tracked (couldn't be)!\n\n### Migration from 2.x to 3\n\nThe plugin was initially created when maven-publish provides just `withXml` method for manual\nxml manipulation and so plugin used pure closure (like legacy maven plugin did). \n\nNowadays, maven-publish provides [type-safe pom declaration](https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom)\nand pom plugin is now using it directly (so it's finally usable for kotlin too).\n\nBEFORE (2.x):\n\n```groovy\npom {\n    developers {\n        developer {\n            id \"dev\"\n            name \"Dev Dev\"\n            email \"dev@gmail.com\"\n        }\n    } \n}\n\nwithPomXml {\n    appendNode('description', 'A demonstration of maven POM customization') \n}\n\npomGeneration {\n    forceVersions() \n}\n```\n\nNOW (3):\n\n```groovy\n// pomGeneration renamed to maven  \nmaven {\n    forceVersions()\n\n    // pom moved to maven and renamed to withPom\n    withPom {\n        developers {\n            developer {\n                id \"dev\"\n                name \"Dev Dev\"\n                email \"dev@gmail.com\"\n            }\n        }\n    }\n\n    // withPomXml moved inside maven and it is an Action\u003cXMLProvider\u003e now!\n    withPomXml {\n        asNode().appendNode('description', 'A demonstration of maven POM customization')\n    }\n}\n```\n\nThe example above is exactly equivalent. But it is recommended to move into static pom declaration\n(same as in maven-publish plugin), so config above becomes: \n\n```groovy \nmaven {\n    forceVersions()\n\n    // withPom was a groovy Closure and pom is an Action for static pom configuration\n    pom {\n        developers {\n            developer {\n                id = \"dev\"\n                name = \"Dev Dev\"\n                email = \"dev@gmail.com\"\n            }\n        }\n    }\n    \n    withPomXml {\n        asNode().appendNode('description', 'A demonstration of maven POM customization')\n    }\n}\n```\n\nNOTE that in pom section all assignments MUST use '='. For more examples [see gradle doc](https://docs.gradle.org/current/userguide/publishing_maven.html#sec:modifying_the_generated_pom).\n\n### Might also like\n\n* [quality-plugin](https://github.com/xvik/gradle-quality-plugin) - java and groovy source quality checks\n* [animalsniffer-plugin](https://github.com/xvik/gradle-animalsniffer-plugin) - java compatibility checks\n* [mkdocs-plugin](https://github.com/xvik/gradle-mkdocs-plugin) - project documentation generator\n\n---\n[![gradle plugin generator](http://img.shields.io/badge/Powered%20by-%20Gradle%20plugin%20generator-green.svg?style=flat-square)](https://github.com/xvik/generator-gradle-plugin)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxvik%2Fgradle-pom-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxvik%2Fgradle-pom-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxvik%2Fgradle-pom-plugin/lists"}