Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 62834 invoked from network); 5 Jan 2009 16:10:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jan 2009 16:10:02 -0000 Received: (qmail 82626 invoked by uid 500); 5 Jan 2009 16:10:02 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 82610 invoked by uid 500); 5 Jan 2009 16:10:02 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 82601 invoked by uid 99); 5 Jan 2009 16:10:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jan 2009 08:10:02 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jan 2009 16:09:53 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E19732388988; Mon, 5 Jan 2009 08:09:31 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r731605 - in /db/derby/code/trunk: ./ java/build/org/apache/derbyPreBuild/ java/testing/ java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/ tool... Date: Mon, 05 Jan 2009 16:09:31 -0000 To: derby-commits@db.apache.org From: rhillegas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090105160931.E19732388988@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhillegas Date: Mon Jan 5 08:09:30 2009 New Revision: 731605 URL: http://svn.apache.org/viewvc?rev=731605&view=rev Log: DERBY-3985: Replace BUILDING.txt with a simpler BUILDING.html which reflects recent changes to the Derby build. Added: db/derby/code/trunk/BUILDING.html (with props) Removed: db/derby/code/trunk/BUILDING.txt Modified: db/derby/code/trunk/java/build/org/apache/derbyPreBuild/PropertySetter.java db/derby/code/trunk/java/testing/README.htm db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/README.html db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml db/derby/code/trunk/tools/release/build.xml Added: db/derby/code/trunk/BUILDING.html URL: http://svn.apache.org/viewvc/db/derby/code/trunk/BUILDING.html?rev=731605&view=auto ============================================================================== --- db/derby/code/trunk/BUILDING.html (added) +++ db/derby/code/trunk/BUILDING.html Mon Jan 5 08:09:30 2009 @@ -0,0 +1,541 @@ + + + + + +Building Derby + + + + + + + + + + + +
Derby Hat

Building Derby

+ + + + +



+

About This Document

+ +

+These are the instructions for building the Derby jar files +from the Derby sources. +

+ +



+

Downloads

+ +

+Before building Derby, you need to download the following: +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
PrerequisiteDescription
Derby Source +If you are reading these instructions, chances + are you have already unpacked a Derby source distribution. However, + if you don't have the Derby source yet, get the development source tree from subversion by following these + instructions. +
Java Development KitYou need to install a Java 5 or later JDK. Probably, your machine + already has this JDK. If not, Sun and IBM supply free Java + 5 JDKs for many machines.
AntYou need to install the Ant build tool, version 1.7.0 or + higher. You can get Ant here.
+ +
+ +

+If you are going to run the Derby tests, then you will need to download the JUnit +test harness also: +

+ + + + + + + + + + + + + + + +
PrerequisiteDescription
JUnitYou need the JUnit test tool, version 3.8.1. + You can get JUnit 3.8.1 here. + Copy junit.jar jar into your Derby source tree, in the + tools/java directory. +
+ +
+



+

Simple Build

+ +

+Before building Derby, cd +to the root of your Derby source distribution. That is the top level +directory which contains the LICENSE and NOTICE files. In addition, +make sure that the version of Java which you are using is Java 5 or +later. You can verify this by checking the output of the following command: +

+ +
+

+java -version
+
+
+ +

+Now use the following Ant targets to build Derby.: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
TargetDescriptionCommand
clobberThis target deletes all build artifacts. +
+

+ant -quiet clobber
+
+
+
buildsourceThis target compiles all source files needed for the Derby + product. Don't be alarmed by all of the compiler warnings. We'll + show you how to tidy those up later on. + +
+

+ant -quiet buildsource
+
+
+
buildjarsThis target builds the Derby jar files. +
+

+ant -quiet buildjars
+
+
+
+ +
+

+So, do this: +

+ +
+

+ant -quiet clobber
+ant -quiet buildsource
+ant -quiet buildjars
+
+
+ +

+In order to build the Derby javadoc, you will need to run another target: +

+ + + + + + + + + + + + + + + + + +
TargetDescriptionCommand
javadocThis target builds the Derby javadoc. Be patient. The + javadoc target takes a while. +
+

