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

Rick Hillegas updated DERBY-5485:
---------------------------------

    Attachment: derby-5485-01-af-simplifyPlusJavadoc.diff

Attaching derby-5485-01-af-simplifyPlusJavadoc.diff. This patch simplifies 
PropertySetter as described above. PropertySetter still achieves goals (1) and 
(2) but abandons goal (3).

I have successfully compiled the Derby code and built the javadoc in the 
following environments:

o Oracle JDK 6 and 7 on Mac OS X

o Oracle JDK 6 and 7 on Ubuntu

o IBM JDK 6 and 7 on Ubuntu

I would appreciate test-drives from people who build on the following 
platforms. Thanks!

o Oracle JDKs on Solaris

o Oracle JDKs on Windows

o IBM JDKs on Windows

The patch involves a wholesale revamping of PropertySetter:

a) Support for JDK 1.4 is removed because 10.9 does not support that platform.

b) PropertySetter still tries to set the java${version}compile.classpath 
properties from the j${version}lib properties where ${version} is 15, 16, and 
17.

c) PropertySetter also tries to set java${version}compile.classpath where 
${version} is the version of the currently executing JVM. This is done by 
wiring together all of the jar files in the directories which contain the jars 
which contain java.lang.String and java.util.Vector.

d) However, PropertySetter does NOT try to set java${version}compile.classpath 
if j${version}lib is not set and if ${version} is not the version of the 
currently executing JVM.

In addition, this patch changes the master build script as follows:

e) References to j14lib and java14compile.classpath are removed. If not set, 
the jsr169compile.classpath is set based on java15compile.classpath rather than 
java14compile.classpath.

f) java16compile.classpath is removed from the classpath of the derbydocs 
target so that the javadoc build will work with IBM JDK 7.

In addition, this patch removes all other references to java14compile.classpath 
in the other subordinate build scripts. I did not also change the source and 
target rev levels of the affected targets. Those targets still require source 
and target to be 14 rather than 15. Changing the source and target rev levels 
results in many "unchecked exception" warnings. These can probably be 
suppressed but the right solution might be to actually fix the Derby code. That 
effort falls outside the scope of this JIRA. Until the source and target rev 
levels are changed, we will not be able to use Java 5 language features in the 
code compiled by the affected targets.

Touches the following files:

----------------

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

Revamps this task as described above.


----------------

M       java/tools/org/apache/derby/impl/tools/build.xml
M       java/storeless/build.xml
M       java/demo/toursdb/build.xml
M       java/demo/build.xml
M       java/engine/org/apache/derby/impl/jdbc/build.xml
M       java/engine/org/apache/derby/impl/services/build.xml
M       java/engine/org/apache/derby/impl/io/build.xml
M       java/engine/org/apache/derby/impl/store/build.xml
M       java/engine/org/apache/derby/osgi/build.xml
M       java/engine/org/apache/derby/iapi/jdbc/build.xml
M       java/engine/org/apache/derby/iapi/services/crypto/build.xml
M       java/engine/org/apache/derby/iapi/types/build.xml
M       java/engine/org/apache/derby/iapi/store/build.xml
M       java/engine/org/apache/derby/iapi/reference/build.xml
M       java/engine/org/apache/derby/jdbc/build.xml
M       java/engine/org/apache/derby/vti/build.xml
M       java/shared/build.xml
M       java/drda/org/apache/derby/impl/drda/build.xml
M       java/drda/org/apache/derby/drda/build.xml
M       java/testing/org/apache/derbyTesting/unitTests/build.xml
M       java/testing/org/apache/derbyTesting/system/nstest/build.xml
M       java/testing/org/apache/derbyTesting/system/optimizer/build.xml
M       java/testing/org/apache/derbyTesting/system/oe/build.xml
M       java/testing/org/apache/derbyTesting/system/mailjdbc/build.xml
M       java/testing/org/apache/derbyTesting/system/sttest/build.xml
M       java/testing/org/apache/derbyTesting/functionTests/tests/i18n/build.xml
M       java/testing/org/apache/derbyTesting/functionTests/tests/lang/build.xml
M       
java/testing/org/apache/derbyTesting/functionTests/tests/largedata/build.xml
M       
java/testing/org/apache/derbyTesting/functionTests/tests/replicationTests/build.xml
M       
java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/build.xml
M       java/testing/org/apache/derbyTesting/functionTests/tests/perf/build.xml
M       java/testing/org/apache/derbyTesting/functionTests/tests/store/build.xml
M       java/testing/org/apache/derbyTesting/functionTests/tests/tools/build.xml
M       
java/testing/org/apache/derbyTesting/functionTests/tests/memory/build.xml
M       
java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/build.xml
M       
java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/build.xml
M       
java/testing/org/apache/derbyTesting/functionTests/tests/derbynet/build.xml
M       
java/testing/org/apache/derbyTesting/functionTests/tests/memorydb/build.xml
M       java/testing/org/apache/derbyTesting/functionTests/harness/build.xml
M       java/testing/org/apache/derbyTesting/functionTests/util/build.xml
M       java/testing/org/apache/derbyTesting/junit/build.xml
M       java/testing/org/apache/derbyTesting/perf/build.xml
M       java/client/build.xml
M       build.xml

Removes java14compile.classpath references as described above.

----------------

M       BUILDING.html

Removes references to JDK 1.4 from this summary document.

                
> Simplify PropertySetter so that it is less brittle and easier to maintain.
> --------------------------------------------------------------------------
>
>                 Key: DERBY-5485
>                 URL: https://issues.apache.org/jira/browse/DERBY-5485
>             Project: Derby
>          Issue Type: Improvement
>          Components: Build tools
>    Affects Versions: 10.9.0.0
>            Reporter: Rick Hillegas
>         Attachments: derby-5485-01-af-simplifyPlusJavadoc.diff
>
>
> The PropertySetter task sets up classpath variables so that the build can 
> take advantage of JVM-specific class libraries. Using those libraries makes 
> it possible for the compiler to flag code which is supposed to run on less 
> capable platforms but which calls methods from later JVMs. This is a very 
> tricky problem and we seem to have reached consensus that it requires too 
> much effort to make PropertySetter run correctly in all of the build 
> environments which Derby developers use. I will attach a proposal for how to 
> simplify PropertySetter so that it requires less effort to maintain.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to