Skip to content

Commit

Permalink
Check in necessary libraries. Mondrian as of change 10210. Remove dep…
Browse files Browse the repository at this point in the history
…endency on spring. Revise README and up version number.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@44 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
julianhyde committed Nov 21, 2007
1 parent dcd6e4d commit 1ed37d9
Show file tree
Hide file tree
Showing 14 changed files with 140 additions and 46 deletions.
112 changes: 90 additions & 22 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,42 +1,110 @@
# $Id$

olap4j, release 0.9 (beta)

Contents of this distribution
-----------------------------

This is a binary distribution of olap4j.
For version information, see VERSION.txt.
For licensing, see LICENSE.html.

It contains the following external libraries:
This release of olap4j contains a driver implementation based on the mondrian
OLAP engine. In a future version, the driver will become part of the mondrian
project and distribution, and the olap4j distribution will get a lot lighter!

olap4j requires the following files at run time:

* lib/olap4j.jar (or lib/olap4j-jdk14.jar if you are running JDK 1.4)
* lib/javacup.jar

The mondrian driver requires the following additional files at run time:

lib/asm-2.2.3.jar Part of retroweaver.
lib/asm-commons-2.2.3.jar Part of retroweaver.
lib/javacup.jar Javacup 0.10k
lib/log4j-1.2.9.jar
lib/mondrian-2.1.1.jar From mondrian project, change xxxx. (Not an
official release of mondrian.)
lib/pdfdoclet-1.0.2-all.jar PDF doclet is a utility to generate javadoc
in Adobe Acrobat format.
lib/retroweaver-1.2.4.jar Retroweaver 1.2.4, compile-time library
lib/retroweaver-rt-1.2.4.jar Retroweaver 1.2.4, runtime library
lib/spring.jar Spring. Used for code samples only
testlib/junit.jar Junit. Used for test
testlib/servlet.jar Servlet. Used for code samples only
* lib/log4j-1.2.9.jar
* lib/mondrian.jar (or lib/mondrian-jdk14.jar if you are running JDK 1.4)
* lib/commons-dbcp.jar
* lib/commons-pool.jar
* lib/commons-collections.jar
* lib/commons-math-1.0.jar
* lib/commons-logging.jar
* lib/commons-vfs.jar
* lib/eigenbase-properties.jar
* lib/eigenbase-resgen.jar
* lib/eigenbase-xom.jar
* lib/log4j-1.2.9.jar
* lib/javacup.jar

mondrian.jar
Note that mondrian.jar is built from a development version of mondrian, not
an official release. The source code was p4:perforce.eigenbase.org:1666 (a
point between mondrian-2.4.2 and mondrian-3.0), change 10210.

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.
5. In the root of the source tree, run 'ant'.

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

To run the test suite:
Follow the instructions for 'Building olap4j from source'. Then:

1. Download the latest mondrian release (mondrian-2.4.2) and use the
MondrianFoodMartLoader utility to load the sample database.
2. In the root of the source tree, create a file called "test.properties"
describing your environment. The easiest way to this is to copy
"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'.

Writing a simple program
------------------------

You can now write and run a simple program against olap4j. For example,

import org.olap4j.*;
import org.olap4j.metadata.Member;
import java.sql.*;

1. create a test.properties file describing your environment. The easiest way
to this is to copy test.properties.example and customize it.
2. execute 'ant test'
Class.forName("mondrian.olap4j.MondrianOlap4jDriver");
Connection connection =
DriverManager.getConnection(
"jdbc:mondrian:"
+ "Jdbc='jdbc:odbc:MondrianFoodMart';"
+ "Catalog='file://c:/open/mondrian/demo/FoodMart.xml';"
+ "JdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver;");
OlapConnection olapConnection = connection.unwrap(OlapConnection.class);
OlapStatement statement = olapConnection.createStatement();
CellSet cellSet =
statement.executeOlapQuery(
"SELECT {[Measures].[Unit Sales]} ON 0,\n"
+ "{[Product].Children} ON 1\n"
+ "FROM [Sales]");
for (Position row : cellSet.getAxes().get(1)) {
for (Position column : cellSet.getAxes().get(0)) {
for (Member member : row.getMembers()) {
System.out.println(member.getUniqueName());
}
for (Member member : column.getMembers()) {
System.out.println(member.getUniqueName());
}
final Cell cell = cellSet.getCell(column, row);
System.out.println(cell.getFormattedValue());
System.out.println();
}
}

