Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
/bin/
/build/
/tmp/
/saiku/
/saiku-query/
/mondrian/
/gradle/
/saiku/
gradlew
gradlew.bat
/.gradle/
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "saiku"]
path = saiku
url = ../../OSBI/saiku.git
196 changes: 142 additions & 54 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,58 @@
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
//apply plugin: 'java'
//apply plugin: 'war'
//apply plugin: 'eclipse-wtp'

plugins {
id 'java'
id 'war'
id 'eclipse-wtp'
}

defaultTasks 'clean', 'cleanEclipse', 'eclipse', 'mergeSources', 'war'

// compiler arguments
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xlint:deprecation']
//options.compilerArgs += ['-Xlint:unchecked']
}
/*
* Version configuration
*/
// Java Version
sourceCompatibility = 1.8
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
//sourceCompatibility = 1.8
//sourceCompatibility = 11

// Saiku Version
ext.saikuReleaseTag = 'tag-3.16'
//ext.saikuReleaseTag = 'tag-3.16'
ext.saikuReleaseTag = '3.16m'

// Mondrian Version
ext.mondrianReleaseTag = '8.3.0.0-RC'
ext.mondrianVersion = '8.3.0.0-SNAPSHOT'
ext.mondrianReleaseTag = '9.4.0.0'
ext.mondrianVersion = '9.4.0.0-SNAPSHOT'

// Spring Versiion
ext.springFrameworkVersion = '4.3.30.RELEASE' //5.3.31' //'4.3.30.RELEASE' 4.1.6.RELEASE
ext.springFrameworkVersionSecurity = '4.2.20.RELEASE'//'5.3.13.RELEASE' // '4.2.20.RELEASE' 4.0.1.RELEASE
ext.jackrabbitVersion ='2.20.13' //2.18.6
ext.jerseyVersion ='1.19' //1.19'

/*
* Automatically download Saiku and Mondrian (optional)
*/
task downloadSaiku(type: Exec) {
onlyIf { !file('saiku').exists() }
commandLine 'git', 'clone', 'https://github.com/OSBI/saiku.git', '--single-branch', '-b', "$saikuReleaseTag", 'saiku'
//commandLine 'git', 'clone', 'https://github.com/OSBI/saiku.git', '--single-branch', '-b', "$saikuReleaseTag", 'saiku'
commandLine 'git', 'clone', 'https://github.com/ladida28/saiku.git', '--single-branch', '-b', "$saikuReleaseTag", 'saiku'
}

task pullSaiku(type: Exec) {
description 'Pull saiku git'
commandLine 'git', 'pull'
workingDir = './saiku'
}

