This is my project:
Error when running:
[INFO] BUILD Failure[info]------------------------------------------------------------------------[INFO] Total time:2.903S[info] Finished At:thu - One: -: ACst -[INFO]FinalMemory:7m/121M[info]------------------------------------------------------------------------[ERROR] No plugin found forPrefix' Jetty ' inchThe current project and inchThe plugin groups [Org.apache.maven.plugins, Org.codehaus.mojo] Available fromThe repositories [local (C:\Users\liugen.xu\.m2\repository), Qunarnexus (http://nexus.corp.qunar.com:8081/nexus/content/groups/public), Central (HTTP://REPO1.MAVEN.ORG/MAVEN2)] 1][ERROR] [ERROR] toSee the full stack trace ofThe errors, re-run Maven withTHE-E switch. [ERROR] Re-run MavenusingThe-x switch toEnable full debug logging. [ERROR] [ERROR] forMore information about the errors andPossible solutions, pleaseReadThe following articles:[error] [Help1] http://cwiki.apache.org/confluence/display/maven/nopluginfoundforprefixexceptionE:\qunareclipse\koala\com.qunar.koloa>
There is also an error when executing using the cmd command line:
There are also a lot of solutions on the web, roughly the same, such as this:
Http://www.360doc.com/content/14/0106/17/1332348_343100544.shtml
But there are a lot of ways to solve it, and it's not possible.
The final solution is to:
We use MAVEN to manage the project, and for a Web project, the jetty reference should be in the pom below the Web, for example, my project is using MAVEN management, where
This is the Web project's home directory, under his POM I refer to the Jetty Server plugin:
<build> <plugins> <!--configuration Join jetty Server, we usually use jetty server when developing <plugin> <groupId>Org.mortbay.jetty</groupId> <artifactid>Jetty-maven-plugin</artifactid> <configuration> <!--set Scan target/classes internal file change time interval - <!--<scanIntervalSeconds>10</scanIntervalSeconds> -- <webApp> <contextpath>/</contextpath> </webApp> </configuration> </plugin> </plugins> </Build>
So the problem is, we use the mvn clean install command directly to run the project and find the default is total (mine is Com.qunar.koloa this) but obviously, I do not refer to the jetty plugin in the total pom, so there will be an error,
The right way is that we need to go into the directory of this project, open the idea's Terminal (ALT+F12), and then run it using the command:
Then run mvn clean install
the: command to compile, and finally run: mvn jetty:run
to run the project, you can run it successfully.
The point is, we don't find the starting point for the project to run, find the starting point of the project, get the CD in, run it.
In addition, for friends who use eclipse, there is no alt+f12 to open the MVN terminal, then we can use CMD to run the way,
First: Find your project's home directory,
Don't make the mistake again, we should also go into the com.qunar.koloa-web directory (because we have configured the plugin to use jetty), enter in the address bar after entering: cmd, the return can be directly in the CMD to locate the location with the file
And then run the mvn jetty:run
command
OK to this end! Hope to help everyone!
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
No plugin found for prefix ' jetty ' in the current project and in the plugin groups [Org.apache.mave