Skip to content

Commit

Permalink
Fix release issues noted by John Sichi.
Browse files Browse the repository at this point in the history
git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@48 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Dec 2, 2007
1 parent 74efed7 commit 3df918e
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 18 deletions.
36 changes: 29 additions & 7 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ olap4j, release 0.9 (beta)
Contents of this distribution
-----------------------------

This is a binary distribution of olap4j.
This is a distribution of olap4j, the open Java API for accessing OLAP data.
For version information, see VERSION.txt.
For licensing, see LICENSE.html.

Expand Down Expand Up @@ -42,13 +42,33 @@ Building olap4j from source
---------------------------

1. Unzip olap4j-<version>-src.zip.
2. Copy all JAR files from olap4j-<version>/lib to the lib directory in the
source tree.
3. Copy all JAR files from olap4j-<version>/testlib to the testlib directory in
the source tree.
4. Make sure JAVA_HOME is set.
2. Create a lib directory in the root directory of the source tree, and copy
all JAR files from olap4j-<version>/lib into it.
3. Create a testlib directory in the root directory of the source tree, and
copy all JAR files from olap4j-<version>/testlib into it.
4. Set JAVA_HOME to a JDK version 1.5 or 1.6 home, and put $JAVA_HOME/bin
(%JAVA_HOME%\bin for Windows) on your path.
5. In the root of the source tree, run 'ant'.

Building a jar file
-------------------

The above process is sufficient for running tests; however, due to differences
between the versions of JDBC included with JDK 1.5 and JDK 1.6, it produces a
set of class files which will only run on the JDK under which they were built.

To produce a jar file which will work on both versions, you need to use a more
complicated process. The steps are as follows:

1. Install both JDK 1.5 and JDK 1.6.
2. Set JAVA_HOME to the JDK 1.5 home, and put $JAVA_HOME/bin (or %JAVA_HOME%\bin
for Windows) on your path.
3. If you are running UNIX or Linux, edit buildJdk16.sh and change the line
'export JAVA_HOME=...' to point to your JDK 1.6 installation.
4. If you are running Windows, edit buildJdk16.bat and change the line 'set
JAVA_HOME=...' to point to your JDK 1.6 installation.
5. In the root of the source tree, run 'ant clean' then 'ant jar'.

Running the test suite
----------------------

Expand All @@ -61,7 +81,9 @@ Follow the instructions for 'Building olap4j from source'. Then:
"test.properties.example" and customize it. Note that you will need to
specify the location of the FoodMart.xml in your mondrian distribution
and the URL of your database.
3. In the root of the source tree, run 'ant test'.
3. If your database requires a JDBC driver, edit build.xml and add the location
of the driver to the "project.classpath" path.
4. In the root of the source tree, run 'ant test'.

Writing a simple program
------------------------
Expand Down
29 changes: 21 additions & 8 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<property name="project.location" location="."/>
<property name="lib.location" location="${project.location}/lib"/>
<property file="${project.location}/build.properties"/>
<property file="${project.location}/test.properties"/>
<property name="project.build.debug" value="on"/>
<property name="name" value="olap4j"/>
<property name="version" value="0.9.0"/>
Expand Down Expand Up @@ -78,6 +79,7 @@ ${jar-jdk14.file}"/>
<path id="project.test.classpath">
<path refid="project.classpath"/>
<pathelement location="${testclasses.dir}"/>
<pathelement location="${org.olap4j.test.driverClasspath}"/>
</path>

<!-- Arguments to the java process spawned by the junit task. -->
Expand Down Expand Up @@ -122,13 +124,8 @@ ${jar-jdk14.file}"/>
<mkdir dir="${testlog.dir}"/>
</target>

<target name="compile" depends="prepare,parser,compile.java,compileJdk16"/>
<target name="compile" depends="prepare,parser,compile.java"/>

<target name="compileJdk16">
<exec executable="buildJdk16.sh"/>
</target>

<target name="compile.java">
<condition property="jdk16.present">
<equals arg1="${ant.java.version}" arg2="1.6"/>
</condition>
Expand All @@ -138,6 +135,7 @@ ${jar-jdk14.file}"/>
</not>
</condition>

<target name="compile.java">
<javac
srcdir="${src.dir}"
destdir="${classes.dir}"
Expand Down Expand Up @@ -205,7 +203,6 @@ doc/**/*.html,
doc/**/*.pdf,
build.xml,
build.properties,
buildJdk16.sh,
test.properties.example,
LICENSE.html,
README.txt,
Expand All @@ -215,6 +212,13 @@ ${javadoc.dir}/**,
**/_vti*/*,
**/*~,
**/junit-results/**" />
<zipfileset
dir="."
prefix="${dist.name}"
filemode="755"
includes="
buildJdk16.bat,
buildJdk16.sh" />
</zip>
</target>

Expand Down Expand Up @@ -296,7 +300,16 @@ doc/olap4j_api.pdf"
</tar>
</target>

<target name="jar" depends="version,compile,compileJdk16">
<target name="checkIsNotJdk16" if="jdk16.present">
<fail message="The 'jar' target (and dependent targets 'release', 'binzip')
must be run under JDK 1.5." />
</target>

<target name="compileJdk16">
<exec executable="buildJdk16.sh"/>
</target>

<target name="jar" depends="version,checkIsNotJdk16,compile,compileJdk16">
<mkdir dir="${lib.dir}" />
<zip
zipfile="${jar.file}"
Expand Down
11 changes: 11 additions & 0 deletions buildJdk16.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# $Id$
# Called recursively from 'ant release' to build the files which can only be
# built under JDK 1.6.

# Change the following line to point to your JDK 1.6 home.
set JAVA_HOME=C:\jdk1.6.0_01
set PATH=%JAVA_HOME%\bin;%PATH%
ant compile.java

# End buildJdk16.bat

4 changes: 2 additions & 2 deletions buildJdk16.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# $Id: $
# $Id$
# Called recursively from 'ant release' to build the files which can only be
# built under JDK 1.6.

# Change the following line to point to your JDK 1.6 home.
export JAVA_HOME=/usr/local/jdk1.6.0_01
export PATH=$JAVA_HOME/bin:$PATH
ant compile.java

# End buildJdk16.sh

Binary file removed lib/mondrian-2.1.1.jar
Binary file not shown.
Binary file modified lib/mondrian.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion src/org/olap4j/CellSetAxis.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public interface CellSetAxis extends Iterable<Position> {
* Cell cell = cellSet.getCell(colPos, rowPos);
* ....
* }
* }</code></blockquote>
* }</pre></blockquote>
*
* @return iterator over the collection of positions
*/
Expand Down

0 comments on commit 3df918e

Please sign in to comment.