Issue Details (XML | Word | Printable)

Key: SHALE-375
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Rahul Akolkar
Reporter: Rahul Akolkar
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Shale

Framework should build on JDK 1.4

Created: 27/Dec/06 08:50 PM   Updated: 23/Jan/07 04:40 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0.4


 Description  « Hide
'mvn -Papps install' on JDK 1.4 should result in a successful build.


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #490583 Wed Dec 27 22:43:44 UTC 2006 rahul Remove shale-tiger from parent pom <modules>. This allows skipping it on JDK 1.4 (it gets picked up by the JDK 1.5 activated profile when on 1.5).
SHALE-375
Files Changed
MODIFY /shale/framework/trunk/pom.xml

Repository Revision Date User Message
ASF #490596 Wed Dec 27 23:28:48 UTC 2006 rahul JDK 1.4 compat, towards 'mvn -Papps install' on 1.4.
SHALE-375
Files Changed
MODIFY /shale/framework/trunk/shale-apps/shale-usecases/src/test/java/org/apache/shale/usecases/systest/TokenTestCase.java

Repository Revision Date User Message
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
Files Changed
MODIFY /shale/framework/trunk/shale-test/src/main/java/org/apache/shale/test/mock/MockApplicationFactory.java
MODIFY /shale/framework/trunk/shale-test/pom.xml
MODIFY /shale/framework/trunk/shale-test/src/main/java/org/apache/shale/test/mock/MockFacesContextFactory.java