简体   繁体   English

我不想为我的项目引用服务器端jar,我的primefaces + spring项目必须使用我添加到lib文件夹中的jar

[英]I don't want to refer server side jars for my project, My primefaces+spring project has to use the jars that i added to lib folder

I'm working on Primefaces + Spring project.Recently we migrated the project from JSF 1.2 to 2.2 Version.Previously our project was using jsf Implementation and API jars from Project's lib folder but now it's using the jars located in, 我正在开发Primefaces + Spring项目。最近我们将项目从JSF 1.2迁移到2.2版本。以前我们的项目使用的是Project的lib文件夹中的jsf Implementation和API jar,但现在使用的是位于以下位置的jar,

**\\wildfly-10.0.0.Final\\modules\\system\\layers\\base\\com\\sun\\jsf-impl\\main** ** \\ wildfly-10.0.0.Final \\ modules \\ system \\ layers \\ base \\ com \\ sun \\ jsf-impl \\ main **

**\\wildfly-10.0.0.Final\\modules\\system\\layers\\base\\javax\\faces\\api\\main** ** \\ wildfly-10.0.0.Final \\ modules \\ system \\ layers \\ base \\ javax \\ faces \\ api \\ main **

and it is throwing Services which failed to start error while deploying on wildfly 10.x, JBAS014777: Services which failed to start: service jboss.deployment.unit."abc.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."abc.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "abc.war" 并且在Wildfly 10.x,JBAS014777上部署时抛出服务无法启动错误:服务无法启动:service jboss.deployment.unit。“ abc.war” .POST_MODULE:org.jboss.msc.service.StartException在服务jboss.deployment.unit。“ abc.war”中。POST_MODULE:无法处理部署“ abc.war”的阶段POST_MODULE

How can configure my project to use lib jars.Which will helps in deployment. 如何配置我的项目以使用lib jars。这将有助于部署。

Some dependencies are added implicitly by Wildfly 10. You can find a list of them here . Wildfly 10隐式添加了一些依赖项。您可以在此处找到它们的列表。

For the web subsystem these are: 对于Web子系统,这些是:

  • javaee.api javaee.api
  • com.sun.jsf-impl com.sun.jsf-impl
  • org.hibernate.validator org.hibernate.validator
  • org.jboss.as.web org.jboss.as.web
  • org.jboss.logging org.jboss.logging

If you don't want one of them, like in your case com.sun.jsf-impl, you can exclude them using a jboss-deployment-structure.xml file as explained here . 如果你不希望他们中的一个,像你的情况com.sun.jsf-implement执行,你可以使用JBoss的部署,structure.xml文件解释排除它们在这里

In your case it might look like this: 在您的情况下,它可能看起来像这样:

<jboss-deployment-structure>
  <deployment>
    <exclusions>
      <module name="com.sun.jsf-impl" />
    </exclusions>
  </deployment>
</jboss-deployment-structure>

Probably you may need more exclusions, but the principle should be clear. 可能您可能需要更多排除在外,但原则应明确。

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

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