Thoughts: - It's easier to have development use tools and libraries that aren't used in production (like JUnit and JBehave) then it is to have behavior/test code use Java 5 language features, while the production code is restricted to Java 1.4 features. I think it can be done in most IDEs, but the projects have to be set up just right to allow Generics (Java 5 syntax) in the behavior/test source code, but restrict the production source code to Java 1.4 syntax.
+ JUnit 4 requires Java 5. And hamcrest requires Java 5. And most of your users must be early adaptors anyway, so that agues in favor of requiring Java 5 for JBehave. - Perhaps one could consider Java 1.4 implementations of Matcher functionality -- like jMock's constraint library. (Or maybe we could have it all -- integration with all relevant third party constraint libraries! ;-) ----- Original Message ----- From: Dan North To: [email protected] Sent: Wednesday, July 25, 2007 5:10 PM Subject: [jbehave-dev] JBehave moving to java 5? (was Splitting UsingMatchers) So, here's my thinking. Runtime frameworks (xstream, sitemesh, objenesis, ...)* are governed by what operations people are prepared to support in a production environment. This usually means they are several JRE versions behind, because ops people are notoriously conservative about upgrading things. Development frameworks (jmock, hamcrest, ...)* can be more adventurous because they don't have an impact on the production environment, just the developer setup. JBehave falls into this latter category, so I'm less worried about having it depend on Java 5. We could do this in stages as Mauro suggests, by having some extensions that use (and require) java 5 and others - and the core - that are still 1.4 compliant. Or we can bite the bullet - given that jbehave currently has a relatively small user base (I'm assuming here, based on the list traffic) - and move to 1.5. This would give us an opportunity to review the codebase and see where generics and annotations might help make jbehave more expressive. Plus we get hamcrest for free. What do you guys think? (Subject of course to consulting with that user base :) Cheers, Dan * That bloody Joe Walnes gets everywhere.
