πŸ’» Programming/WAS

[JBoss 7] module.xml μ—μ„œ λͺ¨λ“ˆ μ„€μ •ν•˜κΈ°

μΌ€μ΄μΉ˜ 2015. 6. 19. 10:31

Jboss AS 7 μ—μ„œ module.xml 섀정을 μœ„ν•œ κ°„λž΅ν•œ μ„€λͺ…을 적어놓은 쒋은 자료λ₯Ό μ°Ύμ•„μ„œ ν¬μŠ€νŒ… ν•΄λ΄…λ‹ˆλ‹€.

μ˜λ¬Έμ΄κΈ΄ν•˜μ§€λ§Œ μ–΄λ €μš΄ 말은 μ—†μœΌλ‹ˆ ν•œλ²ˆ μ½μ–΄λ³΄μ‹œκΈΈ λ°”λžλ‹ˆλ‹€ ^-^ 



Full module.xml example with comments 


    <?xml version="1.0" encoding="UTF-8"?> 
     
    <module xmlns="urn:jboss:module:1.1" name="org.jboss.msc"> 
     
        <!-- Main class to use when launched as a standalone jar. --> 
        <main-class name="org.jboss.msc.Version"/> 
     
        <!-- Properties readable through Modules API. Not to be confused with Java system properties. --> 
        <properties> 
            <!-- jboss.api=private means that the module is not part of the JBoss AS 7 public API - basically saying, "Don't use it's packages in your apps." --> 
            <property name="jboss.api" value="private"/> 
        </properties> 
     
        <resources> 
            <!-- Basically, list of jars to load classes and resources from. --> 
            <resource-root path="jboss-msc-1.0.1.GA.jar"/> 
            ... 
        </resources> 
     
        <dependencies> 
     
            <!--  Export paths and packages from the class loader which loaded JBoss Modules (usually the system's application CL). --> 
            <system export="true"> 
                <!-- List of exported paths. Mandatory. --> 
                <paths> 
                   <path name="org/jboss/modules"/> 
                   <path name="org/jboss/modules/log"/> 
                </paths> 
                <!-- Optional limitation of what's exported. --> 
                <exports> 
                     <include path="META-INF/"/> 
                </exports> 
            </system> 
     
            <!-- Dependencies on other modules. Classloader of this module will have their classes visible. --> 
            <module name="javax.api"/> 
            <module name="org.jboss.logging"/> 
     
            <!-- services="import/export/none" controls whether services defined in META-INF/services are also visible to/from this module. 
                   I.e. services="export" will make the services of this module visible to the dependency. Import will do the other way around. 
                   Defaults to "none". --> 
            <!-- export="true" controls whether own exports of this dependency are visible. --> 
            <module name="org.jboss.ws.native.jbossws-native-core" services="export" export="true"> 
                <!-- You can limit what packages in dependency modules are allowed  
                       to be seen from this module's point of view (import), or vice versa (export). 
                       By default, all are imported/exported. When you specify <imports> or <exports>, only those listed are. --> 
                <imports> 
                   <include path="META-INF"/> 
                   <include path="dtd"/> 
                   <include path="schema"/> 
                   <exclude-set> 
                       <path name="org.jboss.example.tests"/> 
                   </exclude-set> 
                </imports> 
                <exports> 
                    <include path="META-INF"/> 
                    <include path="dtd"/> 
                    <include path="schema"/> 
                </exports> 
            </module> 
     
            <!-- Optional deps --> 
            <module name="javax.inject.api" optional="true"/> 
        </dependencies> 
    </module> 


- See more at: https://developer.jboss.org/people/ozizka/blog/2012/11/12/about-modulexml-in-jboss-as-7#sthash.oZ0bLEzI.dpuf



좜처 : https://developer.jboss.org/people/ozizka/blog/2012/11/12/about-modulexml-in-jboss-as-7