Skip to content

Commit

Permalink
MONDRIAN: Release 0.6, and integrate with JPivot 0.9.2.
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 530]
  • Loading branch information
julianhyde committed May 25, 2003
1 parent bcf6a17 commit 7c07d90
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 153 deletions.
10 changes: 7 additions & 3 deletions bin/mondrian.bat
Expand Up @@ -2,20 +2,24 @@
@rem This software is subject to the terms of the Common Public License
@rem Agreement, available at the following URL:
@rem http://www.opensource.org/licenses/cpl.html.
@rem (C) Copyright 2001-2002 Kana Software, Inc. and others.
@rem (C) Copyright 2001-2003 Kana Software, Inc. and others.
@rem All Rights Reserved.
@rem You must accept the terms of that agreement to use this software.

@set SRCROOT=%~dp0\..
@set LIB=%SRCROOT%\lib
echo LIB=%LIB%
@rem set JAVA_HOME=C:/jdk1.3.1_02
@if exist "%JAVA_HOME%/bin/javac.exe" goto javaOk
@echo JAVA_HOME (%JAVA_HOME%) is not set correctly
@goto end
:javaOk

@set CLASSPATH="%LIB%\ant.jar;%LIB%\optional.jar;%LIB%\xercesImpl.jar;%LIB%\xml-apis.jar;%LIB%\junit.jar"
@set CLASSPATH=%LIB%\mondrian.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\ant.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\optional.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\xercesImpl.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\xml-apis.jar
@set CLASSPATH=%CLASSPATH%;%LIB%\junit.jar

%JAVA_HOME%\bin\java -classpath "%CLASSPATH%" -Dant.home="%SRCROOT%" org.apache.tools.ant.Main -buildfile runtime.xml %1 %2 %3 %4 %5 %6 %7 %8 %9

Expand Down
17 changes: 3 additions & 14 deletions bin/mondrian.properties
Expand Up @@ -8,35 +8,24 @@
# jhyde, 31 October, 2001

# Uncomment the following lines to run subsets of the test suite
#mondrian.test.Class=mondrian.test.FoodMartTestCase
#mondrian.test.Suite=mondrian.olap.fun.BuiltinFunTable
#mondrian.test.Class=mondrian.olap.fun.BuiltinFunTable
#mondrian.test.Name=testToggleDrillState

# Comma-separated list of JDBC drivers
mondrian.jdbcDrivers=sun.jdbc.odbc.JdbcOdbcDriver,oracle.jdbc.OracleDriver,com.mysql.jdbc.Driver

# Used by the webapp
mondrian.test.connectString=\
Provider=mondrian;\
Jdbc=jdbc:odbc:MondrianFoodMart;\
Catalog=/WEB-INF/FoodMart.xml

# Used by the test suite
# JDBC connect string used by the test suite.
mondrian.foodmart.jdbcURL=jdbc:odbc:MondrianFoodMart
#oracle
#mondrian.foodmart.jdbcURL=jdbc:oracle:oci8:foodmart/foodmart@realm1
#access
#mondrian.foodmart.jdbcURL=jdbc:odbc:MondrianFoodMart
#hsqldb
#mondrian.foodmart.jdbcURL=jdbc:hsqldb:demo/hsql/FoodMart
#mysql
#mondrian.foodmart.jdbcURL=jdbc:mysql://localhost/foodmart?user=foodmart&password=foodmart

# Tracing
#mondrian.trace.level=1

# Additional products. Uncomment the ones you have installed.
#tomcat.home=C:/jakarta-tomcat-4.0.4
#catalina.home=C:/jakarta-tomcat-4.1.24
#weblogic.home=C:/bea/wlserver6.1

# End mondrian.properties
30 changes: 30 additions & 0 deletions bin/mondrian.sh
@@ -0,0 +1,30 @@
#!/usr/bin/ksh
# $Id$
# This software is subject to the terms of the Common Public License
# Agreement, available at the following URL:
# http://www.opensource.org/licenses/cpl.html.
# (C) Copyright 2003-2003 Julian Hyde
# All Rights Reserved.
# You must accept the terms of that agreement to use this software.

