在我们公司,有许多JEE后端应用程序部署到jfrog artifactory。这些项目中的每一个都包含对其他maven存储库源的一些依赖性,而这些源又有许多其他依赖性。所以当我使用其中一个依赖项时,比如
<project>
...
<dependencies>
<dependency>
<groupId>sample.ProjectA</groupId>
<artifactId>Project-A</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Sample.ProjectA.Project-A可能有一些商业依赖关系。
我看到maven使用licenses字段来放置许可证信息
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
我还找到了一种通过reports info插件获得maven许可证的方法
maven-project-info-reports-plugin
现在最好告诉maven警告是否有商业许可证。有可能这样做吗?