facebook

How to exclude WEB-INF/lib from deployment and exported WAR

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

    MaxRahder
    Member

    I’d like to exclude my JARs from the WAR exported from MyEclipse, and from the Tomcat instance I deploy to during development

    Under “Properties | MyEclipse | Web” I set “Library Deployment Policies” to all off so — supposedly — that no JARs included in deployment. However, when I redeploy, the JARs still end up in the expanded web app on Tomcat, and the JARs are also in the WAR when I Export.

    I’m using “MyEclipse Enterprise Workbench 6.5”, version 6.5.1 GA.

    What’s the procedure?

    #292332 Reply

    Loyal Water
    Member

    MaxRahder,
    If you uncheck all the check boxes in the deployment page then the libraries should ideally not get deployed. Can you tell me what is the location of the jars that are getting deployed? Are these jars on the project build path?

    #292372 Reply

    MaxRahder
    Member

    Yes, they are all on the build path. Under “Java Build Path | Order and Export” all are de-selected, and under “Properties | MyEclipse | Web | Deployment” all under “Library Deployment Policies” are de-selected.

    To test, I did an Export to a WAR, then unzipped it and verified that indeed, WEB-INF/lib contains all the JARs.

    The goal is this: We rarely change the JARs, although our own code changes a lot. Deployment and upload to the server would be much quicker if we put the contents of our Web application’s WEB-INF/lib folder into Tomcat’s shared lib folder, and omitted that folder from the WAR.

    Thanks for the help!

    #292467 Reply

    Loyal Water
    Member

    After unchecking all the options under preference, right click on your project and go to MyEclipse > Add and Remove Project Deployments > (select your project in the Project Dropdown) > Add > Next > (Select <custom Location Suffixed> in the server dropdown and select the appropriate deployment location) > Finish.

    Now does the war file generated contain the jars?

    #292474 Reply

    MaxRahder
    Member

    Thanks for looking into this for me.

    Yes, the JARs are there. (They were also in the “exploded” application that was deployed in the process of following the steps you outlined.)

    By the way, I am working on an Apple under OSX. (The MyEclipse version is as noted in my previous note in this thread.)

    I’ll include screen shots!

    #292517 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #292701 Reply

    MaxRahder
    Member

    This message has not been recovered.

    #292709 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #292713 Reply

    MaxRahder
    Member

    This message has not been recovered.

    #292716 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #292827 Reply

    MaxRahder
    Member

    This message has not been recovered.

    #292885 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #292886 Reply

    Loyal Water
    Member

    This message has not been recovered.

    #292894 Reply

    This message has not been recovered.

    #292925 Reply

    Loyal Water
    Member

    This message has not been recovered.

Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: How to exclude WEB-INF/lib from deployment and exported WAR

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