We have not yet discussed two files: webapp/WEB-INF/jboss-deployment-structure.xml
and resources/META-INF/spring/infrastructure.xml
. The jboss-deployment-structure.xml
file is a JBoss-specific deployment descriptor used to configure fine-grained class-loading. If the jboss-deployment-structure.xml
file is not included, the default class-loading is used, which might not be what is required for an application. The jboss-deployment-structure.xml
file can be used for the following purposes:
EAR
deployments isolated class loading behaviorWe have used jboss-deployment-structure.xml
to include dependencies on the org.codehaus.jackson.jackson-core-asl
, org.codehaus.jackson.jackson-mapper-asl
, org.slf4j
, and mysql
modules.
The jboss-deployment-structure.xml
file is listed as follows:
<?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> <deployment> <!-- <exclusions> <module name="org.hibernate" /> </exclusions> --> <dependencies> <module name="mysql" /> <module name="org.codehaus.jackson.jackson-core-asl" /> <module name="org.codehaus.jackson.jackson-mapper-asl" /> <module name="org.slf4j" /> </dependencies> </deployment> </jboss-deployment-structure>
The infrastructure.xml
file is used for the following purposes:
The infrastructure.xml
file is listed as follows:
<?xml version="1.0" encoding="UTF-8"?> <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> <deployment> <!-- <exclusions> <module name="org.hibernate" /> </exclusions> --> <dependencies> <module name="mysql" /> <module name="org.codehaus.jackson.jackson-core-asl" /> <module name="org.codehaus.jackson.jackson-mapper-asl" /> <module name="org.slf4j" /> </dependencies> </deployment> </jboss-deployment-structure>
The directory structure of the Spring Maven application's jboss-springmvcsrcmainjava
and jboss-springmvcsrcmain
esources
directories is shown in Project Explorer in the following screenshot:
The directory structure of the Spring Maven application's jboss-springmvcsrcmainwebapp
directory is also shown in Project Explorer in the following screenshot: