Don’t worry, you are not the only one who is embarrassed. This problem is not limited to Java. Maven at least provides a mechanism for breaking down a project into individual modules, each with a metadata (POM) file describing the license of the modules.
The problem is that the software user who wants to be compatible with the license can be sure that all the files (in the software package) belong to the same software license. There are slight differences and consequences of using some open source licenses.
HP has launched its license scanning system.
http://www.fossology.org/
This allows the organization to scan the source code of third-party libraries and discover the license. This analysis follows standard methods that have arisen over time (README License, Comment Title in the License, etc. Etc.). For organizations that prefer to outsource this work, there are commercial companies that support open source databases:
There is light at the end of the tunnel. The linux foundation has begun work to solve this problem:
http://spdx.org/
This is a great idea. Create a single standard that allows software developers to explicitly specify the license of each file. One real success of the group is the collection of a common list of license names. The only drawback, as I see it, is the lack of developer support and tool support.
In conclusion, I would recommend storing all files in the maven module of the same license. Assuming your module is open source, enter this license in the comment heading and publish this license to Maven POM. If your code is closed source, it seems to me that including a license in the META-INF directory helps, but does not completely eliminate compliance issues.
Mark o'connor
source share