解決org.apache.rat:apache-rat-plugin:0.8:check (default) on project hbase: Too many unapproved license

maven打包的時候報錯: 
報錯信息: 
[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default) on project hbase: Too many unapproved licenses: 513 -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 
一種方案是在新建的每個類的第一行添加java

/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */

第二種解決方案: 
在mvn命令中添加參數 
apache-rat:check -Drat.numUnapprovedLicenses=600 
數字600是一個大於報錯信息中的數量。 
這裏寫圖片描述
例如:express

mvn  clean apache-rat:check -Drat.numUnapprovedLicenses=600 package -D maven.javadoc.skip=true assembly:single -Dhadoop.profile=2
相關文章
相關標籤/搜索