We have servlet-api*.jar and jsp-api*.jar as provided scope in our maven project. These jars are also copied along with others into WEB-INF/lib folder in the tomcat webapps/APP/WEB-INF/lib folder. How to avoid copying these jars
Asked
Active
Viewed 139 times
0
-
Could you please provide your *pom.xml* file? – António Ribeiro Mar 29 '16 at 12:55
-
As i am in the restricted development place, i don't see any option to share the file. Also i'm not able to copy&paste the pom file here in the post – javapsy Mar 29 '16 at 13:11
-
I see that eclipse 3.8 is working fine as expected but not in 4.4. So do i need to alter anything in eclipse? – javapsy Mar 29 '16 at 13:13
-
Without your POM file is very difficult to be of any help... Can't you hide any sensitive information that you may have on your *pom.xml* and edit your post with it? – António Ribeiro Mar 29 '16 at 13:18
-
even after i hide the sensitive information, it is still too big to post here. But i can share one more thing about what is happening. When i run maven install and checked the war, i don't see those jars marked as provided. So these jars copied by eclipse some xxx plugin to tomcat webapps folder :( – javapsy Mar 29 '16 at 13:27
-
Trim your POM: remove all unrelated dependencies. Just leave the plugin configurations and mentioned dependencies. – António Ribeiro Mar 29 '16 at 13:31
-
Went through the same issue and found the answer in this [link](https://stackoverflow.com/questions/5905579/how-to-prevent-duplicate-servlet-jar-using-eclipsem2eclipse). – gopal Sep 11 '17 at 21:01