MyEclipse: incorrect deployment with scope=provided msquared - Feb 16, 2012 - 01:54 PM Post subject: incorrect deployment with scope=provided
MyEclipse 10.0.1 does not correctly deploy specific libraries when scope=provided.
Here is a reproducible test case:
1) start with a clean install of MyEclipse 10.0.1 (should not matter but I use linux 64 bit)
2) launch into a brand new workspace
3) create a new WebProject and check Add Maven support with all other settings per default .notice that the generated pom.xml contains 3 dependencies, all scope=provided
4) now deploy this to the integrated MyEclipseTomcat server (the same bug occurs regardless of exploded or packaged archive).
5) browse the deployment location (workspace/.metatdata/.me_tcat/webapps/MyProject/WEB-INF/lib) and observe that jstl-1.2.jar is there. That is incorrect, as the pom shows this is scope=provided. Observe that the other 2 dependencies (javaee-api and jsp-api) are NOT there which fortunately is correct, but inconsistent.
So there you have it. A bug with dependencies if scope=provided that is specific to only certain libraries but not others.
Running mvn dependency:tree confirms all 3 libraries definitely have scope=provided.
Maven of course does not deploy any libraries where scope=provided.
Then I started playing around with different maven coordinates groupId:archiveId:versionId to see why only javax.servlet:jstl:1.2 encounters the bug.
I observed that if I move this exact jar to a different groupId or archiveId the bug goes away (jar is NOT deployed). However if I change only the version the bug remains.
This bug also seems to affect javax.faces:jsf-api:anyversion and javax.faces:jsf-impl:anyversion.
Those were the only specific ones I noticed, but there may be others !
Can you help fix this?
I can workaround it by moving the affected jars from their standard maven coordinates to a different location such as
<dependency>
<groupId>javax.servlet.myeclipse-bug</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>support-swapna - Feb 17, 2012 - 06:09 AM Post subject:
msquared ,
Thank you for the detailed steps. I could replicate the issue at my end. I have filed a PR for the dev team to work on it.
Sorry for any inconvenience caused.msquared - Mar 17, 2012 - 12:38 PM Post subject:
1 month later: any updates?msquared - Apr 03, 2012 - 11:31 PM Post subject: still broken in 10.1
Just to be sure this stays on your ACTIVE list of bugs, the issue remains in the most recent 10.1 release. The test case I provided (now 7 weeks ago) still reproduces the same defect in 10.1Support-Brian - Apr 04, 2012 - 11:47 PM Post subject:
msquared,
Sorry for the delayed response.
This issue is caused by the fact that we have some server specific settings which force the deployment of certain libraries to some servers (even though they are typically of a "provided" nature - both with and without Maven). This is because some servers like Tomcat 6 for instance typically do not include JSTL while most others do. There is an internal setting that will force the deployment of this library to Tomcat 6 (and a few other servers) while it will typically not deploy this container to most other servers, even if it is on the classpath.
The issue here is that this "override" setting takes precedence over even the Maven deployment settings. You will find that the bug is not reproducible with a server like JBoss for instance or most other libraries (we have these settings only for JSTL and a couple of JSF JARs).
Thank you for highlighting the problem, my team is working on a fix for this in our next release; due to the nature of the changes required, it was not viable to put the change into 10.1. Sorry for the inconvenience caused, please let me know if you need further clarifications or assistance.Support-Brian - Jun 04, 2012 - 11:10 AM Post subject:
I wanted to update everyone on how we'll be handling this issue.
1) This issue is specific only to Tomcat 6, TC Server 6, MyEclipse Tomcat, Jetty 6 and Jetty 7. Furthermore, it will only occur for the jsf-api, jsf-impl and the jstl JAR files. For all other servers or other dependencies, the provided scope is respected and the JARs are not deployed.
2) For MyEclipse 10.5, we will not be making any changes in this area due to legacy concerns and will be pushing these changes to MyEclipse 11 instead. In MyEclipse 11, the provided scope will be respected at all times, with the only possible exception being MyEclipse Tomcat. MyEclipse Tomcat will be based on Tomcat 7 instead of Tomcat 6 and we will evaluate whether the provided-override is still required.
A possible workaround for now would be to use a Tomcat 7 server instead of a Tomcat 6 server where the override is not currently present.msquared - Jun 05, 2012 - 01:32 PM Post subject:
got it, thanks for the update.