I will create an enterprise project in eclipse and use Wildfly application server.
In my project i have some library that may be exists in Wildfy lib
folder.
How can i say to application server, if you need any library that exist in your lib
and my project lib
, please use that library that is exist in my project.
For example Wildfly contains JSF implementation and i will use Primefaces. I add Primefaces libraries to my project class path, and i will Wildfly use it, but Wildfly use its own instance.
Thanks.

- 802
- 3
- 16
- 32
2 Answers
Unfortunately it isn't that easy. JBoss has introduced the concept of modules. You'll need to understand how they work if you want to override library versions that JBoss provides. Check out the documentation here:
https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly
and
https://docs.jboss.org/author/display/WFLY8/Implicit+module+dependencies+for+deployments

- 16,800
- 44
- 60

- 3,396
- 1
- 19
- 26
-
Thank you for the link updates... not sure how I missed that :-/ – jgitter May 16 '14 at 20:13
If you add a library to your lib
directory WildFly will include those libraries in you class path. Which means if you include Primefaces you will get Primefaces in your class path. WildFly does not include Primefaces as a module.
For server dependencies, like the JSF implementation, WildFly will load it's provided dependency first before the one in your lib
directory. That said you don't really want to be overriding implementations like this. It's part of the Java EE specification and will be provided by any Java EE compliant server.
You should also read the links that jgitter suggested.

- 1
- 1

- 16,800
- 44
- 60