Eclipse Dash License Tool Maven Plugin
Good news! Contributor Matt Booth has created a Maven plugin for the Eclipse Dash License Tool.
The first step is to clone the repository and run the build:
$ git clone git@github.com:eclipse-dash/dash-licenses.git
$ cd dash-licenses
$ mvn clean install
This will install the plugin into your local Maven cache. With that in place, you can navigate over to your own project directory and invoke the tool directly via Maven.
Use the org.eclipse.dash:license-tool-maven:license-check
goal to run the tool:
$ cd myproject
$ mvn org.eclipse.dash:license-tool-maven:license-check -Ddash.summary=DEPENDENCIES
[INFO] Scanning for projects...
[INFO]
[INFO] -------------< org.eclipse.dash:org.eclipse.dash.licenses >-------------
[INFO] Building org.eclipse.dash.licenses 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- license-tool-plugin:0.0.1-SNAPSHOT:license-check (default-cli) @ org.eclipse.dash.licenses ---
[INFO] Vetted license information was found for all content. No further investigation is required.
[INFO] Summary file was written to: ./dash-licenses/license-tool-core/DEPENDENCIES
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.434 s
[INFO] Finished at: 2020-12-18T11:27:38Z
[INFO] ------------------------------------------------------------------------
As you can see by the command-line parameters are passed to the plugin via Java properties (e.g., -Ddash.summary=DEPENDENCIES
) in the above example, the tool is asked to generate a DEPENDENCIES
file that lists the discovered dependencies along with the license information.
That file looks like this:
$ cat DEPENDENCIES
maven/mavencentral/org.glassfish/jakarta.json/2.0.0, EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0, approved, emo_ip_team
maven/mavencentral/org.checkerframework/checker-compat-qual/2.5.3, MIT, approved, clearlydefined
maven/mavencentral/commons-cli/commons-cli/1.4, Apache-2.0, approved, CQ13132
maven/mavencentral/org.apache.commons/commons-csv/1.8, Apache-2.0, approved, clearlydefined
maven/mavencentral/com.google.flogger/flogger/0.5.1, Apache-2.0, approved, clearlydefined
This is a very welcome addition to the tool that adds incentive to push towards creating a proper release that we will push to Maven Central.