Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 308916

Summary: Add Tomcat 7 support to WTP ServerTools
Product: [WebTools] WTP ServerTools Reporter: Larry Isaacs <larryisaacs>
Component: jst.serverAssignee: Larry Isaacs <larryisaacs>
Status: CLOSED FIXED QA Contact: Angel Vera <arvera>
Severity: enhancement    
Priority: P3 CC: david_williams, raghunathan.srinivasan
Version: 3.2Keywords: plan
Target Milestone: 3.2 M7Flags: david_williams: pmc_approved+
raghunathan.srinivasan: pmc_approved?
arvera: pmc_approved? (naci.dai)
arvera: pmc_approved? (deboer)
arvera: pmc_approved? (neil.hauge)
arvera: pmc_approved? (kaloyan)
arvera: review+
Hardware: All   
OS: All   
See Also: https://git.eclipse.org/r/108917
https://git.eclipse.org/r/108918
https://git.eclipse.org/r/108930
https://git.eclipse.org/r/109825
https://git.eclipse.org/c/servertools/webtools.servertools.git/commit/?id=27522dc5d94441ffdec233cdf0d76ef067180d23
Whiteboard: PMC_approved
Attachments:
Description Flags
Initial implementation for Tomcat 7 support none

Description Larry Isaacs CLA 2010-04-12 14:40:32 EDT
Tomcat 7 releases are due to start soon.  It would be very desirable to include support for Tomcat 7 in WTP 3.2.  This would help avoid the confusion that will result when users discover that the Tomcat 6 support can't currently tell Tomcat 7 from Tomcat 6 unless the directory containing the Tomcat installation includes the version number.  I have new code implemented that will be able to tell the difference regardless of the directory name.  At the moment, I'm investigating what the impact of supporting Web Fragment projects, which Tomcat 7 should support.

From a UI perspective, the appearance of a Tomcat 7 server type shouldn't cause any confusion.  I will also avoid questions on the WTP newsgroup about when such support is coming.
Comment 1 Larry Isaacs CLA 2010-04-13 16:24:56 EDT
Created attachment 164778 [details]
Initial implementation for Tomcat 7 support

This patch includes the bulk of the changes for the Tomcat 7 support.  Not included are some minor changes to support Web Fragment projects.  Those changes are intertwined with changes for supporting the features of the Module Assembly project properties page (utility projects don't have to go in WEB-INF/lib) and Bug 306732, and affect all versions of Tomcat support.  Also, the custom jar to support the "Serve Modules Without Publishing" option for Tomcat 7 is not included.
Comment 2 Larry Isaacs CLA 2010-04-14 10:01:37 EDT
PMC Review requested due to UI change.

1. Explain why you believe this is a stop-ship defect.

Not technically stop-ship, but very desirable to add Tomcat 7 support in 3.2 than in a 3.2 maintenance or waiting a year for the next version of WTP.  The presence of a Tomcat 7 choice among the current Tomcat choices isn't likely to cause any confusion.
 
2. Is there a work-around? If so, why do you believe the work-around is insufficient?

Technically, there is a work-around by using the Tomcat 6.0 support to create a Tomcat 7 runtime and server.  However, this is a rather complicated and potentially confusing workaround that I consider impractical to use for most users.  It is less effort to add this support now, than to deal with users asking "where is the Tomcat 7 support?" and trying to explain that workaround.

3. How has the fix been tested?

This is being tested in my development environment.  I will also be adding a version to the tomcat.core.tests for Tomcat 7.

4. Give a brief technical overview.

Fortunately, the support needed by Tomcat 7 is almost identical to what is already present for Tomcat 6.  It was about 4 hours work to "clone" the Tomcat 6 support and tweak it for Tomcat 7.  Only a handful of new "Tomcat 7" strings are required.  New code is mostly for reading a version string out of Tomcat's catalina.jar so I can more reliably indentify a Tomcat 6 install from a Tomcat 7 install (i.e. doesn't rely on a "version" found in the directory name).

5. What is the risk associated with this fix?

