简体   繁体   English

我无法让Jetty8 etc / jetty-webapps.xml extractWars =“ false”正常工作

[英]I can't get Jetty8 etc/jetty-webapps.xml extractWars=“false” to work

I am migrating my application from Jetty 7 to Jetty 8 and it is not going so well. 我正在将我的应用程序从Jetty 7迁移到Jetty 8,但进展并不顺利。 The battle is currently at etc/jetty-webapps.xml. 战斗目前在etc / jetty-webapps.xml中。 Prior to this migration, our configuration always set this value to "false" 在进行迁移之前,我们的配置始终将此值设置为“ false”

<Configure id="Server" class="org.eclipse.jetty.server.Server">
  <Ref id="DeploymentManager">
    <Call id="webappprovider" name="addAppProvider">
      <Arg>
        <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
          <Set name="monitoredDirName"><Property name="jetty.home" default="." />/webapps</Set>
          <Set name="defaultsDescriptor"><Property name="jetty.home" default="."/>/etc/webdefault.xml</Set>
          <Set name="scanInterval">1</Set>
          <Set name="contextXmlDir"><Property name="jetty.home" default="." />/contexts</Set>
          <Set name="extractWars">false</Set>
        </New>
      </Arg>
    </Call>
  </Ref>

When I try to bin/jetty.sh start with this value set to "false" Jetty spews exceptions like... 当我尝试将bin / jetty.sh设置为“ false”时,Jetty会喷出异常,例如...

2013-04-08 17:33:03.380:INFO:oejd.DeploymentManager:Deployable added: /Users/bobk/work/workspace/DM_Server/build/distributions/device-management-1.6.5-DEVELOP-dev/webapps/root.war
2013-04-08 17:33:04.526:WARN:oejw.WebAppClassLoader:EXCEPTION 
java.lang.IllegalArgumentException: !file: jar:file:/Users/bobk/work/workspace/DM_Server/build/distributions/device-management-1.6.5-DEVELOP-dev/webapps/root.war!/WEB-INF/lib/guava-14.0.1.jar
    at org.eclipse.jetty.webapp.WebAppClassLoader.addClassPath(WebAppClassLoader.java:245)
    at org.eclipse.jetty.webapp.WebAppClassLoader.addJars(WebAppClassLoader.java:282)
    blah...blah...blah...

...for each and every Jar file in my WAR's WEB-INF/lib directory. ...针对我的WAR的WEB-INF / lib目录中的每个Jar文件。 I can get jetty.sh start to successfully load my webapp if I change the value of extractWars in etc/jetty-webapps.xml from "false" to "true". 如果将etc / jetty-webapps.xml中的extractWars的值从“ false”更改为“ true”,则可以使jetty.sh开始成功加载我的Web应用程序。 Like I said, though, this value has been "false" ever since Jetty 6 and it is frustrating that it no longer works. 但是,就像我说的那样,自Jetty 6以来,该值一直为“ false”,令人沮丧的是它不再起作用。

Is "false" even a legitimate setting any more? “假”甚至是合法设置吗? If it is, what else do I have to set, unset, include in the etc/ directory, jetty.conf, or start.ini file to get this to work? 如果是这样,我还需要设置,取消设置,在etc /目录,jetty.conf或start.ini文件中包含哪些其他信息才能使其正常工作?

Any help is greatly appreciated. 任何帮助是极大的赞赏。

Bob, 鲍勃

The bug tracker and all doco for jetty-7,8 and 9 is found over at Eclipse, here: http://www.eclipse.org/jetty/ Bug跟踪程序以及关于jetty-7,8和9的所有doco都可以在Eclipse中找到, 网址为http : //www.eclipse.org/jetty/

IIRC, in jetty-6, despite having extractWar set to false, under-the-covers jetty was extracting and copying the WEB-INF directory to overcome issues under windows with hot redeployment. IIRC在jetty-6中,尽管将extractWar设置为false,但地下保护层仍在提取并复制WEB-INF目录,以解决Windows在热重新部署下的问题。 So even if you thought you weren't extracting the full war, at least part of it was anyway. 因此,即使您认为自己没有发动完整的战争,但至少有一部分战争还是发生了。

With jetty-7,8,9 we obey the settings of extractWar, copyWebInf, copyWebDir precisely. 使用码头7、8、9时,我们将严格遵守extractWar,copyWebInf和copyWebDir的设置。 The default is to extract - each iteration of the servlet spec has encouraged extraction as there are more an more features that really work best on an unpacked war. 缺省值为提取-Servlet规范的每次迭代都鼓励提取,因为还有更多的功能在解压战争中确实效果最好。

Jan 一月

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

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