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

Bug 283472

Summary: JSF facet does not validate user library version for JSF
Product: [WebTools] Java Server Faces Reporter: Debajit Adhikary <debajit.adhikary>
Component: JSF ToolsAssignee: Cameron Bateman <cameron.bateman>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cameron.bateman, debajit.adhikary, raghunathan.srinivasan
Version: 3.1.1   
Target Milestone: 3.1.1   
Hardware: All   
OS: All   
URL: ORACLE_P1
Whiteboard:
Attachments:
Description Flags
Patch to add library version validation for JSF facet
none
Patch to add JUnits for version validation code none

Description Debajit Adhikary CLA 2009-07-14 18:40:46 EDT
Build ID: I20090605-1444

Steps To Reproduce:

1. Create a new Dynamic Web Project
2. Select the JSF facet, version 1.1
3. In the JSF wizard page, click on the "Download libraries" 
   button to download JSF 1.1
4. Click back till you come back to the wizard page on step (1)
5. Now select JSF facet version 1.2
6. Click next till you arrive at the JSF facet wizard page
7. Select the JSF 1.1 library you downloaded earlier.

The JSF 1.2 facet allows JSF 1.1 libs to be used without any warning (and vice versa). No version validation is done.
Comment 1 Debajit Adhikary CLA 2009-07-14 18:43:54 EDT
Created attachment 141582 [details]
Patch to add library version validation for JSF facet

This patch adds user-library version-validation to the JSF facet. (The patch also includes a generic UserLibraryVersionValidator which may be used by other facets)
Comment 2 Debajit Adhikary CLA 2009-07-15 20:40:38 EDT
Created attachment 141730 [details]
Patch to add JUnits for version validation code

This patch adds JUnits which tests the version validation code (attached in the earlier patch). 

This patch includes the following two jars which are not included in the patch. Please mail me when you are committing this patch so that I can send them to you. 

* org.eclipse.jst.jsf.core.tests/testdata/facet/jars/myfaces-api-1.1.3.jar
* org.eclipse.jst.jsf.core.tests/testdata/facet/jars/no-version-entry/myfaces-api-1.1.3.jar
Comment 3 Cameron Bateman CLA 2009-08-05 21:39:14 EDT
Patches committed to HEAD (3.1.1).
Comment 4 Debajit Adhikary CLA 2009-08-06 14:46:11 EDT
Verified that the JSF facet now correctly validates the user library version for JSF in:

WTP 3.1M Build.
Build Id: M20090729-0903