export SRCROOT=$(cd $(dirname $0)/..; pwd)
export LIB=${SRCROOT}/lib
case $(uname) in
Windows_NT)
export PS=";" ;;
*)
export PS=":" ;;
esac
# export JAVA_HOME=C:/jdk1.3.1_02
if [ ! -f "${JAVA_HOME}/bin/javac.exe" -a \
! -f "${JAVA_HOME}/bin/javac" ]; then
echo "JAVA_HOME (${JAVA_HOME}) is not set correctly"
exit 1
fi

export CLASSPATH="${LIB}/ant.jar${PS}${LIB}/optional.jar${PS}${LIB}/xercesImpl.jar${PS}${LIB}/xml-apis.jar${PS}${LIB}/junit.jar"
echo $CLASSPATH
${JAVA_HOME}/bin/java -classpath "${CLASSPATH}" -Dant.home="${SRCROOT}" org.apache.tools.ant.Main -buildfile runtime.xml "$@"

# End mondrian.sh

54 changes: 12 additions & 42 deletions bin/runtime.xml
Expand Up @@ -14,63 +14,35 @@
<project name="mondrian" default="test">
<!-- Properties specified in mondrian.properties override those set in
the environment. -->
<property environment="myenv"/>
<property environment="env"/>
<property file="mondrian.properties"/>
<property name="name" value="mondrian"/>
<property name="project.location" location=".."/>
<property name="lib.location" location="${project.location}/lib"/>
<property name="war.file" value="${lib.location}/${name}.war"/>
<property name="webapp.location" location="${project.location}/webapp"/>
<property name="demo.location" location="${project.location}/demo"/>
<property name="weblogic.home" value="${myenv.WEBLOGIC_HOME}"/>
<property name="tomcat.home" value="${myenv.TOMCAT_HOME}"/>
<property name="weblogic.home" value="${env.WEBLOGIC_HOME}"/>
<property name="catalina.home" value="${env.CATALINA_HOME}"/>
<property name="mondrian.foodmart.catalogURL" value="jar:file:/${lib.location}/mondrian.war!/WEB-INF/queries/FoodMart.xml"/>

<path id="project.classpath">
<pathelement location="${lib.location}/${name}.jar"/>
<pathelement location="${tomcat.home}/common/lib/servlet.jar"/>
<pathelement location="${catalina.home}/common/lib/servlet.jar"/>
<pathelement location="${lib.location}/javacup.jar"/>
<pathelement location="${lib.location}/xalan.jar"/>
<pathelement location="${lib.location}/junit.jar"/>
<!-- CLASSPATH must contain xml-apis.jar, xercesImpl.jar, javacup.jar -->
<pathelement path="${myenv.CLASSPATH}"/>
<pathelement path="${env.CLASSPATH}"/>
<!-- Weblogic must be after xml-apis.jar and xercesImpl.jar, because it
contains an incompatible version of xerces. -->
<pathelement location="${weblogic.home}/lib/weblogic.jar"/>
</path>

<target name="war" description="
Creates mondrian.war.
Assumes that lib contains mondrian.jar, ant.jar, junit.jar etc.">
<filter filtersfile="mondrian.properties"/>
<mkdir dir="${lib.location}" />
<delete file="${war.file}"/>
<delete file="${lib.location}/web.xml"/>
<copy file="${webapp.location}/WEB-INF/web.xml"
filtering="true" todir="${lib.location}"/>
<war warfile="${war.file}"
webxml="${lib.location}/web.xml">
<webinf dir="${webapp.location}/WEB-INF" excludes="web.xml"/>
<webinf dir="${demo.location}" includes="FoodMart.xml"/>
<fileset dir="${webapp.location}" excludes="WEB-INF/**/*"/>
<lib dir="${lib.location}" includes="
${name}.jar,
javacup.jar,
xalan.jar,
xml-apis.jar,
xercesImpl.jar
junit.jar"/>
</war>
</target>

<target name="deploy-to-tomcat" depends="war" description="
Builds mondrian.war and deploys it to Tomcat (${tomcat.home})">
<delete dir="${tomcat.home}/webapps/mondrian"/>
<copy file="${war.file}"
todir="${tomcat.home}/webapps"/>
</target>