+ant -quiet javadoc
+
+
+
+ +
+ +
+
+

Verifying the Build

+ +

+Run the sysinfo command to verify that the jars built +correctly. This program will print out the Derby build information: +

+ +
+

+java -jar jars/sane/derbyrun.jar sysinfo
+
+
+ +
+

Testing Derby

+ +

+If you want to build and run the Derby tests, make sure that you have downloaded +the +JUnit +test framework. Then build all of the Derby sources, including the test classes: +

+ + + + + + + + + + + + + + + + + +
TargetDescriptionCommand
allThis target compiles all Derby source files. +
+

+ant -quiet all
+
+
+
+ +

+Putting all of this together, here's how you build the tests: +

+ +
+

+ant -quiet clobber
+ant -quiet all
+ant -quiet buildjars
+
+
+ +

+To run the tests, consult the testing +README. +

+ +
+ +



+

Customized Build

+ +

+You can customize the Derby build by setting variables in a file +called ant.properties. The Ant tool looks for this file in your +home directory. To find out where Ant thinks your home directory is, +issue the following command and look for "user.home" in the output: +

+ +
+

+ant -diagnostics
+
+
+ +
+

+Here are some Derby-specific variables which you may want to set in ant.properties: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
VariableDescriptionDefaultExample
deprecationTurn this flag off if you don't want to see pages of + warnings generated when the compiler encounters references to + deprecated methods.
on
+
+

+deprecation=off
+
+
+
saneBy default, this variable is set to true. This builds + extra assertion and debugging logic into Derby classes. If you + set this variable to false, then the Derby jar files will be + smaller and Derby will run faster. During typical development, + you will leave this variable set to true. However, this + variable is set to false when building official Derby releases.
true
+
+

+sane=false
+
+
+
+ +
+
+
+ +

Advanced Build

+ +

+Derby is supposed to run in all of the following environments: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformJDBC Level
Java 6JDBC 4
Java 5JDBC 3
JDK 1.4.2JDBC 3
Small Device (CDC/FP 1.1)JSR169
+ +
+

+The default Derby build does NOT necessarily verify that the compile-time contract is +satisifed for any of these platforms. To get compile-time checks, you +need to make sure that the following variables are set correctly. To +see the values which the Derby build uses for these variables, build +Derby after setting the +following debug variable in your ant.properties: +

+ +
+

+printCompilerProperties=true
+
+
+ +
+

+Here are the variables which determine whether the Derby build +enforces compile-time contracts for the supported platforms: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformCompiler VariableDescriptionDefault Value
Java 6java16compile.classpathIf you have a Java 6 JDK on your machine, this should be the list of all the + Java 6 jars. Sun and IBM provide free Java 6 JDKs for many machines.classes/stubs/jdbc4:${java15compile.classpath}
Java 5java15compile.classpathThe Derby build tries to find a Java 5 + JDK on your machine. The build fails if it can't find this JDK.The jars in your Java 5 JDK.
JDK 1.4.2java14compile.classpathThe Derby build tries to find a 1.4 JDK + on your machine. If the build finds that JDK, then this + variable is set to the list of jars there. Again, Sun and IBM supply free 1.4.2 JDKs for many machines.The list of jars in your 1.4 JDK if the build can find + them. Otherwise, + ${java15compile.classpath}:tools/java/xalan.jar:tools/java/serializer.jar +
Small Device (CDC/FP 1.1)jsr169compile.classpathThis should be set to the list of small device libraries on + your machine--if you have them. That is, the CDC/FP 1.1 jars and + the jsr169 jar. To get a set of small device libraries, see + Sun's instructions + or download IBM's WCTME 5.7. + classes/stubs/jsr169:${java14compile.classpath}
+ +

+The preceding variables are mandatory for the Derby build. +For Mac OS X, Solaris, and many Linux and IBM machines, Derby +can figure out where the JDKs live and can therefore set the +preceding variables to reasonable values if you don't set them. For +other platforms, the Derby build may not be able to figure out where the JDKs +live. You can help the Derby build by setting the following optional +variables in ant.properties: +

