facebook

[Closed] Can Deployment exclude projects exported by EAR?

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #259945 Reply

    loopingrage
    Member

    First I’d like to say that MyEclipse is a great product. I have been using it for a couple years now and am very impressed. Keep up the good work. OK, on to my situation:

    Problem
    I have an Enterprise Application (EAR) containing one (1) Web Application and one (1) EJB Application. Both EJB and Web applications have a project reference in common, let call it CommonLib. The Web application however, has an additional project reference which I will call WebStuffLib.

    I have configured my EAR Deployment to “Jar dependent Java Projects” and have instructed MyEclipse to regenerate my module’s MANIFEST.MF files. This all seems to be working great. However, I now have an issue with my Web Project. The Web project deployment options are configured to use the “Smart Deployment” option. This option causes ALL dependent Java projects to be merged into the exploded JAR’s “classes” directory regardless of whether they are already included by the EAR. Now my web application has two versions of my CommonLib classes in its ClassPath. This is causing serious ClassLoader issues when using Hibernate inside JBoss 4.0.4.

    Question
    Is there a way to have the MyEclipse Deployer only deploy projects that are not already being included by the parent EAR? For example, in my case I would only expect WebStuffLib to be merged since CommonLib is already being added by the EAR.

    Suggestion
    One suggestion would be to use the “Project References” selections in Eclipse as opposed to the referenced projects in the Build Path section.

    Any help will be greatly appreciated.

    #259954 Reply

    Riyad Kalla
    Member

    First I’d like to say that MyEclipse is a great product. I have been using it for a couple years now and am very impressed. Keep up the good work. OK, on to my situation:

    Thank you very much, we appreciate the continued support.

    Is there a way to have the MyEclipse Deployer only deploy projects that are not already being included by the parent EAR? For example, in my case I would only expect WebStuffLib to be merged since CommonLib is already being added by the EAR.

    Unfortunately no, you will need to instruct the web project to basically stop doing anything with dependent java projects for the time being.

    I’m sure you came to that same conclcusion though, so I’m curious what problems this poses for your development? We may be able to extract a particular feature request from this in the generic sense.

    #259963 Reply

    loopingrage
    Member

    …so I’m curious what problems this poses for your development? We may be able to extract a particular feature request from this in the generic sense.

    The problem it poses is that JBoss uses a delegated class-loading model that causes issues when multiple version of a single class are available in the same class loader. I could just instruct MyEclipse to ignore dependent project and reference WebStuffLib from the EAR, but I’d rather not clutter the EAR with libraries that are specific to a single project which is exactly what I’m forced to do at the moment.

    Thanks again for your time and I hope you can come back with a solution to this problem.

    Cheers,

    Jose de Castro
    Senior Software Engineer
    Voxeo Corporation
    http://www.voxeo.com

    #259975 Reply

    Riyad Kalla
    Member

    Jose,
    If your web project is the only one that uses WebStuffLib, why not un-reference that from the EAR, and just add it to the WAR with Smart deployment turned on… that solves you rproblem if I understand it correctly.

    You are right, there *is* no reason for the EAR to be aware of that particular library, but there is a reason for the EAR to be aware of the commonLib project (but that’s not the problem right?)

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] Can Deployment exclude projects exported by EAR?

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in