Reputation: 1061
I have to create a module for Spring framework - org.springframework. There are many jars, is there a way to say: include all jars in this org/springframework/main/ folder? Something like below.
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="nuance.classes">
<resources>
<resource-root path="./*"/>
</resources>
</module>
the above seems doesn't work though. Any guide/document available for this?
Upvotes: 3
Views: 2315
Reputation: 623
For future reference (it's been years from the question), I'm using the following code:
<?xml version="1.0"?>
<module xmlns="urn:jboss:module:1.0" name="nuance.classes">
<resources>
<resource-root path="." />
</resources>
</module>
Upvotes: 1
Reputation: 324375
The documentation for the module system and classloader is here.
I don't know if you can specify all JARs in a wildcard, but you shouldn't. Many of those JARs will be for libraries and APIs already packaged by JBoss AS 7. You can just declare a dependency on them, and unless you need a different and incompatible version you should do so rather than packing another copy of the jar.
You'll probably find that once you cut out the stuff that's already packaged or part of the standard APIs, you won't have much to package. Take this EclipseLink module for example; it ended up boiling down to nothing but the EclipseLink jar its self. (The ${ECLIPSELINK_JAR_NAME}
is because this project produces an EclipseLink module as part of its build process; the final module.xml
contains the real name of the jar).
Upvotes: 1