我正在从Eclipse迁移到Intellij,并在开发环境中从Tomcat切换到Jetty。 我的Tomcat插件工作正常,但是当我启动Jetty时它会输出以下错误:
Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.2:run (default-cli) on project projeto: Webapp source directory C:\Users\EvCash - Blue\workspace\projeto\src\main\webapp does not exist -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mortbay.jetty:maven-jetty-plugin:6.1.2:run (default-cli) on project projeto: Webapp source directory C:\Users\EvCash - Blue\workspace\projeto\src\main\webapp does not exist
这是我的pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.2</version>
<configuration>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<port>8080</port>
</connector>
</connectors>
<scanIntervalSeconds>10</scanIntervalSeconds>
</configuration>
</plugin>
...
</plugins>
</build>
运行配置:
jetty:run -e
我尝试使用jetty-runner插件,但它需要JDK 1.8,我必须使用1.7版本。
有什么想法吗?提前致谢