2 Replies Latest reply on Sep 15, 2014 3:43 PM by Ricardo Jr. Rodrigues

    Exporting META-INF to other modules

    Jan Ferko Newbie

      Hi everyone,


      I wrote my custom logging handler and add it as new module to Wildfly 8.0.0.Final. My handler store some configuration settings for 3rd party library in META-INF/ folder inside my JAR package. So far so good, problem is that after I add handler to logging subsystem, my META-INF folder is no longer on classpath and it can't be accessed. I tried to export it by using export attribute and exports element in my module definition, but this didn't help.


      Here is my module.xml


      <module xmlns="urn:jboss:module:1.1" name="com.mycompany.handlers">
              <resource-root path="handler.jar"/>
              <module name="javax.api"/>
              <module name="org.jboss.logging" export="true">
                      <include path="META-INF/" />
              <!-- some other dependencies -->


      If I understand JBoss Module schema correctly, exports always rejects META-INF. Is there any other way how to add my META-INF to classpath, so it can be accessed outside of my package in runtime?


      Thanks for help.

        • 1. Re: Exporting META-INF to other modules
          jaikiran pai Master

          You need services=import on the module dependency:



            <module name="org.jboss.logging" services="import"/> 


          • 2. Re: Exporting META-INF to other modules
            Ricardo Jr. Rodrigues Newbie

            Jan Ferko, I've got the muduled jar's META-INF visible by app.war this way


            <?xml version="1.0" encoding="UTF-8"?>




                        <module name="javax.faces.api" slot="mojarra-1.2_15_full_dep">


                              <include path="META-INF**"/>







            this access the META-INF of all jars in resource area.



            <?xml version="1.0" ?>

            <module xmlns="urn:jboss:module:1.1" name="javax.faces.api" slot="mojarra-1.2_15_full_dep">



                    <resource-root path="richfaces-ui-3.3.3.Final.jar"/>

                    <resource-root path="richfaces-impl-3.3.3.Final.jar"/>

                    <resource-root path="richfaces-api-3.3.3.Final.jar"/>

                    <resource-root path="tomahawk12-1.1.10.jar"/>

                    <resource-root path="jsf-facelets-1.1.14.jar"/>




                 I didn't get access the META-INF on module dependencies



                    <module name="com.sun.jsf-impl" slot="mojarra-1.2_15"/>

                    <module name="javax.api"/>

                    <module name="javax.servlet.api"/>

                    <module name="javax.servlet.jsp.api"/>

                    <module name="javax.faces.api" slot="mojarra-1.2_15"/>

                    <module name="org.apache.commons.collections"/>

                    <module name="org.apache.commons.digester"/>

                    <module name="org.apache.commons.el"/>

                    <module name="org.apache.commons.logging"/>

                    <module name="org.apache.commons.fileupload"/>



            1 of 1 people found this helpful