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

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 游动-白 设计师:白松林 返回首页