Module.xml: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 7: Line 7:
* [[WildFly Deployment Descriptors]]
* [[WildFly Deployment Descriptors]]
* [[WildFly Modules#Statically_Deployed_Modules|Statically Deployed Modules]]
* [[WildFly Modules#Statically_Deployed_Modules|Statically Deployed Modules]]
=TODO=
<font color=red>Deplete https://home.feodorov.com:9443/wiki/Wiki.jsp?page=Module.xml</font>


=Overview=
=Overview=
Line 39: Line 43:
=Module Dependencies=
=Module Dependencies=


The <tt><dependencies>/<module></tt> element supports the following attributes:
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:
 
<pre>
<module ...>
    ...
    <dependencies>
        <module name="org.jboss.as.web"/>
        ...
    </dependencies>
</module>
</pre>


==<tt>export</tt>==
The dependency on JDK classes is declared as follows:
 
<pre>
<module ...>
    ...
    <dependencies>
        <module name="javax.api"/>
        ...
    </dependencies>
</module>
</pre>
 
More details about module dependencies can be found here: {{Internal|WildFly_Modules#Inter-Module_Dependencies|Modules - Inter-Module Dependencies}}
 
==Configuration==
 
====<tt>slot</tt>====
 
====<tt>export</tt>====


Specifies whether this dependency is re-exported to the dependents of this module. Default is "false".
Specifies whether this dependency is re-exported to the dependents of this module. Default is "false".
Line 56: Line 90:
</pre>
</pre>


 
====<tt>optional</tt>====
==<tt>optional</tt>==

Latest revision as of 15:55, 23 February 2017

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