mvn编译cat的代码进报下面的错:
A required class is missing:com/thoughtworks/xstream/io/HierarchicalStreamDriver
解决办法:
在mvn本地仓库中com\thoughtworks\xstream这个文件夹。重新执行mvn clean install -DskipTests即可
因为没有这个文件夹,相关的jar都会重新下载,然后就下载到了。
http://www.myexception.cn/xml-soap/1898572.html
mvn jetty:run
报错:
[INFO] Final Memory: 11M/307M
[INFO] ------------------------------------------------------------------------
[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 (e:\m2repository), 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
原因:
settings.xml没有配置插件应此需要
mvn org.mortbay.jetty:maven-jetty-plugin:run
这样来运行。
如果需要使用jetty:run,那么必须在maven的setting.xml下配置
解决办法:
在.m2的settings.xml文件的pluginGroups节点添加关于jetty的信息:
<!-- pluginGroups
| This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
| when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
| "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
|-->
<pluginGroups>
<!-- pluginGroup
| Specifies a further group identifier to use for plugin lookup.
<pluginGroup>com.your.plugins</pluginGroup>
-->
<pluginGroup>org.mortbay.jetty</pluginGroup>
</pluginGroups>
http://www.xuebuyuan.com/1115208.html