<target name="junit" description="Runs unit tests.">
<target name="test" description="Runs unit tests.">
<mkdir dir="junit-results"/>
<echo>Running mondrian tests
Catalog is ${mondrian.foodmart.catalogURL}
JDBC is ${mondrian.foodmart.jdbcURL}
JDBC drivers are ${mondrian.jdbcDrivers}</echo>

<junit printsummary="yes" fork="yes" haltonfailure="no" >
<classpath>
<path refid="project.classpath"/>
Expand All @@ -92,6 +64,4 @@ Builds mondrian.war and deploys it to Tomcat (${tomcat.home})">
<echo>See results at junit-results/html/index.html.</echo>
</target>

<target name="test" description="Runs unit tests." depends="junit"/>

</project>
69 changes: 31 additions & 38 deletions build.xml
Expand Up @@ -9,7 +9,7 @@
== jhyde, 31 October, 2001
-->
<project name="mondrian" default="compile">
<property environment="myenv"/>
<property environment="env"/>
<property name="project.location" location="."/>
<property name="lib.location" location="${project.location}/lib"/>
<property file="${project.location}/build.properties"/>
Expand Down Expand Up @@ -40,16 +40,16 @@
<property name="dist.src.file" value="${dist.dir}/${dist.name}-src.zip"/>
<property name="dist.data.file" value="${dist.dir}/${name}-data.zip"/>
<property name="dist.data.mysql.file" value="${dist.dir}/${name}-data-mysql.zip"/>
<property name="dist.bin.file" value="${dist.dir}/${dist.name}-bin.zip"/>
<property name="dist.bin.file" value="${dist.dir}/${dist.name}.zip"/>
<property name="jar.file" value="${lib.dir}/${name}.jar"/>
<property name="workbench.jar.file" value="workbench.jar"/>
<property name="boot.jar.file" value="${lib.dir}/boot.jar"/>
<property name="war.file" value="${lib.dir}/${name}.war"/>
<property name="jdk.home" value="${myenv.JAVA_HOME}"/>
<property name="catalina.home" value="${myenv.CATALINA_HOME}"/>
<property name="xalan.home" value="${myenv.XALAN_HOME}"/>
<property name="junit.home" value="${myenv.JUNIT_HOME}"/>
<property name="weblogic.home" value="${myenv.WEBLOGIC_HOME}"/>
<property name="jdk.home" value="${env.JAVA_HOME}"/>
<property name="catalina.home" value="${env.CATALINA_HOME}"/>
<property name="xalan.home" value="${env.XALAN_HOME}"/>
<property name="junit.home" value="${env.JUNIT_HOME}"/>
<property name="weblogic.home" value="${env.WEBLOGIC_HOME}"/>
<property name="generated.java.files" value="
${java.dir}/mondrian/olap/Parser.java,
${java.dir}/mondrian/olap/ParserSym.java,
Expand Down Expand Up @@ -83,7 +83,7 @@ demo/mysql/FoodMartData.sql"/>
<pathelement location="${xalan.home}/bin/xalan.jar"/>
<pathelement location="${junit.home}/junit.jar"/>
<!-- CLASSPATH must contain xml-apis.jar, xercesImpl.jar, javacup.jar -->
<pathelement path="${myenv.CLASSPATH}"/>
<pathelement path="${env.CLASSPATH}"/>
<!-- Weblogic must be after xml-apis.jar and xercesImpl.jar, because it
contains an incompatible version of xerces. -->
<pathelement location="${weblogic.home}/lib/weblogic.jar"/>
Expand Down Expand Up @@ -476,19 +476,16 @@ demo/mysql/INSTALL.txt"/>
</target>

<target name="export.foodmart.oracle">
<exec dir="${demo.dir}/oracle" executable="${myenv.ORACLE_HOME}/bin/exp">
<exec dir="${demo.dir}/oracle" executable="${env.ORACLE_HOME}/bin/exp">
<arg line="userid=foodmart/foodmart@realm1"/>
<arg line="file=FoodMart.dmp"/>
<arg line="owner=FOODMART"/>
</exec>
</target>