No existing functionality would be impacted.  Since Tomcat 7 is new, the risk that a change in Tomcat the would break the WTP support is a little higher than for the support for more established Tomcat versions.  However, the first Tomcat 7 release candidate was offered today and the vote included the choices of "alpha" through "stable".  This means there won't be any forced "alpha" or "beta" periods and any release could be considered "stable".  I believe this implies that Tomcat 7 is passing the TCK and that this risk isn't that much higher than for the more established Tomcat versions.
Comment 3 Angel Vera CLA 2010-04-14 13:49:00 EDT
This is a change that the community will be happy to see.
Comment 4 Raghunathan Srinivasan CLA 2010-04-14 18:51:45 EDT
Sorry, reverting the earlier approval.  When is Tomcat & going to be released and also please clarify your comment, "I will also avoid questions on the WTP newsgroup about when such support is coming."
Comment 5 Larry Isaacs CLA 2010-04-14 19:14:59 EDT
There is a Tomcat 7 release vote (spans a few days to a week) occurring now on the Tomcat Dev mailing list.  This first release appears likely to be voted "beta" instead of "stable" ("stable" = "ready for general use").  They have these release votes whenever the developers feel its justified.  I think a "stable" Tomcat 7 release will very likely be available before WTP 3.2 ships.  I wouldn't be surprised if one is available by the end of April.  

The "I will also avoid..." should have been "It will also avoid...", my keyboard seems to spontaneously drop keystrokes or rearrange the order sometimes. :)
Comment 6 David Williams CLA 2010-04-15 12:11:36 EDT
Could we handle this as a "remote server adapter"? That way, we could easily have a "beta" version available now, and change it to "released" version once it was released, without having to carefully coordinate with WTP release?
Comment 7 Larry Isaacs CLA 2010-04-15 12:45:24 EDT
I haven't seen any issues that would indicate that the Tomcat 7 support being added to WTP would be "beta".  Because Tomcat 7 is so similar to Tomcat 6, the support code is already well tested.  The issues I'm currently facing, like Bug 306732, affect all versions of Tomcat.  The fact that the Tomcat developers have decided to skip any "trial" period and have gone straight to "is this release stable" type votes indicates they think that Tomcat 7 is close to being ready for general consumption.  There won't be much risk saved for the effort to package this separately.

One decision yet to be made is whether to offer a download for Tomcat 7 on the New Server Runtime Environment page.  I certainly wouldn't offer one in the unlikely event that no "stable" release had yet occurred.  I'm also leaning toward not offering one in the WTP 3.2 release, even if there is a "stable" release.  To have a fixed URL for the download, we have to download from Apache's non-mirrored "archive" server.  It would not be good to have lots of WTP users downloading Tomcat 7 via that mechanism just to try it out.  Better to add that download in a 3.2 maintenance release after those who really want it will have already downloaded it themselves.
Comment 8 David Williams CLA 2010-04-15 12:57:31 EDT
Thanks Larry. I agree this addition would be worthwhile, then.

Other PMC members: feel free to voice other opinions. Raghu, were your questions/concerns answered?
Comment 9 Angel Vera CLA 2010-04-20 17:06:11 EDT
Larry, 
It looks like this changes are already in. Assuming there is nothing else missing, can you mark this defect as fix/resolved
Comment 10 Larry Isaacs CLA 2010-04-20 17:26:57 EDT
The Tomcat 7 support has been committed to HEAD.

I was reluctant to mark this one fixed until I had a better handle on Bug 306732, in case I needed some more changes that were specific to Tomcat 7.  I've committed some initial changes for Bug 306732, so I'm fine marking this one fixed.  Any further issues are likely to be covered by that bug.
Comment 11 Larry Isaacs CLA 2010-05-13 10:43:10 EDT
Verified the basic Tomcat 7 support is present and working in WTP 3.2M7 and subsequent builds.
Comment 12 Larry Isaacs CLA 2010-05-13 10:43:21 EDT
Closing.
Comment 13 Eclipse Genie CLA 2017-10-11 16:32:25 EDT
New Gerrit change created: https://git.eclipse.org/r/108917
Comment 14 Eclipse Genie CLA 2017-10-11 16:32:31 EDT
New Gerrit change created: https://git.eclipse.org/r/108918
Comment 15 Eclipse Genie CLA 2017-10-11 16:32:57 EDT
New Gerrit change created: https://git.eclipse.org/r/108930
Comment 16 Eclipse Genie CLA 2017-10-11 16:53:45 EDT
New Gerrit change created: https://git.eclipse.org/r/109825