maven-enforcer-plugin报错

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce
(enforce-versions) on project apache-atlas: Some Enforcer rules have
failed. Look above for specific messages explaining why the rule
failed. -> [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.

  <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.5.0,)</version>
                                    <message>** MAVEN VERSION ERROR ** Maven 3.5.0 or above is required. See https://maven.apache.org/install.html </message>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <level>ERROR</level>
                                    <version>[1.8.0-151,)</version>
                                    <message>** JAVA VERSION ERROR ** Java 8 (Update 151) or above is required.</message>
                                </requireJavaVersion>
                                <requireJavaVersion>
                                    <level>WARN</level>
                                    <version>(,1.9]</version>
                                    <message>** JAVA VERSION WARNING ** Java 9 and above has not been tested with Atlas.</message>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

要求java版本1.8.0-151,检查一下自己的java版本,发现版本过低

# java -version
java version "1.8.0_141"

安装一个高版本的java吧

参考

maven编译开源项目报enforce错解决 - 程小员的个人页面 - OSCHINA - 中文开源技术交流社区

java - Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin - Stack Overflow

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值