You might pack it into the EAR file and reference it within the application.xml (see dtd for details).
Also I recommend that you should use a JBoss5.1 instead of 5.0
My requirement here is that I dont want to package the external JARs into the EAR. The JARs should be put into an external directory and using some option I should be able to use the same in CLASSPATH.
Say I will put the external JARS in D:\temp\shared\lib and my JBoss server is installed at D:\appservers/Jboss-5.0/jboss-eap-5.0. My EAR is deplyed under D:\appservers\Jboss-5.0\jboss-eap-5.0\jboss-as\server\default\deploy. Now I want use the JARs which are presetn under D:\temp\shared\lib in CLASSPATH of my EAR.
How can the same be achieved?
You can use a custom EAR Deployer that extends org.jboss.deployment.EarClassLoaderDeployer.
The VFSDeploymentUnit can then be used to add the external directory to the VFSDeploymentUnit's classpath.