解决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
一种方案是在新建的每一个类的第一行添加

/**
 * 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是一个大于报错信息中的数量。
这里写图片描述
例如:

mvn  clean apache-rat:check -Drat.numUnapprovedLicenses=600 package -D maven.javadoc.skip=true assembly:single -Dhadoop.profile=2.0 -DskipTests=true  -Prelease,security
发布了72 篇原创文章 · 获赞 32 · 访问量 10万+
展开阅读全文

maven 编译报错的问题

12-09

错误如下: [root@node1-246 emm-trunk01]# mvn clean install [INFO] Scanning for projects... [ERROR] The build could not read 8 projects -> [Help 1] [ERROR] [ERROR] The project com.polysaas.emm:emm-device:0.0.1-SNAPSHOT (/opt/emm-trunk01/emm-device/pom.xml) has 5 errors [ERROR] Non-parseable POM /root/.m2/repository/org/springframework/boot/spring-boot-starter-parent/1.0.1.RELEASE/spring-boot-starter-parent-1.0.1.RELEASE.pom: start tag unexpected character ; (position: TEXT seen ...,window.analytics}};for(var i=0;i<window.analytics.methods.length;... @32:406) @ /root/.m2/repository/org/springframework/boot/spring-boot-starter-parent/1.0.1.RELEASE/spring-boot-starter-parent-1.0.1.RELEASE.pom, line 32, column 406 -> [Help 2] [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-web:jar is missing. @ com.polysaas.emm:emm-device:[unknown-version], /opt/emm-trunk01/emm-device/pom.xml, line 50, column 15 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-jetty:jar is missing. @ com.polysaas.emm:emm-device:[unknown-version], /opt/emm-trunk01/emm-device/pom.xml, line 60, column 15 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-actuator:jar is missing. @ com.polysaas.emm:emm-device:[unknown-version], /opt/emm-trunk01/emm-device/pom.xml, line 64, column 15 [ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-test:jar is missing. @ com.polysaas.emm:emm-device:[unknown-version], /opt/emm-trunk01/emm-device/pom.xml, line 68, column 15 [ERROR] [ERROR] The project com.polysaas.emm:emm-pms:0.0.1-SNAPSHOT (/opt/emm-trunk01/emm-pms/pom.xml) has 5 errors [ERROR] Non-parseable POM /root/.m2/repository/org/springframework/boot/spring-boot-starter-parent/1.1.7.RELEASE/spring-boot-starter-parent-1.1.7.RELEASE.pom: start tag unexpected character ; (position: TEXT seen ...,window.analytics}};for(var i=0;i<window.analytics.methods.length;... @32:406) @ /root/.m2/repository/org/springframework/boot/spring-boot-starter-parent/1.1.7.RELEASE/spring-boot-starter-parent-1.1.7.RELEASE.pom, line 32, column 406 -> [Help 2] 代码是从svn上down下来的,在其他机器上编译没问题,新装的机器上 编译出错了,maven 用3.0.4 和 3.0.5 都是这个问题(maven是解压指定目录的),linux下maven的设置如下: MAVEN_HOME=/opt/maven PATH=$MAVEN_HOME/bin:$PATH export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL EMM_LOG_BASE EMM_LOG_BASE MAVEN_HOME 谢谢! 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 1024 设计师: 上身试试

分享到微信朋友圈

×

扫一扫,手机浏览