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
Wendy Smoak added a comment - 27/Dec/06 08:59 PM
The build itself (not the Shale code) may require JDK 1.5. At one point the taglib plugin would not work on JDK 1.4. I'm not sure if it's been released since this was fixed.

   http://sourceforge.net/tracker/index.php?func=detail&aid=1483561&group_id=93991&atid=606303

The compiler plugin is configured to target 1.4 (except for a few modules) so it should be fine in any case.

Rahul Akolkar added a comment - 27/Dec/06 09:11 PM
Thanks for the feedback. The <reporting> bits are not as important from my perspective. I'm OK if the site doesn't build or the release related plugins (javadoc, source etc.) are tuned for 1.5, but I'd like to be able to locally install JDK 1.4 built binaries. This is useful since most of the app servers I can use are still pegged at 1.4 (and I'd like to build with 1.4 as such).

To give some examples to the kind of stuff I'd like to do with this ticket:
 * Remove shale-tiger from parent <modules> (seems a mistake, its already in the JDK 1.5 activated profile)
 * Conditional compile shale-test bits (shale-test depends on Java EE 5 bits, which hoses JDK 1.4 compat). I plan to drop in two JDK activated profiles so when built on 1.4 shale-test will only cater to the JSF 1.1 crowd.

I plan to finish this today, lets see.

Rahul Akolkar added a comment - 27/Dec/06 09:13 PM
I should add that shale-test is well-designed to gracefully fall back on JSF 1.1 bits if 1.2 is not present (just that there is no way to do a 'mvn install' using JDK 1.4 ATM, which I plan to look into now).


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

Rahul Akolkar added a comment - 28/Dec/06 12:11 AM
'mvn -Papps install' in framework trunk works on JDK 1.4 (obviously, modules/apps requiring JDK 1.5 or Java EE 5 are not built in such a scenario).

Rahul Akolkar made changes - 28/Dec/06 12:11 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Rahul Akolkar made changes - 23/Jan/07 04:40 PM
Fix Version/s 1.0.4-SNAPSHOT [ 21740 ]
Fix Version/s 1.0.4 [ 21790 ]
Jeff Turner made changes - 09/Aug/07 07:15 AM
Workflow Struts [ 39078 ] Struts - editable closed status [ 41655 ]
Antonio Petrelli made changes - 08/Jan/09 08:56 AM
Workflow Struts - editable closed status [ 41655 ] Struts - editable closed status (temporary) [ 46005 ]
Antonio Petrelli made changes - 08/Jan/09 09:08 AM
Workflow Struts - editable closed status (temporary) [ 46005 ] Struts - editable closed status [ 52695 ]