mojohaus/license-maven-plugin

Override the identified during license-check

Open

#77 opened on Mar 2, 2017

View on GitHub
 (4 comments) (1 reaction) (0 assignees)Java (127 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (115 stars)
PR merge metrics
 (PR metrics pending)

Description

As discussed in #59 it is sometimes necessary to override the license for a certain dependency. The fix created for #59 however does this only for the license-report. This overwrite should also be applied during license checks.

Example:

I get the following error (with <failIfWarning> is true):

[WARNING] There are 1 forbidden licenses used:
[WARNING] License CDDL + GPLv2 with classpath exception used by 1 dependencies:
 -javax.transaction API (javax.transaction:javax.transaction-api:1.2 - http://jta-spec.java.net)

Now I have created the file my-proj/src/license/override-THIRD-PARTY.properties with the following content:

# original: CDDL + GPLv2 with classpath exception
javax.transaction--javax.transaction-api--1.2=BSD-3-Clause

... with my project pom has an whitelist entry for BSD-3-Clause:

<configuration>
 <includedLicenses>
   <includedLicense>BSD-3-Clause</includedLicense>

However, the build still fails with the same error as shown above. I'd expect it not to fail.

Contributor guide