Maven project failed to build

风格不统一 提交于 2019-12-12 15:16:59

问题


I am new to Maven projects. I imported an existing Maven project to eclipse, then made a new configuration. I tried running the application then but the console shows

[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.4:devserver (default-cli) on project helloworld: The plugin com.google.appengine:appengine-maven-plugin:1.9.4 requires Maven version 3.1.0 -> [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/PluginIncompatibleException

I checked the link it showed. It suggested to update the build environment to the required Maven version. I searched for it but found out to make certain changes in pom.xml. But nothing worked. Can anyone tell me how to resolve the problem. My installed Maven version is 3.0.5.


回答1:


In order to execute this plugin, you need maven version 3.1.0 at least. Install it from here (http://maven.apache.org/download.cgi) and after that check if it is correctly installed by executing following command in the command line:

mvn -version




回答2:


Had the same problem. The solution was easy. Eclipse was expecting the maven root to have bin, boot, conf, and lib sub-folders. That root folder was not (in my case) /usr/local/Cellar/maven32/3.2.5, but rather /usr/local/Cellar/maven32/3.2.5/libexec. Note the correct one is one folder deeper.




回答3:


for the poor soul who finds this thread because of this error in intellj...

I had my M2_HOME and maven environment all set to modern versions of maven and still got this error. Search in your intellij preferences for "maven" and you'll see the default version IntelliJ uses is 3.0.5 - you'll see the version being set to "bundled" - set it to your maven download director and the app engine plugin will build.




回答4:


You need to have at least version 3.1 and you have 3.0.5. All you should have to do is download a newer version of maven point your environment variable at it and you should be alright. The current version of maven is 3.2.5

https://maven.apache.org/download.cgi



来源:https://stackoverflow.com/questions/28948235/maven-project-failed-to-build

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!