task downloadSaikuQuery(type: Exec) {
Expand All @@ -41,7 +70,7 @@ task downloadMondrian(type: Exec) {
/**
* Copy relevant parts of the Saiku source code to a temporary directory
*/
task mergeSources(dependsOn: [downloadSaiku, downloadSaikuQuery]) {
task mergeSources(dependsOn: [downloadSaiku, pullSaiku, downloadSaikuQuery]) {

outputs.upToDateWhen { false }
doLast {
Expand All @@ -50,6 +79,7 @@ task mergeSources(dependsOn: [downloadSaiku, downloadSaikuQuery]) {

// include saiku java sources
copy {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from 'saiku-query/src'
from 'saiku/saiku-core/saiku-olap-util/src'
from 'saiku/saiku-core/saiku-service/src'
Expand Down Expand Up @@ -88,24 +118,28 @@ task mergeSources(dependsOn: [downloadSaiku, downloadSaikuQuery]) {
}

delete 'tmp/main/webapp/js/saiku/plugins/I18n/po'

// exclude log4j files
delete 'tmp/main/webapp/WEB-INF/classes/log4j.dtd'
delete 'tmp/main/webapp/WEB-INF/classes/log4j.xml'
}
}
compileJava.dependsOn mergeSources


/**
* Define the repository locations to use.
*/
repositories {
mavenCentral()
maven {
url 'http://nexus.pentaho.org/content/groups/omni'
url 'https://repo.orl.eng.hitachivantara.com/artifactory/pnt-mvn/' //'https://nexus.pentaho.org/content/groups/omni'
}
maven {
url 'http://clojars.org/repo/'
url 'https://clojars.org/repo/'
}
maven {
url 'http://nexus.qmino.com/content/repositories/miredot/'
allowInsecureProtocol = true
}
}

Expand Down Expand Up @@ -138,84 +172,138 @@ dependencies {
implementation "pentaho:mondrian:${mondrianVersion}"

// Saiku dependencies
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.5.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.5.1'
implementation 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.5.1'
implementation 'com.google.guava:guava:23.0'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.12.7'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.12.7.1'
implementation 'com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.12.7'
implementation 'com.google.guava:guava:32.1.3-jre' // 23.0
implementation 'com.googlecode.json-simple:json-simple:1.1.1'
implementation 'com.h2database:h2:1.4.188'
implementation 'com.lowagie:itext:4.2.1@jar'
//implementation 'com.lowagie:itext:4.2.1@jar'
implementation 'com.itextpdf:itextpdf:5.5.13.3' //5.0.6'
implementation 'com.marklogic:marklogic-xcc:9.0.7'
implementation 'com.qmino:miredot-annotations:1.3.1'
implementation 'com.sun.jersey.contribs:jersey-multipart:1.19'
implementation 'com.sun.jersey.contribs:jersey-spring:1.19'
implementation 'com.sun.jersey:jersey-server:1.19'
implementation 'com.sun.jersey:jersey-servlet:1.19'
implementation 'commons-io:commons-io:2.4'
implementation "com.sun.jersey.contribs:jersey-multipart:$jerseyVersion"//1.19'
implementation "com.sun.jersey.contribs:jersey-spring:$jerseyVersion"//1.19'
implementation "com.sun.jersey:jersey-server:$jerseyVersion"//1.19'
implementation "com.sun.jersey:jersey-servlet:$jerseyVersion"//1.19'
implementation 'commons-io:commons-io:2.11.0'
implementation 'commons-lang:commons-lang:2.4'
implementation 'commons-vfs:commons-vfs:1.0'
//implementation 'commons-vfs:commons-vfs:1.0'
implementation 'org.apache.commons:commons-vfs2:2.9.0' //2.7.0
implementation 'javax.jcr:jcr:2.0'
implementation 'javax.ws.rs:jsr311-api:1.1.1'
implementation 'net.sourceforge.htmlcleaner:htmlcleaner:2.10'
implementation 'org.apache.commons:commons-lang3:3.3.2'
implementation 'net.sourceforge.htmlcleaner:htmlcleaner:2.29'
implementation 'org.apache.commons:commons-lang3:3.12.0' //3.3.2
implementation 'org.apache.commons:commons-text:1.10.0'
implementation 'org.apache.felix:org.osgi.core:1.0.0'
implementation 'org.apache.httpcomponents:fluent-hc:4.5.6'
implementation 'org.apache.jackrabbit:jackrabbit-api:2.18.0'
implementation 'org.apache.jackrabbit:jackrabbit-core:2.18.0'
implementation 'org.apache.jackrabbit:jackrabbit-jcr-commons:2.18.0'
implementation 'org.apache.jackrabbit:jackrabbit-jcr-server:2.18.0'
implementation 'org.apache.poi:poi-ooxml:3.7'
implementation 'org.apache.poi:poi:3.7'
implementation 'org.apache.xmlgraphics:fop:2.2'
implementation 'org.apache.httpcomponents:fluent-hc:4.5.14'
implementation "org.apache.jackrabbit:jackrabbit-api:2.19.3" //$jackrabbitVersion //2.18.6 2.19.3
implementation "org.apache.jackrabbit:jackrabbit-core:$jackrabbitVersion" //2.18.6 2.20.13
implementation "org.apache.jackrabbit:jackrabbit-jcr-commons:$jackrabbitVersion" //2.18.6 2.20.13
implementation "org.apache.jackrabbit:jackrabbit-jcr-server:$jackrabbitVersion" //2.18.6 2.20.13
implementation 'org.apache.poi:poi-ooxml:5.2.1'//5.1.0'
implementation 'org.apache.poi:poi:5.2.1'//5.1.0'
implementation 'org.apache.xmlgraphics:fop:2.9' //2.8'
implementation 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final'
implementation 'org.hibernate:hibernate-core:4.3.5.Final'
implementation 'org.jasig.cas.client:cas-client-core:3.3.2'
implementation 'org.jdom:jdom:1.1'
implementation 'org.hibernate:hibernate-core:5.3.29.Final'//4.3.5.Final
implementation 'org.hibernate:hibernate-validator:5.3.6.Final'

implementation 'org.jasig.cas.client:cas-client-core:3.4.1' // 3.3.3
//implementation 'org.jdom:jdom:1.1'
implementation 'org.jdom:jdom2:2.0.6.1'
implementation 'org.jetbrains:annotations:16.0.3'
implementation 'org.mozilla:rhino:1.7R5'
implementation 'org.slf4j:jul-to-slf4j:1.7.25'
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'org.slf4j:slf4j-log4j12:1.7.25'
implementation 'org.springframework.security:spring-security-cas:4.0.1.RELEASE'
implementation 'org.springframework.security:spring-security-config:4.0.1.RELEASE'
implementation 'org.springframework.security:spring-security-core:4.0.1.RELEASE'
implementation 'org.springframework.security:spring-security-web:4.0.1.RELEASE'
implementation 'org.springframework:spring-beans:4.1.6.RELEASE'
implementation 'org.springframework:spring-core:4.1.6.RELEASE'
implementation 'org.springframework:spring-jdbc:4.1.6.RELEASE'
implementation 'org.springframework:spring-tx:4.1.6.RELEASE'
implementation 'org.springframework:spring-web:4.1.6.RELEASE'
implementation 'org.springframework:spring-webmvc:4.1.6.RELEASE'
implementation 'xml-apis:xml-apis:1.0.b2'

// bridge for old logging
//implementation 'org.slf4j:slf4j-api:1.7.36'
//implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.17.1'
//implementation 'org.apache.logging.log4j:log4j-slf4j-impl:2.20.0'
//implementation 'org.slf4j:slf4j-reload4j:2.0.7'
//implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
//implementation 'org.slf4j:jul-to-slf4j:1.7.25'
//implementation 'org.slf4j:slf4j-api:1.7.25'
//implementation 'org.slf4j:slf4j-log4j12:1.7.25'
//implementation 'org.slf4j:slf4j-log4j12:1.7.36'
//implementation 'org.slf4j:slf4j-reload4j:1.7.36'

// waren da
//implementation 'org.apache.logging.log4j:log4j-core:2.17.1'
//implementation 'org.apache.logging.log4j:log4j-api:2.17.1'
//implementation 'org.slf4j:slf4j-reload4j:2.0.7'
implementation 'org.apache.logging.log4j:log4j-core:2.20.0'
implementation 'org.apache.logging.log4j:log4j-api:2.20.0'
//implementation 'org.slf4j:jcl-over-slf4j:2.0.7'
compileOnly 'org.slf4j:slf4j-api:2.0.7'
compileOnly 'org.apache.logging.log4j:log4j-jul:2.20.0'
compileOnly 'org.apache.logging.log4j:log4j-slf4j2-impl:2.20.0'

implementation "org.springframework.security:spring-security-cas:$springFrameworkVersionSecurity"//4.0.1.RELEASE'
implementation "org.springframework.security:spring-security-config:$springFrameworkVersionSecurity"//4.0.1.RELEASE'4.0.1.RELEASE'
implementation "org.springframework.security:spring-security-core:$springFrameworkVersionSecurity"//4.0.1.RELEASE'4.0.1.RELEASE'
implementation "org.springframework.security:spring-security-web:$springFrameworkVersionSecurity"//4.0.1.RELEASE'4.0.1.RELEASE'
implementation "org.springframework:spring-beans:$springFrameworkVersion"//4.1.6.RELEASE'
implementation "org.springframework:spring-core:$springFrameworkVersion"//4.1.6.RELEASE'
implementation "org.springframework:spring-jdbc:$springFrameworkVersion"//4.1.6.RELEASE'
implementation "org.springframework:spring-tx:$springFrameworkVersion"//4.1.6.RELEASE'
implementation "org.springframework:spring-web:$springFrameworkVersion"//4.1.6.RELEASE'
implementation "org.springframework:spring-webmvc:$springFrameworkVersion"//4.1.6.RELEASE'
//implementation 'xml-apis:xml-apis:1.0.b2'
implementation 'xml-apis:xml-apis:1.4.01'

implementation 'org.apache.avalon.framework:avalon-framework-api:4.3.1'
implementation 'org.apache.avalon.framework:avalon-framework-impl:4.3.1'

implementation "com.sun.xml.bind:jaxb-core:2.3.0.1"
implementation "javax.xml.bind:jaxb-api:2.3.1"
implementation "com.sun.xml.bind:jaxb-impl:2.3.1"

implementation "javax.annotation:javax.annotation-api:1.3.2"

implementation 'org.postgresql:postgresql:42.2.5'
implementation 'org.postgresql:postgresql:42.7.1'//42.2.27'

// avoid vulnerabilities
implementation 'commons-fileupload:commons-fileupload:1.5'
implementation 'com.squareup.okio:okio:1.17.6'

compileOnly 'javax.servlet:jsp-api:2.0'
compileOnly 'javax.servlet:servlet-api:2.4'

//implementation group: 'com.oracle.database.jdbc', name: 'ojdbc8', version: '21.5.0.0'
implementation group: 'com.oracle.database.jdbc', name: 'ojdbc8', version: '19.14.0.0'
implementation group: 'mysql', name: 'mysql-connector-java', version: '8.0.33'
}
configurations.all {
exclude group: 'org.slf4j', module: 'log4j-over-slf4j'
exclude group: 'org.slf4j', module: 'slf4j-reload4j'
exclude group: 'ch.qos.reload4j', module:'reload4j'
exclude group: 'org.slf4j',module: 'jcl-over-slf4j'
//exclude group: 'org.apache.logging.log4j', module:'log4j-core'
//exclude group: 'org.apache.logging.log4j',module:'log4j-api'
exclude group: 'org.slf4j', module:'slf4j-api'
exclude group: 'org.apache.logging.log4j', module:'log4j-jul'
}


/**
* Build the jar file
*/
war {
archiveName 'mondrian-server.war'
destinationDir file('.')

duplicatesStrategy = DuplicatesStrategy.EXCLUDE
archiveFileName = 'mondrian-server.war'
destinationDirectory = file('.')
from 'tmp/main/webapp'

outputs.upToDateWhen { false }
}

task copyArtifact2Test(dependsOn:[war],type: Copy) {
from file('mondrian-server.war')
into 'C:/Users/Martin/Documents/02_Software/01_Repos/WI2/mondriansaikuforwi2fortest'
}
task copyArtifact2WI2Rep(dependsOn:[copyArtifact2Test],type: Copy) {
from file('mondrian-server.war')
into 'C:/Users/Martin/Documents/02_Software/01_Repos/WI2/mondriansaikuforwi2'
}


/**
Expand Down
1 change: 1 addition & 0 deletions saiku
Submodule saiku added at 92768c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@
import javax.annotation.PreDestroy;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;
//import org.apache.log4j.Level;
//import org.apache.logging.log4j.Level;
//import org.apache.log4j.Logger;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
//import org.jdom.Element;
//import org.jdom.output.XMLOutputter;
import org.jdom2.Element;
import org.jdom2.output.XMLOutputter;
import org.olap4j.OlapConnection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
Expand Down Expand Up @@ -53,7 +58,7 @@ public class MondrianConnector {
private static final String DEFAULT_DATASOURCE_NAME = "Mondrian";
private static final String DEFAULT_CATALOG_NAME = "Mondrian";

private static final Logger LOG = Logger.getLogger(MondrianConnector.class);
private static final Logger LOG = LogManager.getLogger(MondrianConnector.class);

/**
* Initializes the mondrian server connection
Expand Down Expand Up @@ -151,19 +156,21 @@ private void readMondrianProperties() throws IOException {
private void configureLogLevels() {

if (StringUtils.equalsIgnoreCase(config.getProperty("logMondrian"), "true")) {
Logger.getLogger("mondrian").setLevel(Level.DEBUG);
//LogManager.getLogger("mondrian").setLevel(Level.DEBUG);
}

if (StringUtils.equalsIgnoreCase(config.getProperty("logSql"), "true")) {
RolapUtil.SQL_LOGGER.setLevel(Level.DEBUG);
//RolapUtil.SQL_LOGGER.setLevel(Level.DEBUG);
//LogManager.getLogger(RolapUtil.SQL_LOGGER.getName()).setLevel(Level.DEBUG);
}

if (StringUtils.equalsIgnoreCase(config.getProperty("logMdx"), "true")) {
RolapUtil.MDX_LOGGER.setLevel(Level.DEBUG);
//RolapUtil.MDX_LOGGER.setLevel(Level.DEBUG);
//LogManager.getLogger(RolapUtil.MDX_LOGGER.getName()).setLevel(Level.DEBUG);
}

if (StringUtils.equalsIgnoreCase(config.getProperty("logXmla"), "true")) {
Logger.getLogger(XmlaServlet.class).setLevel(Level.DEBUG);
//LogManager.getLogger(XmlaServlet.class).setLevel(Level.DEBUG);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ public boolean removeSchema(String schemaName) {
/**
* Returns only the preconfigured data source
*/
@Override
public Map<String, SaikuDatasource> getDatasources() {

String dataSourceName = config.getProperty("dataSourceName", "Cubes");
Expand Down Expand Up @@ -442,6 +441,5 @@ private void moveFile(String source, String target) {
sourceFile.renameTo(targetFile);
}


}

Loading