简体   繁体   中英

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).

Hence we have the following configuration in 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 . But when searching for javax.servlet.jstl.api I only see this:

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))

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 . I was not able to exclude that module.

Yep. I was trying to upgrade to Spring Framework to v4.3. It has upped some minimum dependency requirements. One such example is Jackson min version required is 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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