简体   繁体   English

Wildfly上不排除模块

[英]Module not excluded on Wildfly

We want to exclude the modules\\system\\layers\\base\\javax\\servlet\\jstl\\api\\main\\jboss-jstl-api_1.2_spec-1.1.2.Final.jar from our web application deployment (WAR file). 我们想从我们的Web应用程序部署(WAR文件)中排除modules\\system\\layers\\base\\javax\\servlet\\jstl\\api\\main\\jboss-jstl-api_1.2_spec-1.1.2.Final.jar

Hence we have the following configuration in src\\main\\webapp\\WEB-INF\\jboss-deployment-structure.xml : 因此,我们在src\\main\\webapp\\WEB-INF\\jboss-deployment-structure.xml进行了以下配置:

<?xml version='1.0' encoding='UTF-8'?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>
        <exclusions>
            <module name="javax.servlet.jstl.api"/>
        </exclusions>
        <dependencies>
            <module name="deployment.my-dependencies.jar"/>
        </dependencies>
    </deployment>
</jboss-deployment-structure>

In the Wildfly log I see that my-dependencies.jar is added as a ModuleDependency . 在Wildfly日志中,我看到my-dependencies.jar被添加为ModuleDependency But when searching for javax.servlet.jstl.api I only see this: 但是在搜索javax.servlet.jstl.api我只看到这个:

2015-04-03 15:22:11,971 DEBUG [org.jboss.modules] (ServerService Thread Pool -- 12) Module javax.servlet.jstl.api:main defined by local module loader @1f7c9157 (finder: local module finder @2b29f6e7 (roots: C:\\Users\\me\\Documents\\wildfly-8.2.0.Final\\modules,C:\\Users\\me\\Documents\\wildfly-8.2.0.Final\\modules\\system\\layers\\base)) 2015-04-03 15:22:11,971 DEBUG [org.jboss.modules](ServerService线程池 - 12)模块javax.servlet.jstl.api:main由本地模块加载器@ 1f7c9157定义(finder:local module finder @ 2b29f6e7(roots:C:\\ Users \\ me \\ Documents \\ wildfly-8.2.0.Final \\ modules,C:\\ Users \\ me \\ Documents \\ wildfly-8.2.0.Final \\ modules \\ system \\ layers \\ base))

Why isn't the module excluded? 为什么不排除该模块?

Update : It seems that modules that are part of a user dependency can not be excluded. 更新 :似乎无法排除属于用户依赖项的模块。


It seems like the mechanism doesn't work as described in the Wildfly documentation . 看起来这个机制不能像Wildfly文档中描述的那样工作。 I was not able to exclude that module. 我无法排除该模块。

Yep. 是的。 I was trying to upgrade to Spring Framework to v4.3. 我试图升级到Spring Framework到v4.3。 It has upped some minimum dependency requirements. 它提高了一些最低依赖性要求。 One such example is Jackson min version required is 2.6+ 一个这样的例子是需要的Jackson min版本是2.6+

Wildfly loads jackson that comes packaged (v2.4.1 in Wildfly 8.2.1), and it won't be excluded using jboss-deployment-structure.xml. Wildfly加载打包的jackson(Wildfly 8.2.1中的v2.4.1),并且不会使用jboss-deployment-structure.xml排除它。 I was trying to see if the upgrade did not involve making changes to the installed server which takes this upgrade out of source control. 我试图看看升级是否涉及对已安装的服务器进行更改,这使得此升级不受源代码管理的影响。

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

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