{"id":15044138,"url":"https://github.com/gradle/common-custom-user-data-maven-extension","last_synced_at":"2025-04-06T13:11:32.923Z","repository":{"id":37936086,"uuid":"444308997","full_name":"gradle/common-custom-user-data-maven-extension","owner":"gradle","description":"Maven extension that enhances published build scans by adding a set of tags, links and custom values that have proven to be useful for many projects building with Develocity.","archived":false,"fork":false,"pushed_at":"2025-03-17T20:16:31.000Z","size":1015,"stargazers_count":10,"open_issues_count":1,"forks_count":16,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-03-30T12:07:59.058Z","etag":null,"topics":["java","maven"],"latest_commit_sha":null,"homepage":"https://gradle.com/develocity","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/gradle.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":"2022-01-04T06:22:42.000Z","updated_at":"2025-03-17T20:16:34.000Z","dependencies_parsed_at":"2023-12-04T05:21:50.625Z","dependency_job_id":"ad8bc99e-8880-46a2-81c0-aec8ee6aafd0","html_url":"https://github.com/gradle/common-custom-user-data-maven-extension","commit_stats":{"total_commits":764,"total_committers":30,"mean_commits":"25.466666666666665","dds":0.8036649214659686,"last_synced_commit":"1b089921d996af143cb04e95deba1ed0915b2438"},"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradle%2Fcommon-custom-user-data-maven-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradle%2Fcommon-custom-user-data-maven-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradle%2Fcommon-custom-user-data-maven-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gradle%2Fcommon-custom-user-data-maven-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gradle","download_url":"https://codeload.github.com/gradle/common-custom-user-data-maven-extension/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"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":["java","maven"],"created_at":"2024-09-24T20:50:07.942Z","updated_at":"2025-04-06T13:11:32.897Z","avatar_url":"https://github.com/gradle.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e _This repository is maintained by the Develocity Solutions team, as one of several publicly available repositories:_\n\u003e - _[Android Cache Fix Gradle Plugin][android-cache-fix-plugin]_\n\u003e - _[Common Custom User Data Gradle Plugin][ccud-gradle-plugin]_\n\u003e - _[Common Custom User Data Maven Extension][ccud-maven-extension] (this repository)_\n\u003e - _[Develocity Build Configuration Samples][develocity-build-config-samples]_\n\u003e - _[Develocity Build Validation Scripts][develocity-build-validation-scripts]_\n\u003e - _[Develocity Open Source Projects][develocity-oss-projects]_\n\u003e - _[Quarkus Build Caching Extension][quarkus-build-caching-extension]_\n\n# Common Custom User Data Maven Extension\n\n[![Verify Build](https://github.com/gradle/common-custom-user-data-maven-extension/actions/workflows/build-verification.yml/badge.svg?branch=main)](https://github.com/gradle/common-custom-user-data-maven-extension/actions/workflows/build-verification.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/com.gradle/common-custom-user-data-maven-extension)](https://search.maven.org/artifact/com.gradle/common-custom-user-data-maven-extension)\n[![Revved up by Develocity](https://img.shields.io/badge/Revved%20up%20by-Develocity-06A0CE?logo=Gradle\u0026labelColor=02303A)](https://ge.solutions-team.gradle.com/scans)\n\nThe Common Custom User Data Maven extension for Develocity enhances published build scans\nby adding a set of tags, links and custom values that have proven to be useful for many projects building with Develocity.\n\nYou can leverage this extension for your project in one of two ways:\n1. [Apply the published extension](#applying-the-published-extension) directly in your `.mvn/extensions.xml` and immediately benefit from enhanced build scans\n2. Copy this repository and [develop a customized version of the extension](#developing-a-customized-version-of-the-extension) to standardize Develocity usage across multiple projects\n\n## Applying the published extension\n\nThe Common Custom User Data Maven extension is available in [Maven Central](https://search.maven.org/artifact/com.gradle/common-custom-user-data-maven-extension). This extension\nrequires the [Develocity Maven extension](https://search.maven.org/artifact/com.gradle/develocity-maven-extension) to also be applied in your build in order to have\nan effect.\n\nIn order for the Common Custom User Data Maven extension to become active, you need to register it in the `.mvn/extensions.xml` file in your root project. The `extensions.xml` file\nis the same file where you have already declared the Develocity Maven extension.\n\nSee [here](.mvn/extensions.xml) for an example.\n\n### Version compatibility\n\nThis table details the version compatibility of the Common Custom User Data Maven extension with the Develocity Maven extension.\n\n| Common Custom User Data Maven extension versions | Develocity Maven extension versions        |\n| ------------------------------------------------ | ------------------------------------------ |\n| `1.8+`                                           | `1.11+`                                    |\n| `1.7` - `1.7.3`                                  | `1.10.1+`                                  |\n| `1.3` - `1.6`                                    | `1.6.5+`                                   |\n| `1.0` - `1.2`                                    | `1.0+`                                     |\n\nThe above chart captures the minimum compatible versions. For the best experience with the Develocity Maven extension 1.21 or higher, we recommend using the Common Custom User Data Maven extension 2.0 or higher.\n\n## Captured data\n\nThe additional tags, links and custom values captured by this extension include:\n- A tag representing the operating system\n- A tag representing how the build was invoked, be that from your IDE (IDEA, Eclipse) or from the command-line\n- A tag representing builds run on CI, together with a set of tags, links and custom values specific to the CI server running the build\n- For Git repositories, information on the commit id, branch name, status, and whether the checkout is dirty or not\n\nSee [CustomBuildScanEnhancements.java](./src/main/java/com/gradle/CustomBuildScanEnhancements.java) for details on what data is\ncaptured and under which conditions.\n\n## Capturing additional tags, links and values in your build scans\n\nYou can apply additional configuration beyond what is contributed by the Common Custom User Data Maven extension by default. The additional configuration happens in a specific\nGroovy script. This is a good intermediate step before creating your own extension.\n\nThe Common Custom User Data Maven extension checks for a `.mvn/develocity-custom-user-data.groovy` or `.mvn/gradle-enterprise-custom-user-data.groovy` Groovy script in your root project. If the file exists, it evaluates\nthe script with the following bindings:\n\n- `develocity/gradleEnterprise` (type: [DevelocityAdapter](https://github.com/gradle/develocity-agent-adapters/blob/main/develocity-maven-extension-adapters/src/compatibilityApi/java/com/gradle/develocity/agent/maven/adapters/DevelocityAdapter.java)): _configure Develocity_\n- `buildScan` (type: [BuildScanApiAdapter](https://github.com/gradle/develocity-agent-adapters/blob/main/develocity-maven-extension-adapters/src/compatibilityApi/java/com/gradle/develocity/agent/maven/adapters/BuildScanApiAdapter.java)): _configure build scan publishing and enhance build scans_\n- `buildCache` (type: [BuildCacheApiAdapter](https://github.com/gradle/develocity-agent-adapters/blob/main/develocity-maven-extension-adapters/src/compatibilityApi/java/com/gradle/develocity/agent/maven/adapters/BuildCacheApiAdapter.java)): _configure build cache_\n- `log` (type: [`Logger`](http://www.slf4j.org/apidocs/org/slf4j/Logger.html)): _write to the build log_\n- `project` (type: [`MavenProject`](https://maven.apache.org/ref/current/maven-core/apidocs/org/apache/maven/project/MavenProject.html)): _the top-level Maven project_\n- `session` (type: [`MavenSession`](https://maven.apache.org/ref/current/maven-core/apidocs/org/apache/maven/execution/MavenSession.html)): _the Maven session_\n\nSee [here](.mvn/develocity-custom-user-data.groovy) for an example.\n\n## Developing a customized version of the extension\n\nFor more flexibility, we recommend creating a copy of this repository so that you may develop a customized version of the extension and publish it internally for your projects to consume.\n\nThis approach has a number of benefits:\n- Tailor the build scan enhancements to exactly the set of tags, links and custom values you require\n- Standardize the configuration for connecting to Develocity and the remote build cache in your organization, removing the need for each project to specify this configuration\n\nIf your customized extension provides all required Develocity configuration, then a consumer project will get all the benefits of Develocity simply by applying the extension. The\nproject sources provide a good template to get started with your own extension.\n\nRefer to the [Javadoc](https://docs.gradle.com/enterprise/maven-extension/api/) for more details on the key types available for use.\n\n## Changelog\n\nRefer to the [release history](https://github.com/gradle/common-custom-user-data-maven-extension/releases) to see detailed changes on the versions.\n\n## Breaking API changes\n\nWhen updating to the Common Custom User Data Maven extension 2.0, please take care of the following.\n\n1. Rename the `.mvn/gradle-enterprise-custom-user-data.groovy` to `.mvn/develocity-custom-user-data.groovy`.\n2. Use `BuildScanApiAdapter` instead of `BuildScanApi`. See the example below:\n\n`gradle-enterprise-custom-user-data.groovy`\n```\nimport com.gradle.maven.extension.api.scan.BuildScanApi\n\nbuildScan.executeOnce('top-level-project') { BuildScanApi buildScanApi -\u003e }\n```\n`develocity-custom-user-data.groovy`\n```\nimport com.gradle.develocity.agent.maven.adapters.BuildScanApiAdapter\n\nbuildScan.executeOnce('top-level-project') { BuildScanApiAdapter buildScanApi -\u003e }\n```\n\n## Learn more\n\nVisit our website to learn more about [Develocity][develocity].\n\n## License\n\nThe Develocity Common Custom User Data Maven extension is open-source software released under the [Apache 2.0 License][apache-license].\n\n[android-cache-fix-plugin]: https://github.com/gradle/android-cache-fix-gradle-plugin\n[ccud-gradle-plugin]: https://github.com/gradle/common-custom-user-data-gradle-plugin\n[ccud-maven-extension]: https://github.com/gradle/common-custom-user-data-maven-extension\n[develocity-build-config-samples]: https://github.com/gradle/develocity-build-config-samples\n[develocity-build-validation-scripts]: https://github.com/gradle/develocity-build-validation-scripts\n[develocity-oss-projects]: https://github.com/gradle/develocity-oss-projects\n[quarkus-build-caching-extension]: https://github.com/gradle/quarkus-build-caching-extension\n[develocity]: https://gradle.com/develocity\n[apache-license]: https://www.apache.org/licenses/LICENSE-2.0.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgradle%2Fcommon-custom-user-data-maven-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgradle%2Fcommon-custom-user-data-maven-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgradle%2Fcommon-custom-user-data-maven-extension/lists"}