Module.xml

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

External

Internal

TODO

Deplete https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Module.xml

Overview

<?xml version="1.0" encoding="UTF-8"?>
 <module xmlns="urn:jboss:module:1.1" name="org.jboss.msc">
 
    <main-class name="org.jboss.msc.Version"/>
 
    <properties>
        <property name="my.property" value="foo"/>
    </properties>
 
    <resources>
        <resource-root path="jboss-msc-1.0.1.GA.jar"/>
    </resources>
 
    <dependencies>
        <module name="javax.api"/>
        <module name="org.jboss.logging"/>
        <module name="org.jboss.modules"/>
 
        <!-- Optional deps -->
        <module name="javax.inject.api" optional="true"/>
        <module name="org.jboss.threads" optional="true"/>
        <module name="org.jboss.vfs" optional="true"/>
    </dependencies>
</module>

Module Dependencies

The <dependencies> element can be used to declare this module's dependency on other JBoss module, third party packages and JDK classes.

The dependency on another JBoss module is declared as follows:

<module ...>
    ...
    <dependencies>
        <module name="org.jboss.as.web"/>
        ...
    </dependencies>
</module>

The dependency on JDK classes is declared as follows:

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

More details about module dependencies can be found here:

Modules - Inter-Module Dependencies

Configuration

slot

export

Specifies whether this dependency is re-exported to the dependents of this module. Default is "false".

Example:

<module xmlns="urn:jboss:module:1.1" name="...">
    ...
    <dependencies>
        <module name="io.novaordis.c098.solution1.api" slot="1" export="true"/>
    </dependencies>
</module>

optional