Skip to content

Releases

2.9.0

Choose a tag to compare

@github-actions github-actions released this 09 Nov 22:26
2.9.0

License Maven Plugin 2.9.0 caches downloaded license texts between builds, adds name-based URL overrides and stricter download checks, and fixes a long list of reported bugs in headers, the third-party report and dependency resolution. The requirements are unchanged: Maven 3.9.0 or later, Java 8.

⚠️ Changes to check when upgrading

  • -Dlicense.licenceFile is now -Dlicense.licenseFile for update-project-license and check-project-license. The misspelled property still works for now, with a deprecation warning (#797, #479 by @zdenek-jonas).
  • verbose is deprecated. Its messages are logged at debug level, so use -X instead (#810, #340 by @digulla).

✨ Highlights

  • License texts are cached between builds in ${settings.localRepository}/.cache/mojohaus-license-maven-plugin and reused for 30 days, then revalidated with ETag/Last-Modified. CI builds that restore the local repository stop downloading the same license pages on every run (#780).
  • licenseNameUrlOverrides downloads a license text from a URL you choose, matched by a regular expression on the license name, so variants of one license share a clean text (#718 by @MrBanana05).
  • Stricter downloads. failOnForbidden fails the build when a dependency has a license listed in forbiddenLicenses (#792, #323 by @ppalaga), and failOnMissingLicenseFile fails it when a license text could not be downloaded (#791). HTML pages are no longer accepted as license texts (#790).
  • Dependency POMs are read from the repositories of the POMs that lead to them, so licenses of dependencies hosted outside the project's repositories are no longer "Unknown" (#807, #752 by @lrozenblyum).
  • The third-party report links each license to its URL (#799, #212 by @digulla).
  • Proxy: every download of the plugin now uses the active Maven proxy (#804, #434 by @lexx9999).
  • File headers: the FreeMarker directive stays first when a header is added (#806, #412 by @smokemaker). Blank lines of the license are kept when an existing header is read (#808, #347 by @heapifyman). The package statement is no longer matched inside comments (#803, #562 by @onacit). Files fall back to LF when no file sets the end of line (#800, #511 by @jacek-lewandowski).
  • Other fixes: relative file: URLs of license texts resolve against the base directory (#809, #428 and #431 by @duracotton). The third-party file is added to the resources whatever its name (#796, #124 by @bnese), and the template can read the project (#801, #365 by @ST-DDT). A missing classpath license repository fails with a clear error (#802, #384 by @HenningL), and unknown missing-file entries are logged at debug level when the file is remote (#798, #201 by @TorstenKruse). The artifact cache no longer leaks between helper instances (#793, #375 by @cwholmes), and the dead EUPL 1.1 header URL is replaced (#795, #443 by @dodinh).
  • overrideFile is no longer deprecated. It is the choice for a file inside the project, and overrideUrl stays for remote and classpath: locations (#794, #416 by @bogdanb).
  • Documentation moved to Markdown (#783), and says that includes and excludes are relative to the roots (#805).

🚀 New features and improvements

🐛 Bug Fixes

📝 Documentation updates

👻 Maintenance

  • Remove license headers from invoker.properties fixtures (#788) @slachiewicz
  • Declare the plugin version inline in fixtures that need no pluginManagement (#789) @slachiewicz
  • Assert what the licence whitelist and blacklist ITs claim (#787) @slachiewicz
  • Move the download error report out of AbstractDownloadLicensesMojo.execute() (#785) @slachiewicz

🔧 Build

Thanks to @MrBanana05, @slachiewicz and Bjarne Cornelius.

Full changelog

2.8.0

Choose a tag to compare

@github-actions github-actions released this 06 Nov 10:34
2.8.0

License Maven Plugin 2.8.0 improves the speed, reliability, and configurability of license downloads and third-party license reports. It requires Maven 3.9.0 or later and Java 8 or later.

✨ Highlights

  • Bundled well-known license texts (download-licenses, test-download-licenses): Common plain-text license URLs — including Apache 2.0, EPL 2.0, and the GNU GPL (1.0, 2.0, 3.0), LGPL (2.0, 2.1, 3.0), AGPL (3.0), and FDL (1.1, 1.2, 1.3) families — are now written directly from texts bundled with the plugin instead of being downloaded over the network on every build (#781).
  • License classification in third-party-report: You can now classify third-party licenses using <forbiddenLicenses>, <problematicLicenses>, and <okLicenses> so the generated report highlights compliance status (Forbidden, Warning, OK, Unknown) as plain text without relying on external skin images (#731, #777).
  • Configurable license summary ordering: Added the <orderBy> parameter to download-licenses (name by default, gav, or license) to control the ordering of entries in licenses.xml (#730).
  • Authenticated license downloads: download-licenses can now authenticate against protected license hosts using credentials configured in Maven's settings.xml via <loginServerId> (#717).
  • More resilient license downloads and filtering:
    • Restored support for Windows file: URLs (such as file:/C:/... and file://C:/...) in license URLs (#778).
    • When a license host returns HTTP 429 Too Many Requests or 503 Service Unavailable, the plugin stops querying that host for the rest of the execution instead of repeatedly failing or timing out (#771).
    • Requests now include a plugin-specific User-Agent header so servers that block default Java HTTP clients accept requests (#728).
    • License names in <includedLicenses>, <excludedLicenses>, and pipe-separated license lists now have surrounding whitespace trimmed consistently (#734, #737).
    • Fixed a NullPointerException when excluding transitive dependencies with a null dependency trail (#739) and a ConcurrentModificationException when multiple dependencies declare multiple licenses (#706).

🚨 Removed

🚀 New features and improvements

🐛 Bug Fixes

📝 Documentation updates

👻 Maintenance

🔧 Build

📦 Dependency updates

17 changes

Thanks to @AzazelSensei, @Master-Code-Programmer, @MrBanana05, @slachiewicz, @slawekjaranowski, @wuwu2000, Bjarne Cornelius and Jan Diederich.

Full changelog

2.7.1

Choose a tag to compare

@github-actions github-actions released this 05 Jan 00:16
2.7.1
0b4fe61

💥 Breaking changes

  • Bump LibreOffice library odfdom-java to 0.12.0, require JDK 11+ for generating Calc file ODS (#684) @slawekjaranowski

🚀 New features and improvements

  • Bump LibreOffice library odfdom-java to 0.12.0, require JDK 11+ for generating Calc file ODS (#684) @slawekjaranowski
  • Fix for issues/533 (dual licensed dependency with one license on whitelist and the other on blacklist) (#670) @wuwu2000
  • Make Mojos thread-safe and improve concurrent cache handling (#674) @shaikhu

👻 Maintenance

📦 Dependency updates

2.7.0

Choose a tag to compare

@github-actions github-actions released this 22 Sep 05:39
2.7.0
bd27736

🚀 New features and improvements

🐛 Bug Fixes

🔧 Build

📦 Dependency updates

2.6.0

Choose a tag to compare

@github-actions github-actions released this 21 Jun 09:43
2.6.0
d1a98ef

🚀 New features and improvements

  • Implement Optional Parameters to include and exclude submodules (#620) @MrBanana05

📝 Documentation updates

👻 Maintenance

📦 Dependency updates

2.5.0

Choose a tag to compare

@github-actions github-actions released this 29 Nov 07:16
2.5.0
b9d9ed1

❗ NOTICE

Due to Doxia 2.x stack maven-site-plugin 3.20+ is required.
https://cwiki.apache.org/confluence/display/MAVEN/Towards+Doxia+2.0.0+Stack

🚀 New features and improvements

  • Update Doxia to 2.x stack (#603) @slawekjaranowski
  • Added an option to control if output directory is added as resource directory (#580) @AB-xdev
  • Enhance exception handling for license execution when the URL tag of the license is empty. (#588) @djjeon
  • Parallel processing of files (#568) @mkarg

🐛 Bug Fixes

📦 Dependency updates

👻 Maintenance

🔧 Build

2.4.0

Choose a tag to compare

@github-actions github-actions released this 23 Jan 22:55
2.4.0
d45692d

🚀 New features and improvements

🐛 Bug Fixes

📦 Dependency updates

👻 Maintenance

🔧 Build

2.3.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 21:48
2.3.0
ded0f0a

🚀 New features and improvements

🐛 Bug Fixes

📦 Dependency updates

👻 Maintenance

2.2.0

Choose a tag to compare

@github-actions github-actions released this 03 Jul 12:59
2.2.0
fc832dc

🚀 New features and improvements

🐛 Bug Fixes

  • Fix #358, #352 NPE on site generation caused by null returned by deprecated MavenProject.getDependencyArtifacts() (#373) @tomred-net
  • Fix #413 Use 'GAV' for result keys in LicensedArtifactResolver (#414) @attilapuskas
  • Fix #498 add-third-party should not override third-party file with the same content (#500) @slawekjaranowski
  • Fix #351 License override does not work for third-party dependencies with multiple licenses (#374) @lama0206
  • Fixed '[WARNING] There were 0 download errors - check the warnings above to not log warning unless download errors > 0 (#402) @blekinge

📦 Dependency updates

👻 Maintenance

2.1.0

Choose a tag to compare

@github-actions github-actions released this 06 Jun 23:13
2.1.0
a98d450

🚀 New features and improvements

🐛 Bug Fixes

📦 Dependency updates

👻 Maintenance

🔧 Build