【发布时间】:2015-02-28 12:49:50
【问题描述】:
我在我的项目 pom.xml 中添加了 jetty mvn 插件代码。
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.26</version>
<configuration>
<contextPath>/redkites</contextPath>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<daemon>true</daemon>
</configuration>
</execution>
</executions>
</plugin>
当我使用命令sudo mvn compile 和sudo mvn clean install 时,我没有发现任何错误并成功构建,但是当我输入命令sudo mvn 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 (/root/.m2/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
请提出解决方法。谢谢
【问题讨论】:
-
尝试在不使用 sudo 的情况下运行所有
mvn命令。
标签: maven jetty maven-jetty-plugin