更新时间:2022-12-05 22:17:36
警告信息
[WARNING] The requested profile "pom.xml" could not be activated because it does not exist.
意味着你以某种方式传递了 -P pom.xml
到Maven,这意味着有一个名为 pom.xml
的配置文件;找到并激活它。检查您的环境以及此标志的 settings.xml
,并查看各种内部的所有< profile>
元素XML文件。
means that you somehow passed -P pom.xml
to Maven which means "there is a profile called pom.xml
; find it and activate it". Check your environment and your settings.xml
for this flag and also look at all <profile>
elements inside the various XML files.
通常, mvn help:effective-pom
对于查看真正的POM外观也很有用喜欢。
Usually, mvn help:effective-pom
is also useful to see what the real POM would look like.
现在错误意味着你试图配置Maven来构建Java 8代码,但你没有使用Java 8运行时。解决方案:
Now the error means that you tried to configure Maven to build Java 8 code but you're not using a Java 8 runtime. Solutions:
JAVA_HOME
是你的朋友 pom.xml中配置Java编译器
到实际拥有的Java版本。JAVA_HOME
is your friendpom.xml
to a Java version which you actually have.相关: