- This topic has 7 replies, 3 voices, and was last updated 18 years, 5 months ago by Riyad Kalla.
-
AuthorPosts
-
sma202Memberservlet.jar or servlet-api.jar is needed in the classpath for a web project. How do I prevent this from being deployed to tomcat using the deployment tool. The servlet engine uses it’s own jar and this jar should not be deployed.
Riyad KallaMemberGo to your MyEclipse-Web project settings and go to the Deployment tab, from there you can turn off the deployment of different kinds of libraries.
sma202Member@support-rkalla wrote:
Go to your MyEclipse-Web project settings and go to the Deployment tab, from there you can turn off the deployment of different kinds of libraries.
That tab doesn’t let you disable a specific jar, it’s basically all or nothing, ex: I can manually the jars copy myself or let myeclipse copy all jars in the buildpath. If the servlet.jar is in the buildpath, it will copy it along with all other application dependents jars.
This does not seem correct, as the Servlet Spec. specifically states not to copy this jar into the application server. So the deployment process should ignore this jar or there should be an option to allow disabling of certain jars in the buildpath.
Riyad KallaMemberDeployment filtering is an enhancement we hope to address soon for exactly this reason. Just uncheck the build path deployments, that will stop the deployment of the J2EE libs. If you check the User Libs deploiyment, that will handle deploying the user libs (Spring, Hibernate, your own, etc.) and if you check External JARs that will deploy JARs that you are linking too outside of your project.
sma202MemberThis doesn’t work for me, all four checkbox options are needed by other projects I reference otherwise not all the jars get copied over into WEB-INF/lib. Dependent projects each have their own different ways of referencing jars and I can’t change that.
Riyad KallaMemberThen there is no workaround I can offer you for this issue right now. I will try and bump the priority on filtering to address this, but it will be up to management to prioritize it.
Aaron DigullaMemberMy solution was to put all necessary JARs into webapp/WEB-INF/lib directly and to disable the deployment of any other JAR. This way, I have exact control over what gets deployed and what isn’t.
Another solution would be to collect all JARs you don’t want to deploy in an external project (which exists just for this purpose) and disable the deployment for JARs references from other projects.
Put all the other JARs into a User Library (or the other way round, whatever is more simple).
Riyad KallaMemberdigulla,
This is a good solution to the issue, I’m also pushing to get deployment filtering in 5.0, but no word yet if it will make it. -
AuthorPosts