Adding 3rd party jars to WEB-INF/lib automatically using Eclipse/Tomcat
Solution 1
Here are the instructions for Helios. For earlier releases, see SeanA's answer.
- Project Properties -> Deployment Assembly
- Add -> Java Build Path Entries
- You should now see the list of libraries on your build path that you can specify for inclusion into your finished WAR.
- Select the ones you want and hit Finish.
Solution 2
You can use "Ant" to copy files to WEB-INF/lib when you deploy files. Using Ant you will be able to copy only those files which have changed.
http://ant.apache.org/manual/Tasks/copy.html
Solution 3
I haven't tried this personally, but what I believe it does is what I think you are looking for:
- Right-click project -> Properties
- Go to Java EE Module Dependencies
- Check the boxes for the JARs that you want to export with your Web Application
Let me know if this automatically puts them in your exported WAR. I always just add mine to WEB-INF/lib :)
Dave
"I'm a {0} developer".format(skill_required_to_get_job_done)
Updated on July 09, 2022Comments
-
Dave almost 2 years
I have a dynamic-web project set up on Eclipse and I'm using Tomcat 7 as my web server. It doesn't seem to be automatically putting 3rd party JARs I add to my library on my build path into the WEB-INF/lib folder. Is there a way I can do this automatically? Every time I search for an answer to this, I find something like this.
So how do I do that automatically? Is there a way to configure my build path to do this?
-
Dave about 13 yearsI don't see the "Java EE Module Dependencies" in my project properties. I'm using helios sr2 if that makes a difference.
-
kachanov about 13 yearsin Helios in J2EE perspective it is now called "Deployment Assembly"
-
Erum over 9 yearshow to do for eclipse juno ?
-
Erum over 9 yearshow to do for eclipse juno ?
-
teteArg over 9 yearsProject properties doesn't show me Deployment Assembly.