facebook

Excluding compile-time dependencies from WEB-INF/lib folder

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #280505 Reply

    Clint Karlin
    Member

    Hi,

    Perhaps this question has been asked and answered before but I couldn’t find the answer. I have a web application that depends on the JavaMail API. I include the mail.jar and activation.jar files in my project’s build path. This causes the mail.jar and activation.jar to be added to my application’s WEB-INF/lib folder. This causes problems when I deploy to WebLogic 8.1 because WebLogic 8.1 bundles its own copy of the JavaMail API and I am running into version conflicts. What I would like to do is use my versions of the mail.jar and activation.jar at compile time only, and not include them in WEB-INF/lib, however, I don’t seem to be able to coax MyEclipse into doing this for me when I deploy the application. To summarize, is there a way to exclude compile time jar file dependencies from the WEB-INF/lib folder in the deployed application? Thanks in advance.

    #280518

    Loyal Water
    Member

    I guess you are working with a web project. You can go to Windows > Preferences > MyEclipse > Java Enterprise Project > Web Project and under the Deployment tab uncheck the “Jars on Web Project Build path” option under Library Deployment Policies.

    #280523

    Clint Karlin
    Member

    Thanks Nipun, your tip was helpful. In my case, I didn’t want to exclude ALL jars from my web projects build path, so what I did was place the JavaMail jar files I needed at compile time into a user library and then unchecked the “Jars in Web Project’s user libraries” checkbox. This had the desired effect of excluding only those jar files that I didn’t need. Thanks for pointing me in the right direction.

    #280595

    Loyal Water
    Member

    Your Welcome.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Excluding compile-time dependencies from WEB-INF/lib folder

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