我已经在Windows XP上下载了Apache Maven 3.1.1并且安装工作正常。但是,我想启动jetty,但我想有一种方法我必须告诉maven首先在哪里找到jetty,但我还是继续了我得到了这个
C:\maven>mvn jetty:run
[INFO] Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-
metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadat
a.xml
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata
.xml (22 KB at 3.2 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-m
etadata.xml (13 KB at 1.8 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 20.339s
[INFO] Finished at: Thu Jan 23 10:17:40 EAT 2014
[INFO] Final Memory: 5M/13M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plu
gin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repo
sitories [local (C:\Documents and Settings\Karl Meiwes\.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 swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundF
orPrefixException
C:\maven>
我需要告诉maven在哪里可以找到jetty以及如何安装jetty插件吗?。在这个版本的maven中,我找到了插件目录。应该有一个吗?
最佳答案
您需要将该插件添加到 pom.xml 中。 Here是文档。
关于java - 安装maven和maven插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21301863/