gpt4 book ai didi

jboss - 玩! war 命令 - 是否可以从 application/lib 文件夹中排除某些 jar

转载 作者:行者123 更新时间:2023-12-01 12:57:43 25 4
gpt4 key购买 nike

我正在尝试将 Play 应用程序自动部署为 .war 文件。

最终应用程序将在 JBOSS AS7 上运行。我现在遇到的问题是,当我将 war 部署到 JBOSS 时,我得到了这个异常。

14:52:39,728 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) Starting  deployment of "my-test-app-server-0.0.2-SNAPSHOT.war"
14:52:43,822 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."my-test-app-server-0.0.2-SNAPSHOT.war".PARSE: org.jboss.msc.service.Start
Exception in service jboss.deployment.unit."my-test-app-server-0.0.2-SNAPSHOT.war".PARSE: Failed to process phase PARSE of deployment "my-test-app-server-0.0.2-SNAPSHOT.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_22]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_22]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_22]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to parse POJO xml ["/C:/jboss-as-web-7.0.2.Final/bin/content/my-test-app-server-0.0.2-SNAPSHOT.war/WEB-INF/lib/netty-3.2.5.Final.jar/META-INF/jboss-beans.xml"]
at org.jboss.as.pojo.KernelDeploymentParsingProcessor.parseDescriptor(KernelDeploymentParsingProcessor.java:130)
at org.jboss.as.pojo.KernelDeploymentParsingProcessor.parseDescriptors(KernelDeploymentParsingProcessor.java:104)
at org.jboss.as.pojo.KernelDeploymentParsingProcessor.deploy(KernelDeploymentParsingProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
... 5 more
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[17,1] Message: Unexpected element '{urn:jboss:bean-deployer:2.0}deployment'
at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:98) [staxmapper-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:59) [staxmapper-1.0.0.Final.jar:1.0.0.Final]
at org.jboss.as.pojo.KernelDeploymentParsingProcessor.parseDescriptor(KernelDeploymentParsingProcessor.java:123)
... 8 more

我发现如果我在将 lib/netty-3.2.5.Final.jar 文件部署到 JBOSS 之前从 war 中手动删除它,问题就会消失。

当我用 play war 命令生成 war 时,现在有办法做到这一点吗?任何有关这方面的信息将不胜感激。谢谢

最佳答案

不是我知道的简单。 play war 命令允许您传递一个排除列表,我从下面的 python 文件中复制了注释。

~ To exclude some directories, use the --exclude option and ':'-separator (eg: --exclude .svn:target:logs:tmp).

但是,这表明它仅适用于目录。

执行的命令是 framework/pym/utils.py 中的 package_as_war,所以你可以破解它来专门删除文件,但显然如果你更新你的版本,这将不会向后兼容的游戏。

关于jboss - 玩! war 命令 - 是否可以从 application/lib 文件夹中排除某些 jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8749255/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com