In my eclipse(ganymede) im trying to deploy my application in jboss. Specified all my ejb projects(I have a modularized project setup) in my ear project's J2EE module dependencies and they get added to the deploy folder properly along with an entry in application.xml, but how do i redirect my library(utility) project jars to a different location(say 'lib') in my jboss server. I see that my library(util) project jars are identified properly as utility jars by eclipse. There is even a check for the jars as 'to lib dir' in the 'J2EE module dependencies' screen, but that doesn't seem to do anything while deploying. I mean all the jars irrespective of being ejb module or utility are put to the .ear in the jboss deploy folder.
I am not sure what you are asking when you say " do i redirect my library(utility) project jars to a different location(say 'lib') in my jboss server." Are you saying that you want this library to be placed within a lib directory within your EAR, or are you saying that you want this library to be placed in jboss_home/server/default/lib or jboss_home/common/lib? If you want it to be placed in jboss_home/server/default/lib or jboss_home/common/lib, then Eclipse will not do that. (Or maybe it can - try adding a script that copies the file there to the builders for your project. Of course, you will have to restart the app server to get it to recognize the library file.)
I am ok with copying the library jars to jboss_home/server/default/lib, or to a folder like APP-INF/lib within my deployable .ear file. I believe eclipse should be capable of dealing with the second option, but how. As mentioned the ear project's 'J2ee module dependencies' has an option by which it asks if the jars are to be copied to a lib directory, but even when i select it these jars are taken to the .ear directly and not to any lib folder.
And for the first option of copying the jar to the jboss_home/server/default/lib, which file handles the build that eclipse performs on the projects. I mean when i give publish on my server, I see that eclipse is building all my projects. Which file(or at least which package) is responsible for this operation.
I just now tried this. I created an EAR project and added an external library and checked the "in lib dir" checkbox. Then I exported the EAR file (File | Export | Java EE | EAR File.) The resulting EAR file had the external JAR in the lib directory. I then added my EAR project to my JBoss AS server and did a full publish. Once again the external JAR was placed in the lib directory.
I am using Eclipse 3.4.2 with JBoss Tools 3.0 (Development Updates from June 5).
i changed the 'deploy-path' tag from '/'to '/lib' in the file and saw that eclipse now shows the 'in lib dir' for that project as selected.
I also tried changing the dependency-type from 'uses' to 'consumes' with the deploy-path as '/lib/SnmpAdapter.jar'. Now I have a folder named lib within my ear, with SnmpAdapter.jar in it with the proper contents. The only problem with this approach is that the content within the lib is not an archive, but a folder named SnmpAdapter.jar. Anyway the contents are well and proper within it.. Any idea what this dependency-type is and is there any more types available?
Thanks for the info Peter.
Life just hasn't been the same since the volcano erupted and now the air is full of tiny ads.
Free, earth friendly heat - from the CodeRanch trailboss