[ 
https://issues.apache.org/jira/browse/DERBY-3989?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-3989:
---------------------------------

    Attachment: derby-3989-01-aa-optionalJava5.diff

Attaching derby-3989-01-aa-optionalJava5.diff. This patch makes it possible to 
build Derby using just the Derby sources and a Java 6 compiler. This patch 
makes the following changes:

1) If j16lib is set, PropertySetter sets java16compile.classpath from j16lib. 
If j16lib is not set, PropertySetter looks for a Java 6 JDK and sets 
java16compile.classpath to be the list of jars in the Java 6 library directory.

2) However, PropertySetter does not try to set java16compile.classpath if the 
compiler is an IBM Java 5 compiler. This is because the IBM Java 5 compiler 
raises version mismatch errors when it pulls in Java 6 libraries.

3) If, at the end, neither java15compile.classpath nor java16compile.classpath 
is set, PropertySetter aborts the build.

4) If PropertySetter could not set java15compile.classpath, then the master 
build script sets java15compile.classpath to be 
${jdbc3stubs}:${java16compile.classpath}.

I have verified that the build runs correctly on the following platforms:

- Mac OS X
- Ubuntu using Sun JDKs
- Ubuntu using IBM JDKs

with the following environments:

a) Java 5 compiler + Java 6 libraries
b) Java 5 compiler - Java 6 libraries
c) Java 6 compiler + Java 5 libraries
d) Java 6 compiler - Java 5 libraries

I would appreciate it if other people could test-drive this patch on their 
machines and report whether the build succeeds in cases (a) through (d).

Thanks!


Touches the following files:

M      java/build/org/apache/derbyPreBuild/PropertySetter.java

Implements (1) - (3).


M      build.xml

Implements (4).


> Set the Java 5 compilation path based on the Java 6 compilation path if a 
> Java 5 environment can't be found but a Java 6 environment can be
> -------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-3989
>                 URL: https://issues.apache.org/jira/browse/DERBY-3989
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.5.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-3989-01-aa-optionalJava5.diff
>
>
> This will make the build even more flexible. Probably involves the following 
> changes:
> 1) Relaxing the requirement in PropertySetter that a Java 5 JDK must exist
> 2) Having PropertySetter look for a Java 6 JDK (and set 
> java16compile.classpath accordingly) just as PropertySetter looks for a Java 
> 5 JDK today
> 3) Changing the setCompilerProperties target in the master build script so 
> that it
>   a) requires that java15compile.classpath or java16compile.classpath is set 
> (it's ok for both to be set)
>   b) sets java15compile.classpath to ${jdbc3stubs}:${java16compile.classpath}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to