How do i skip the license check when running the maven install?

11.8k Views Asked by At

I ran a mvn clean install on a big Java project that I work on, but it kept failing due to some files not having the proper license headers. Well, thats not my concern right now, how do I skip that? the actual error i am seeing is,

Failed to execute goal org.codehaus.mojo:license-maven-plugin:1.14:add-third-party (default) on project test-project: There are some dependencies with no license, please fill the file /Users/test-project/src/license/THIRD-PARTY.properties 

I also tried this maven command, but it didn't work

mvn clean install -Dlicense.skip=true
4

There are 4 best solutions below

0
miskender On BEST ANSWER

Try skipping AddThirdParty mojo with -Dlicense.skipAddThirdParty=true.

0
Jim Richards On

I found this helpful

$ mvn license:help -Ddetail | fgrep skip

which gave me

-Dlicense.skipDownloadLicenses

you don't need to add =true because just defining it is enough.

0
DaNeSh On

This one works for me

-Dlicense.skipCheckLicense
0
Masaki Muranaka On

In my case, it worked with just -Dlicense.skip, without =true.

<plugin>
  <groupId>com.mycila</groupId>
  <artifactId>license-maven-plugin</artifactId>
  <version>3.0</version>
</plugin>