facebook

How to support Java Libraries within an ear.

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

    sdunlop
    Member

    I’m playing around with the EAR deployment. And here is my situation.

    I have multiple war files that use struts that i’ve created within MyEclipse that gets deployed as a single ear.

    Each war file contains a number of supporting library files like the “commons libraries and struts.jar (along with a few others).

    Do I have to have those libraries included within each war file?

    I’ve tried to figure out how to get only one copy of the these supporting library files into the ear and can’t seem to figure it out. I’ve tried selecting the option under the EAR->Properties->MyEclipse-EAR-> and selecting both the “Jars exported from dependent Java projects” and “User library jars exported from dependent Java projects”, but that doesn’t seem to do anything.

    Any thoughts? Thanks.

    #260371 Reply

    Greg
    Member

    There is an advanced topic covered in the EAR quickstart that details how to add libraries/jars to your EAR and have them put on the included War’s classpaths.

    http://www.myeclipseide.com/images/tutorials/quickstarts/earprojects/
    Then go down to section 9 and it describes the process.

    #260375 Reply

    sdunlop
    Member

    Yeah, I’ve read that a number of times and I don’t feel it address (or maybe I’m missing something) what I’m looking to do.

    Example. I have an ear project called TestEAR, that has two MyEclipse Struts enabled war projects called OneWAR and TwoWAR.

    Both OneWAR and TwoWAR have the following libraries (placed in by MyEclipse enabling struts).
    – struts.jar
    -commons-beanutils.jar
    -commons-loggin.jar
    -jakarta-oro.jar
    -commons-digester.jar
    -commons-fileupload.jar
    -commons-validator.jar

    I don’t like that I have these libraries in two war files (seems redundant to me).

    So can i put them in common library?

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: How to support Java Libraries within an ear.

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