【问题标题】:Set tomcat 7 system property in maven plug in在maven插件中设置tomcat 7系统属性
【发布时间】:2016-08-01 19:21:54
【问题描述】:

我在我的 webapp 中使用嵌入式 tomcat 7.0.54。在启动 web 应用程序时,我得到了

processAnnotationsJar : Unable to process Jar entry javaassist-3.20.0.jar for annotations

我尝试查找,它看起来像是一个常见问题。为了解决这个问题,我关注了http://wiki.apache.org/tomcat/HowTo/FasterStartUphttps://answers.atlassian.com/questions/39145268/sdk-5.10.0-severe-error-javassist-3.20.0-ga-eofexceptionhttps://tomcat.apache.org/maven-plugin-2.1/tomcat6-maven-plugin/examples/add-system-properties.html

我正在尝试按如下方式添加系统属性以跳过对 javaassist-*.jar 的 jar 扫描。

  <plugin>
       <groupId>org.apache.tomcat.maven</groupId>
       <artifactId>tomcat7-maven-plugin</artifactId>
       <configuration>
       <systemProperties>
         <tomcat.util.scan.DefaultJarScanner.jarsToSkip>javassist-*.jar</tomcat.util.scan.DefaultJarScanner.jarsToSkip>

但这并没有解决问题。这是在嵌入式tomcat7中添加系统属性的正确方法吗?这是解决此异常的正确方法吗?

【问题讨论】:

    标签: java maven tomcat catalina maven-tomcat-plugin


    【解决方案1】:

    一种选择是扩展嵌入式 Tomcat 并实现您自己的快速 jar 扫描器,如下所述:Embedded Tomcat with Servlet 3.0 - How to skip certain jars when scanning?

    【讨论】:

      猜你喜欢
      • 2015-09-24
      • 2012-01-24
      • 1970-01-01
      • 2015-06-02
      • 1970-01-01
      • 2011-11-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多