This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-remote-resources-plugin.git
commit b035836ac1f1f77ae013ad1802de196b9dbd9bc0 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Wed Oct 28 10:10:04 2026 +0000 Document licenseMappings on the usage page --- src/site/markdown/usage.md.vm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/site/markdown/usage.md.vm b/src/site/markdown/usage.md.vm index a357b21..ded24d3 100644 --- a/src/site/markdown/usage.md.vm +++ b/src/site/markdown/usage.md.vm @@ -113,6 +113,22 @@ $dependency.groupId:$dependency.artifactId #if( $id )$id#else$license.name#end #end]]# ``` +To resolve a declared license that the built-in table does not know, add a `licenseMappings` entry. A mapping applies when each of its `name` and `url` that is set matches the declared license, so a generic name such as "BSD" can be tied to one URL. The `spdxId` is an SPDX ID or expression; a `LicenseRef-` ID names a license that has no SPDX ID: + +```xml +<configuration> + <licenseMappings> + <licenseMapping> + <spdxId>BSD-3-Clause</spdxId> + <name>BSD</name> + <url>https://example.org/widget/LICENSE</url> + </licenseMapping> + </licenseMappings> +</configuration> +``` + +A mapping matches a spelling wherever it appears, like `licenseMerges` in the [License Maven Plugin](https://www.mojohaus.org/license-maven-plugin/). To correct the license of one artifact, use a [supplemental model](./supplemental-models.html) instead, which plays the role of that plugin's `licenses.xml`. + A dependency that declares several licenses may be used under any one of them. `${esc.d}spdx.expression(${esc.d}dependency)` returns one SPDX license expression for the whole dependency, joining the IDs with `OR`, for example `CDDL-1.1 OR (GPL-2.0-only WITH Classpath-exception-2.0)`. It returns null when the dependency declares no license or when one of its licenses matches nothing, because a partial expression would leave out a choice. Running Once in a Multi-Module Build
