I created a fork of the mojohaus maven license plugin. Discussed here:
https://github.com/mojohaus/license-maven-plugin/issues/357.
Not intensively tested, most likely has some small bugs left, but for my purposes it's working. But be warned!
Pro argument: This solution is super fast compared to ScanCode, which scans bruteforce even binary files and also needs all archives to be extracted before scanning.
The plugin writes all it can fetch into the target\generated-resources\licenses.xml
, including the licenses and notices text files.
Just clone it from https://github.com/JD-CSTx/license-maven-plugin.
To build and install it quickly just for testing use mvn install -DskipITs=true -DskipTests=true
.
The goal is license:aggregate-download-licenses
, version 2.1.0-SNAPSHOT
and option is extendedInfo
.
It can also write into an excel file with the option writeExcelFile
, beware: Excel cells are cut off because of the 32,767 chars limit.
Config for your projects pom.xml
:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.1.0-SNAPSHOT</version>
<configuration>
<includeTransitiveDependencies>true</includeTransitiveDependencies>
<verbose>true</verbose>
<!-- New -->
<extendedInfo>true</extendedInfo>
<!-- New -->
<writeExcelFile>true</writeExcelFile>
...
I would love some feedback on this.