全部学科
Python全栈
python
NodeJS全栈
nodejs
📅 2026-05-23 10 分钟 ✍️ juanwangdev

许可证合规检查

检查依赖许可证合规性。

License Plugin

XML
<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>license-maven-plugin</artifactId>
  <version>1.20</version>
  <configuration>
    <includedLicenses>
      <includedLicense>Apache*</includedLicense>
      <includedLicense>MIT*</includedLicense>
    </includedLicenses>
    <excludedLicenses>
      <excludedLicense>GPL*</excludedLicense>
    </excludedLicenses>
  </configuration>
</plugin>

执行

Bash
mvn license:check

许可证分类

类型示例
宽松Apache、MIT
严格GPL、AGPL
商业商业许可

要点总结

  • license-maven-plugin 检查许可证
  • includedLicenses 允许的许可证
  • excludedLicenses 禁止的许可证
想在手机上练习这篇文章的配套题目?
使用微信卷王开发者小程序,打开首页顶部扫码功能识别二维码
← 上一篇 软件成分分析
下一篇 → 供应链安全防护
扫码体验小程序
加载中
想在手机上刷题学习?
使用微信卷王开发者小程序,打开首页顶部扫码功能识别二维码