JDK 1.4
-------

This distribution does not include JDK 1.4-compatible binaries. To create them,
run 'ant retroweave'.
This distribution includes JDK 1.4-compatible libraries for olap4j and
mondrian. If you are using JDK version 1.4, replace olap4j.jar and mondrian.jar
in your classpath with olap4j-jdk14.jar and mondrian-jdk14.jar.

End README.txt
# End README.txt
74 changes: 50 additions & 24 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<property file="${project.location}/build.properties"/>
<property name="project.build.debug" value="on"/>
<property name="name" value="olap4j"/>
<property name="version" value="0.89.3"/>
<property name="version" value="0.9.0"/>
<property name="dist.name" value="${name}-${version}" />

<!-- properties related to paths -->
Expand All @@ -30,10 +30,6 @@
<property name="javadoc.dir" value="doc/api"/>
<property name="dist.dir" value="dist"/>

<!-- for now, assume that mondrian is a sibling directory and contains src,
classes, testsrc and testclasses directories -->
<property name="mondrian.dir" value="../mondrian"/>

<!-- generated files -->
<property name="jar.file" value="${lib.dir}/${name}.jar" />
<property name="jar-jdk14.file" value="${lib.dir}/${name}-jdk14.jar" />
Expand All @@ -51,29 +47,32 @@ ${jar-jdk14.file}"/>

<path id="project.classpath">
<pathelement location="${classes.dir}"/>
<!-- <pathelement location="${lib.dir}/retroweaver-1.2.4.jar"/> -->
<pathelement path="${env.CLASSPATH}"/>
<pathelement location="${ant.home}/lib/ant.jar"/>
<pathelement location="${lib.dir}/log4j-1.2.9.jar"/>
<pathelement location="${lib.dir}/javacup.jar"/>
<pathelement location="${testlib.dir}/junit.jar"/>
<pathelement location="${testlib.dir}/servlet.jar"/>
<!-- We depend on mondrian right now. Ugh. -->

<pathelement location="${lib.dir}/mondrian.jar"/>
<!-- To develop code against 'live' mondrian source code, remove the
previous line and uncomment the next two.
<pathelement location="${mondrian.dir}/classes"/>
<pathelement location="${mondrian.dir}/testclasses"/>
<pathelement location="${mondrian.dir}/lib/eigenbase-xom.jar"/>
<pathelement location="${mondrian.dir}/lib/eigenbase-properties.jar"/>
<pathelement location="${mondrian.dir}/lib/eigenbase-resgen.jar"/>
<pathelement location="${mondrian.dir}/lib/commons-dbcp.jar"/>
<pathelement location="${mondrian.dir}/lib/commons-pool.jar"/>
<pathelement location="${mondrian.dir}/lib/commons-collections.jar"/>
<pathelement location="${mondrian.dir}/lib/commons-vfs.jar"/>
<pathelement location="${mondrian.dir}/lib/commons-logging.jar"/>
<pathelement location="${mondrian.dir}/lib/commons-math-1.0.jar"/>
<pathelement location="${mondrian.dir}/testlib/derby.jar"/>
<!-- We depend on spring, but only for examples. -->
<pathelement location="${lib.dir}/spring.jar"/>

