| ASF |
#490608 |
Thu Dec 28 00:05:28 UTC 2006 |
rahul |
Allow building shale-test with JDK 1.4 (important as most of framework depends on it). With the JSF 1.2 bits coming in place for shale-test, the Java EE 5 artifacts (JSF 1.2, Servlet 2.5, JSP 2.1 jars) that are pulled in are built with JDK 1.5, causing compilation (and thus, build) failures on JDK 1.4 (as expected).
Therefore, introduce two profiles in the shale-test pom (correct one gets activated automagically based on JDK version in use, so nothing needs to be done at the mvn command).
The shale-test-jdk14 profile depends on {myfaces-API-1.1.4,servlet 2.4,JSP 2.0} and excludes the sources that use Java EE 5 APIs. Thus, when built on JDK 1.4, the shale-test jar caters only to JSF 1.1 users.
The shale-test-jdk15 profile depends on {JSF-1.2_02,servlet 2.5,JSP 2.1} (and excludes nothing).
As a side-effect, when using the mock factories with a jar built with JDK 1.4, trying to load the JSF 1.2 classes may fail with a ClassNotFoundException (since the classes never get built in the first place). Code now accomodates for that.
Finally, this does introduce one additional thing to maintain. shale-test developers need to keep the exclusions in the 1.4 profile updated to this can continue to work beyond v1.0.4 (until we decide to drop JDK 1.4 support).
With this change, 'mvn -Papps install' from framework trunk works for me with JDK 1.4.
SHALE-375
|