<target name="release" depends="binzip,srczip,war">
<delete file="${dist.dir}/${dist.name}.war"/>
<copy file="${war.file}" tofile="${dist.dir}/${dist.name}.war"/>
</target>
<target name="release" depends="binzip"/>

<target name="binzip" depends="javadoc,jar,copy-jars,version">
<target name="binzip" depends="version,war,javadoc,srczip">
<mkdir dir="${dist.dir}" />
<delete file="${dist.bin.file}"/>
<zip zipfile="${dist.bin.file}">
Expand All @@ -497,32 +494,19 @@ demo/mysql/INSTALL.txt"/>
prefix="${dist.name}"
includes="
${doc.dir}/**/*,
${webapp.dir}/**,
${demo.dir}/FoodMart.xml,
bin/mondrian.properties,
bin/runtime.xml,
bin/mondrian.bat,
bin/mondrian.sh,
${dist.src.file},
${war.file},
LICENSE.html,
README.txt,
VERSION.txt"
excludes="
**/*~,
**/_vti*/*,
**/*.psp"/>
<!-- Files needed to run mondrian, ant, junit in runtime environment. -->
<zipfileset
dir="${lib.dir}"
prefix="${dist.name}/lib"
includes="
${name}.jar,
ant.jar,
javacup.jar,
jmi.jar,
junit.jar,
mof.jar,
optional.jar,
xalan.jar,
xercesImpl.jar,
xml-apis.jar"/>
</zip>
</target>

Expand Down Expand Up @@ -567,7 +551,7 @@ mondrian/resource/**/*.class"/>
overview="${java.dir}/overview.html"
footer="&lt;a href=&quot;http://sourceforge.net/projects/mondrian&quot;&gt;&lt;img src=&quot;http://sourceforge.net/sflogo.php?group_id=35302&#38;type=1&quot; width=&quot;88&quot; height=&quot;31&quot; border=&quot;0&quot; alt=&quot;SourceForge.net_Logo&quot;&gt;&lt;/a&gt;"
author="true">
<link href="http://javadoc.dyndns.org/"/>
<link href="http://javadoc.dyndns.org/joogle/api"/>
<!--
<link href="http://java.sun.com/j2se/1.4/docs/api/"/>
<link href="http://www.junit.org/junit/javadoc/3.7/"/>
Expand All @@ -593,9 +577,6 @@ You should set pscp.user, pscp.password and pscp.path in build.properties">
</exec>
</target>

<target name="webapp" depends="jar,copy-jars,war"
description="Creates mondrian.war in a build environment."/>

<target name="copy-jars" description="
Copy .jar files into lib, so that the same files are available to
build mondrian.war as in the runtime environment.">
Expand All @@ -606,7 +587,7 @@ build mondrian.war as in the runtime environment.">
</copy>
</target>

<target name="war" description="
<target name="war" depends="jar,copy-jars" description="
Creates mondrian.war based upon jpivot.war.
Assumes that mondrian.jar exists (use 'jar' target)">
<filter filtersfile="mondrian.properties"/>
Expand All @@ -624,7 +605,19 @@ Assumes that mondrian.jar exists (use 'jar' target)">
<webinf dir="${demo.dir}" prefix="WEB-INF/queries" includes="FoodMart.xml"/>
<fileset dir="${webapp.dir}" excludes="WEB-INF/**/*"/>
<!-- should already contain javacup.jar, xalan.jar, junit.jar -->
<lib dir="${lib.dir}" includes="${name}.jar"/>
<lib dir="${lib.dir}" includes="
${name}.jar,
ant.jar,
jmi.jar,
mof.jar,
optional.jar,
" excludes="
javacup.jar,
junit.jar,
xalan.jar,
xercesImpl.jar,
xml-apis.jar,
"/>
</war>
</target>

Expand Down Expand Up @@ -653,7 +646,7 @@ xalan.jar"/>
</war>
</target>

<target name="deploy-webapp" depends="webapp">
<target name="deploy-war" depends="war">
<delete dir="${catalina.home}/webapps/mondrian"/>
<copy file="${war.file}"
todir="${catalina.home}/webapps"/>
Expand Down

0 comments on commit 7c07d90

Please sign in to comment.