No plugin found for prefix 'jetty' in the current project and in the plugin groups


    现在Jetty的版本已经到9了,也早已经在Eclipse的门下了。所以有很多groupId,比如:org.eclipse.jetty、org.mortbay.jetty.这些都可以用的哦。

    我在使用MyEclipse结合maven操作jetty作为开发的服务器,这开开发比较方便。

    当我运行命令:

    jetty:run

    出现:

[ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (F:\Java\maven\repository), central (http://repo.maven.apache.org/maven2)] -> [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/NoPluginFoundForPrefixException



    这样的问题,其实就是说,maven不知道这个插件在哪里,所以我们需要配置或者加参数。


    解决:

    方法1:

    执行的时候是这样的:

        mvn org.mortbay.jetty:maven-jetty-plugin:run

    或:

        mvn org.eclipse.jetty:maven-jetty-plugin:run


    方法2:

    在maven的配置文件插件组上添加插件:

    <pluginGroups>

<pluginGroup>org.mortbay.jetty</pluginGroup> 

    </pluginGroups>

    或:

    <pluginGroups>

<pluginGroup>org.eclipse.jetty</pluginGroup> 

    </pluginGroups>


    这样就可以解决!






     本人个人网站:http://www.verysu.com 

    【欢迎各位浏览,如果你有什么好的工作请介绍,或者您是HR希望您好好看看,谢谢!】







發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章