[Building Sakai] Requiring JDK 7 for building/running Sakai 11?

Matthew Jones matthew at longsight.com
Thu Feb 20 09:45:49 PST 2014


Well, less about having 2 jars available and more that you need either
completely different source files to support the interface changes or just
two different branches. (Though I guess they're both problems)

So you'd have the have a pom that uses the build-helper-maven-plugin. The
only project that I know of in Sakai that uses this is Lessons. So someone
would have to write that for genericdao and anything else that needs that
level of backward JDK (or Sakai) compatibility. And then have a system with
both Java 7 and Java 6 installed and build jars off of both (since Java 7
can't build the Java 6 jar for this project0)

https://source.sakaiproject.org/svn/lessonbuilder/trunk/tool/pom.xml

Maybe it's the only case that we have in Sakai. I know DBCP had this issue
too, and probably older versions of DBCP don't compile on Java 7 either.


On Thu, Feb 20, 2014 at 12:31 PM, Matthew Buckett <
matthew.buckett at it.ox.ac.uk> wrote:

> On 20 February 2014 17:21, Matthew Jones <matthew at longsight.com> wrote:
>
>> As a related issue, I know of one thing that would make our code
>> non-backward compatible with 1.6, but that's in genericdao and not in the
>> core. You can't compile that right now in Java 7 because there was a change
>> to the interface in java.sql which is not backward compatible.
>>
>
> [..snipped..]
>
> (Issue in Java 7 with java.sql)
>>
>> *Area:* API: JDBC
>> *Synopsis:* New JDBC Methods, Including new Methods in Interfaces
>> *Description:* For the Java SE 7 release, there are new methods to
>> support JDBC 4.1. This includes methods added to the java.sql.Connection
>> , java.sql.Driver,javax.sql.CommonDatasource, and java.sql.Statement interfaces.
>> Because all methods of an interface must be implemented, previous code that
>> uses these interfaces will not compile on Java SE 7 unless you add the new
>> methods. See the JDBC documentation for more information.
>> *Nature of Incompatibility:* source
>> *RFE:* 6589685<http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6589685>
>>
>
> search-test used profile based activation to build different code based on
> the JDK being used if you then use an maven classifier you can have the
> same project build one output for JDK1.6 and one for JDK 1.7.
>
>
> http://stackoverflow.com/questions/3092085/building-same-project-in-maven-with-different-artifactid-based-on-jdk-used
>
>
> --
>   Matthew Buckett, VLE Developer, IT Services, University of Oxford
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20140220/ea430eee/attachment.html 


More information about the sakai-dev mailing list