+ + + + + + + + + + + + + + + + + + + + + + + +
Compiler VariableDescriptionDefault Value
j14libIf you set this variable to be the directory which contains + your 1.4 jars, then the Derby build will set + java14compile.classpath to be the list of jars in that directory. + Optional variable. No default value.
j145ibIf you set this variable to be the directory which contains + your Java 5 jars, then the Derby build will set + java15compile.classpath to be the list of jars in that directory. + Optional variable. No default value.
+ +
+ +



+ + + Propchange: db/derby/code/trunk/BUILDING.html ------------------------------------------------------------------------------ svn:eol-style = native Modified: db/derby/code/trunk/java/build/org/apache/derbyPreBuild/PropertySetter.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyPreBuild/PropertySetter.java?rev=731605&r1=731604&r2=731605&view=diff ============================================================================== --- db/derby/code/trunk/java/build/org/apache/derbyPreBuild/PropertySetter.java (original) +++ db/derby/code/trunk/java/build/org/apache/derbyPreBuild/PropertySetter.java Mon Jan 5 08:09:30 2009 @@ -720,7 +720,7 @@ appendProperty( buffer, OPERATING_SYSTEM ); appendProperty( buffer, J14LIB ); appendProperty( buffer, J15LIB ); - buffer.append( "\nPlease consult BUILDING.txt for instructions on how to set the jdk-library and compiler-classpath properties." ); + buffer.append( "\nPlease consult BUILDING.html for instructions on how to set the compiler-classpath properties." ); return new BuildException( buffer.toString() ); } Modified: db/derby/code/trunk/java/testing/README.htm URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/README.htm?rev=731605&r1=731604&r2=731605&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/README.htm (original) +++ db/derby/code/trunk/java/testing/README.htm Mon Jan 5 08:09:30 2009 @@ -167,7 +167,7 @@

In the following the top directory under which the subversion tree is placed is referred to as ${derby.source} - see also the derby BUILDING.txt.

+ href="http://svn.apache.org/repos/asf/db/derby/code/trunk/BUILDING.html">BUILDING.html.

The version of the classes and supporting files of the derbyTesting package have to match the version of the classes of the derby package. Thus you either need to build all jars yourself, or @@ -802,7 +802,7 @@

  • follow all the steps in the derby BUILDING.txt. + href="http://svn.apache.org/repos/asf/db/derby/code/trunk/BUILDING.html">BUILDING.html.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/README.html URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/README.html?rev=731605&r1=731604&r2=731605&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/README.html (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/README.html Mon Jan 5 08:09:30 2009 @@ -32,11 +32,6 @@

-Before running these tests, you must first build the optional jkd16 -support as described in trunk/BUILDING.txt. -

- -

Verifying the JDBC4 feature set is a little tiresome right now. You must run the following commands in a shell window whose JAVA_HOME points at your jdk1.6 installation. After each suite run, check the test results. Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml?rev=731605&r1=731604&r2=731605&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/junitTests/compatibility/testScript.xml Mon Jan 5 08:09:30 2009 @@ -34,8 +34,8 @@ This script assumes that you have set the following variables in the ant.properties file in your user home directory: - j13lib Set as you would to compile Derby (see trunk/BUILDING.txt). - j14lib Set as you would to compile Derby (see trunk/BUILDING.txt). + j13lib The library directory of your 1.3 JRE + j14lib The library directory of your 1.4 JRE jdk15 The JAVA_HOME of your 1.5 vm. jdk16 The JAVA_HOME of your 1.6 vm. Modified: db/derby/code/trunk/tools/release/build.xml URL: http://svn.apache.org/viewvc/db/derby/code/trunk/tools/release/build.xml?rev=731605&r1=731604&r2=731605&view=diff ============================================================================== --- db/derby/code/trunk/tools/release/build.xml (original) +++ db/derby/code/trunk/tools/release/build.xml Mon Jan 5 08:09:30 2009 @@ -38,7 +38,7 @@ - +