Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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
like image 301
Shravan Ramamurthy Avatar asked Mar 14 '18 15:03

Shravan Ramamurthy


People also ask

How do I skip a test in maven?

To skip running the tests for a particular project, set the skipTests property to true. You can also skip the tests via the command line by executing the following command: mvn install -DskipTests.

Does mvn install run verify?

mvn install implicitly runs mvn verify and then copies the resulting artifact into your local maven repository which you usually can find under C:\Users\username\. m2\repository if you are using windows.

How do I skip a maven build module?

1 added this feature, you can use the -pl switch (shortcut for --projects list) with ! or - (source) to exclude certain submodules. Be careful in bash the character ! is a special character, so you either have to single quote it (like I did) or escape it with the backslash character. Save this answer.

What is mvn clean install command?

mvn clean install tells Maven to do the clean phase in each module before running the install phase for each module. What this does is clear any compiled files you have, making sure that you're really compiling each module from scratch.


1 Answers

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

like image 158
miskender Avatar answered Sep 19 '22 23:09

miskender