facebook

WAR, EARS with Tomcat and Websphere

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #251633 Reply

    kalichar
    Member

    We are developing a web application where we plan to use Tomcat for development but have it finally deploy as an EAR to Websphere. I anticipate some shared libraries that the WAR would use to be placed in the EAR, i.e., jars used by other modules as well. However, I cannot deploy an EAR to Tomcat. What I am hoping to do is, when developing with Tomcat, have the shared libraries placed in the WAR’s WEB-INF/lib directory, and have it placed at the EAR level when finally built for deployment to Websphere.

    Is there anyway I can acheive the objective without having to write my own build script? What I am hoping for is a way to leverage the MyEclipse deploy module to handle a custom Tomcat deployment where it picks the required jars and places it in the WEB-INF/lib directory but when an EAR is built to not include the shared jars in the WEB-INF/lib of the WAR file?

    Any tips on how I could acheive this with MyEclipse built in deploy tools?

    Thanks in advance.

    #251655

    Riyad Kalla
    Member

    Try this:
    1) Create your EAR and your JAR.
    2) Put all the 3rd party JARs in the top level of the EAR project, which is where they should go.
    3) Go to your WAR file and go to your Java Build Path and Libraries tab, then click “Add External JAR”, then navigate to the dir containing your EAR and add all the JARS.
    4) Now go to the MyEclipse-Web > Deployment tab, be sure to check to deploy “External JARs”.

    I believe in this case, when you deploy the WAR, all those extra JARs will do with it, but when you dpeloy the EAR, only the one copy of them in the root of the EAR will deploy. I could be wrong, the worst case is that you might need to toggle the “Deploy external JARs” on and off depending on what you are deploying.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: WAR, EARS with Tomcat and Websphere

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