当前位置: 首页 > 工具软件 > Saiku > 使用案例 >

saiku+kettle整合(七)二次开发saiku

白成济
2023-12-01

title: saiku+kettle整合(七)二次开发saiku tags: categories: saiku date: 2016-08-25 18:18:54

二次开发saiku

使用idea开发saiku步骤如下

  1. github上获取最新源码[OSBI/saiku: saiku analytics - the worlds greatest open source OLAP browser][OSBI_saiku_ saiku analytics - the worlds greatest open source OLAP browser]
  1. 切换分支(3.9包含license相关)

  2. 修改文件 使得maven编译完成

    
        Index: pom.xml
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- pom.xml (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ pom.xml (revision )
        @@ -82,6 +82,10 @@
                     <id>pentaho-snapshot</id>
                     <url>http://nexus.pentaho.org/content/repositories/public-snapshots/</url>
                 </repository>
        +        <repository>
        +            <id>pentaho-releases</id>
        +            <url>http://repository.pentaho.org/artifactory/repo/</url>
        +        </repository>
                 <!--<repository>
                     <id>atlassian2</id>
                     <url>http://repository.opencastproject.org/</url>
        @@ -393,7 +397,7 @@
                     <dependency>
                         <groupId>org.saikuanalytics</groupId>
                         <artifactId>saiku-webapp</artifactId>
        -                <version>3.1-SNAPSHOT</version>
        +                <version>${project.version}</version>
                         <type>war</type>
                     </dependency>
                     <dependency>
        @@ -419,7 +423,7 @@
                     <dependency>
                         <groupId>org.olap4j</groupId>
                         <artifactId>olap4j</artifactId>
        -                <version>TRUNK-SNAPSHOT</version>
        +                <version>1.2.0</version>
                     </dependency>
                     <dependency>
                         <groupId>org.mongodb</groupId>
        @@ -524,12 +528,12 @@
                         <version>1.7</version>
                     </dependency>
                     <dependency>
        -                <groupId>batik</groupId>
        +                <groupId>org.apache.xmlgraphics</groupId>
                         <artifactId>batik-transcoder</artifactId>
                         <version>1.7</version>
                     </dependency>
                     <dependency>
        -                <groupId>batik</groupId>
        +                <groupId>org.apache.xmlgraphics</groupId>
                         <artifactId>batik-ext</artifactId>
                         <version>1.7</version>
                     </dependency>
        @@ -983,12 +987,12 @@
                     <dependency>
                         <groupId>org.apache.pdfbox</groupId>
                         <artifactId>pdfbox-app</artifactId>
        -                <version>2.0.0-SNAPSHOT</version>
        +                <version>2.0.0</version>
                     </dependency>
                     <dependency>
                         <groupId>pentaho</groupId>
                         <artifactId>cda</artifactId>
        -                <version>TRUNK-SNAPSHOT</version>
        +                <version>14.05.06</version>
                     </dependency>
                     <dependency>
                         <groupId>org.springframework.security</groupId>
        Index: saiku-core/saiku-web/pom.xml
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-core/saiku-web/pom.xml    (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-core/saiku-web/pom.xml    (revision )
        @@ -168,7 +168,7 @@
                 </dependency>
                 <!-- Batik/SVG -->
                 <dependency>
        -            <groupId>batik</groupId>
        +            <groupId>org.apache.xmlgraphics</groupId>
                     <artifactId>batik-transcoder</artifactId>
                     <exclusions>
                         <exclusion>
        @@ -178,7 +178,7 @@
                     </exclusions>
                 </dependency>
                 <dependency>
        -            <groupId>batik</groupId>
        +           <groupId>org.apache.xmlgraphics</groupId>
                     <artifactId>batik-ext</artifactId>
                     <exclusions>
                         <exclusion>
        Index: saiku-webapp/src/main/webapp/WEB-INF/web.xml
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-webapp/src/main/webapp/WEB-INF/web.xml    (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-webapp/src/main/webapp/WEB-INF/web.xml    (revision )
        @@ -12,7 +12,7 @@
            </context-param>
             <context-param>
                 <param-name>db.url</param-name>
        -        <param-value>jdbc:h2:../../data/saiku;MODE=MySQL</param-value>
        +        <param-value>jdbc:h2:jdbc:h2:/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data/saiku;MODE=MySQL</param-value>
             </context-param>
             <context-param>
                 <param-name>db.user</param-name>
        @@ -28,7 +28,7 @@
             </context-param>
             <context-param>
                 <param-name>foodmart.url</param-name>
        -        <param-value>jdbc:h2:../../data/foodmart;MODE=MySQL</param-value>
        +        <param-value>jdbc:h2:/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data//foodmart;MODE=MySQL</param-value>
             </context-param>
             <context-param>
                 <param-name>foodmart.user</param-name>
        @@ -40,7 +40,7 @@
             </context-param>
             <context-param>
                 <param-name>earthquakes.url</param-name>
        -        <param-value>jdbc:h2:../../data/earthquakes;MODE=MySQL</param-value>
        +        <param-value>jdbc:h2:/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data//earthquakes;MODE=MySQL</param-value>
             </context-param>
             <context-param>
                 <param-name>earthquakes.user</param-name>
        Index: saiku-core/saiku-olap-util/pom.xml
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-core/saiku-olap-util/pom.xml  (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-core/saiku-olap-util/pom.xml  (revision )
        @@ -61,7 +61,7 @@
                <dependency>
                    <groupId>pentaho</groupId>
                    <artifactId>mondrian</artifactId>
        -           <version>4.3.0.1-130</version>
        +           <version>4.3.0.1.1</version>
                </dependency>
                <dependency>
                    <groupId>eigenbase</groupId>
        @@ -86,7 +86,6 @@
                <dependency>
                    <groupId>org.olap4j</groupId>
                    <artifactId>olap4j-xmla</artifactId>
        -           <version>1.2.0</version>
                 </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
        Index: saiku-core/saiku-service/src/main/java/org/saiku/database/Database.java
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-core/saiku-service/src/main/java/org/saiku/database/Database.java (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-core/saiku-service/src/main/java/org/saiku/database/Database.java (revision )
        @@ -62,8 +62,8 @@
             public void init() throws SQLException {
                 initDB();
                 loadUsers();
        -        loadFoodmart();
        -        loadEarthquakes();
        +//        loadFoodmart();
        +//        loadEarthquakes();
                 loadLegacyDatasources();
             }
          
        Index: saiku-ui/js/saiku/Settings.js
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-ui/js/saiku/Settings.js   (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-ui/js/saiku/Settings.js   (revision )
        @@ -23,7 +23,7 @@
             BIPLUGIN: false,
             BIPLUGIN5: false,
             BASE_URL: window.location.origin,
        -    TOMCAT_WEBAPP: "/saiku",
        +    TOMCAT_WEBAPP: "",
             REST_MOUNT_POINT: "/rest/saiku/",
             DIMENSION_PREFETCH: true,
             DIMENSION_SHOW_ALL: true,
        Index: saiku-ui/pom.xml
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-ui/pom.xml    (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-ui/pom.xml    (revision )
        @@ -288,7 +288,7 @@
          
                </plugins>
            </build>
        -     <repositories>
        +    <!-- <repositories>
                 <repository>
                     <id>jsdoctk1</id>
                     <url>http://jsdoctk-plugin.googlecode.com/svn/repo</url>
        @@ -304,5 +304,5 @@
                     <id>oss.sonatype.org</id>
                     <url>http://oss.sonatype.org/content/groups/public</url>
                 </pluginRepository>
        -    </pluginRepositories>
        +    </pluginRepositories>-->
         </project>
        Index: saiku-webapp/src/main/webapp/WEB-INF/applicationContext-spring-security-cas.xml
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-webapp/src/main/webapp/WEB-INF/applicationContext-spring-security-cas.xml (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-webapp/src/main/webapp/WEB-INF/applicationContext-spring-security-cas.xml (revision )
        @@ -35,12 +35,7 @@
            
            <bean id="exceptionTranslationFilter"
                class="org.springframework.security.web.access.ExceptionTranslationFilter">
        -       <property name="authenticationEntryPoint">
        -           <ref bean="casProcessingFilterEntryPoint" />
        -       </property>
        -       <property name="accessDeniedHandler">
        -           <bean class="org.springframework.security.web.access.AccessDeniedHandlerImpl" />
        -       </property>
        +        <constructor-arg index="0" ref="casProcessingFilterEntryPoint" />
            </bean>
             
            <bean id="casProcessingFilterEntryPoint"
        Index: saiku-webapp/src/main/webapp/WEB-INF/applicationContext-spring-security-jdbc.properties
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-webapp/src/main/webapp/WEB-INF/applicationContext-spring-security-jdbc.properties (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-webapp/src/main/webapp/WEB-INF/applicationContext-spring-security-jdbc.properties (revision )
        @@ -4,6 +4,6 @@
                            select MAX(USERS.USER_ID) ID, USERS.USERNAME from USERS group by USERS.USERNAME) tm on u.USER_ID =\
                            tm.ID where u.username = ? GROUP BY u.USER_ID
         jdbcauth.driver=org.h2.Driver
        -jdbcauth.url=jdbc:h2:../../data/saiku;MODE=MySQL
        +jdbcauth.url=jdbc:h2:/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data//saiku;MODE=MySQL
         jdbcauth.username=sa
         jdbcauth.password=
        \ No newline at end of file
        Index: saiku-webapp/src/main/webapp/WEB-INF/saiku-beans.properties
        IDEA additional info:
        Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
        <+>UTF-8
        ===================================================================
        --- saiku-webapp/src/main/webapp/WEB-INF/saiku-beans.properties (revision 5346badacf166efa4b7f4c6b6247181ee277cb49)
        +++ saiku-webapp/src/main/webapp/WEB-INF/saiku-beans.properties (revision )
        @@ -2,16 +2,16 @@
         external.properties.file=${catalina.base}/conf/Catalina/localhost/datasources.properties
         webdav.password=sa!kuanalyt!cs
         userdao.driverclass=org.h2.Driver
        -userdao.url=jdbc:h2:../../data/saiku;MODE=MySQL
        +userdao.url=jdbc:h2:/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data/saiku;MODE=MySQL
         userdao.username=sa
         userdao.password=
         logdir=../logs
        -repoconfig=../../repository/configuration.xml
        -repodata=../../repository/data
        -foodmartrepo=../../data
        -foodmartschema=../../data/FoodMart4.xml
        -foodmarturl=jdbc:h2:../../data/foodmart;MODE=MySQL
        -earthquakerepo=../../data
        -earthquakeschema=../../data/Earthquakes.xml
        -earthquakeurl=jdbc:h2:../../data/earthquakes;MODE=MySQL
        -pluginpath=../webapps/ROOT/js/saiku/plugins/
        +repoconfig=/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/repository/configuration.xml
        +repodata=/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/repository/data
        +foodmartrepo=/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data
        +foodmartschema=/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data/FoodMart4.xml
        +foodmarturl=jdbc:h2:/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data/foodmart;MODE=MySQL
        +earthquakerepo=/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data
        +earthquakeschema=/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data/Earthquakes.xml
        +earthquakeurl=jdbc:h2:/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/data/earthquakes;MODE=MySQL
        +pluginpath=/Users/qixiaobo/work/saiku/saiku-webapp/target/saiku-webapp-3.8-RC5/js/saiku/plugins/
``` plain
     
5.  配置可以运行artifact  
    其中data和repository为下载ce版本中对应目录  
      
    
6.  此时代码可以自己编译和运行了 如下  
    

[踩][Link 1]


[OSBI_saiku_ saiku analytics - the worlds greatest open source OLAP browser]: https://github.com/OSBI/saiku
[Link 1]: http://f6car.vicp.io:8090/pages/viewpage.action?pageId=4259994
复制代码
 类似资料: