简体   繁体   English

运行Maven码头导致依赖错误

[英]running maven jetty causing a dependency error

I've this wired java compilation error when I start jetty. 我启动码头时遇到了有线Java编译错误。 I'm running naven build and it gives me success, however when i run the mvn jetty:run command, it gives the following error: 我正在运行naven build,它给了我成功,但是当我运行mvn jetty:run命令时,它给出了以下错误:

EXCEPTION org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP||PWC6199: Generated servlet error:|org.apache.jsp.tag.web.ui.static_tag is not abstract and does not override abstract method getDependants() in org.apache.jasper.runtime.JspSourceDependent||PWC6199: Generated servlet error:|getDependants() in org.apache.jsp.tag.web.ui.static_tag cannot implement getDependants() in org.apache.jasper.runtime.JspSourceDependent|  return type java.util.List<java.lang.String> is not compatible with java.util.Map<java.lang.String,java.lang.Long>||
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:129)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:299)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:392)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:453)

I'm using the maven-jetty-plugin for running jetty. 我正在使用maven-jetty-plugin运行码头。 I've tried re-installing the environment that I'm currently working, and also checkout my project ina different directory. 我尝试重新安装当前正在使用的环境,并在另一个目录中签出我的项目。 Nothing has worked so far. 到目前为止没有任何工作。 Does have nay ideas what might have gone wrong? 是否有反对意见,可能出了什么问题?

Your problem would be one of the followings: 您的问题可能是以下情况之一:

  • You have a dependency to glassfish in your pom.xml: This was the problem in my case 您的pom.xml中有一个对glassfish的依赖项:这是我的问题

  • You are using a different version of servlet-api than your jetty uses. 您所使用的servlet-api版本与码头使用的版本不同。 To solve this you can add provided tag to your servlet-api dependency that makes the jetty to use its own servlet version: 为了解决这个问题,您可以将提供的标签添加到servlet-api依赖项中,以使码头使用其自己的servlet版本:

    javax.servlet servlet-api 3.2 provided 提供了javax.servlet servlet-api 3.2

Using the latest Jetty plugin helped me 使用最新的Jetty插件对我有帮助

http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html this link points to the root cause of the problem https://support.lucidworks.com/hc/en-us/articles/201784186-Error-in-Javac-compilation-for-JSP-in-LucidWorks-Search-UI http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html此链接指向问题的根本原因https://support.lucidworks.com/hc/zh-cn/articles / 201784186-错误功能于javac的编译换JSP功能于LucidWorks-搜索的用户界面

FYI my plugin configuration 仅供参考,我的插件配置

        <plugin>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-maven-plugin</artifactId>
            <version>9.3.7.v20160115</version>
            <configuration>
                <scanIntervalSeconds>10</scanIntervalSeconds>
            </configuration>
        </plugin>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM