嗨,我有以下配置。
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.3.v20120416</version>
</plugin>
在我的 jetty-env.xml 我有
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
</Configure>
当我使用 mvn jetty:run 运行时,出现以下错误。
Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.webapp.WebAppCont
ext
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.eclipse.jetty.util.Loader.loadClass(Loader.java:92)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.nodeClas
s(XmlConfiguration.java:349)
at org.eclipse.jetty.xml.XmlConfiguration$JettyXmlConfiguration.configur
e(XmlConfiguration.java:314)
at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.jav
a:279)
at org.mortbay.jetty.plugin.AbstractJettyMojo.applyJettyXml(AbstractJett
yMojo.java:449)
at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMo
jo.java:467)
我该如何解决?