-->
<!-- The following libraries are required by mondrian, and therefore olap4j
needs them too, for now. When olap4j no longer depends on
mondrian, and the mondrian olap4j driver is tested as part of
mondrian's test suite, obsolete these libraries. -->
<pathelement location="${lib.dir}/eigenbase-xom.jar"/>
<pathelement location="${lib.dir}/eigenbase-properties.jar"/>
<pathelement location="${lib.dir}/eigenbase-resgen.jar"/>
<pathelement location="${lib.dir}/commons-dbcp.jar"/>
<pathelement location="${lib.dir}/commons-pool.jar"/>
<pathelement location="${lib.dir}/commons-collections.jar"/>
<pathelement location="${lib.dir}/commons-vfs.jar"/>
<pathelement location="${lib.dir}/commons-logging.jar"/>
<pathelement location="${lib.dir}/commons-math-1.0.jar"/>
</path>

<path id="project.test.classpath">
Expand Down Expand Up @@ -106,6 +105,14 @@ ${jar-jdk14.file}"/>
</delete>
</target>

<target name="clean-deep">
<delete includeEmptyDirs="true" quiet="true">
<fileset dir="${classes.dir}"/>
<fileset dir="${testclasses.dir}"/>
</delete>
<antcall target="clean"/>
</target>

<target name="prepare">
<mkdir dir="${classes.dir}"/>
<mkdir dir="${testclasses.dir}"/>
Expand Down Expand Up @@ -187,14 +194,14 @@ ${jar-jdk14.file}"/>
prefix="${dist.name}"
includes="
${src.dir}/**/*.java,
${testsrc.dir}/**/*.java,
doc/**/*.css,
doc/**/*.png,
doc/**/*.html,
doc/**/*.pdf,
misc/**/*.mf,
misc/Meta.xsl,
build.xml,
build.properties,
test.properties.example,
LICENSE.html,
README.txt,
VERSION.txt"
Expand All @@ -206,10 +213,10 @@ ${javadoc.dir}/**,
</zip>
</target>

<target name="release" depends="binzip"/>
<target name="release" depends="clean-deep, binzip"/>

<target name="binzip"
depends="clean,jar,version,srczip,retroweave,jar-jdk14,javadoc">
depends="clean,jar,version,srczip,retroweave,jar-jdk14,javadoc,javadoc-pdf">
<mkdir dir="${dist.dir}" />
<delete file="${dist.bin.file}"/>
<zip zipfile="${dist.bin.file}">
Expand All @@ -225,6 +232,25 @@ ${doc.dir}/api/**/*.xml,
${jar.file},
${jar-jdk14.file},
lib/*.dtd,
lib/mondrian.jar,
lib/mondrian-jdk14.jar,
lib/eigenbase-xom.jar,
lib/eigenbase-properties.jar,
lib/eigenbase-resgen.jar,
lib/commons-dbcp.jar,
lib/commons-pool.jar,
lib/commons-collections.jar,
lib/commons-vfs.jar,
lib/commons-logging.jar,
lib/commons-math-1.0.jar,
lib/javacup.jar,
lib/log4j-1.2.9.jar,
lib/asm-2.2.3.jar,
lib/asm-commons-2.2.3.jar,
lib/retroweaver-1.2.4.jar,
lib/retroweaver-rt-1.2.4.jar,
testlib/junit.jar,
testlib/servlet.jar,
LICENSE.html,
README.txt,
VERSION.txt"
Expand Down
Binary file added lib/commons-collections.jar
Binary file not shown.
Binary file added lib/commons-dbcp.jar
Binary file not shown.
Binary file added lib/commons-logging.jar
Binary file not shown.
Binary file added lib/commons-math-1.0.jar
Binary file not shown.
Binary file added lib/commons-pool.jar
Binary file not shown.
Binary file added lib/commons-vfs.jar
Binary file not shown.
Binary file added lib/eigenbase-properties.jar
Binary file not shown.
Binary file added lib/eigenbase-resgen.jar
Binary file not shown.
Binary file added lib/eigenbase-xom.jar
Binary file not shown.
Binary file added lib/mondrian-jdk14.jar
Binary file not shown.
Binary file added lib/mondrian.jar
Binary file not shown.
Binary file removed lib/spring.jar
Binary file not shown.

0 comments on commit 1ed37d9

Please sign in to comment.