pentaho-kettle-8.2.0.0-R源碼開發環境搭建

1.從Kettle官網下載源碼,本文使用的是pentaho-kettle-8.2.0.0-Rjava

下載地址:https://codeload.github.com/pentaho/pentaho-kettle/zip/8.2.0.0-Rlinux

2.打開eclipse,選擇一個新的工做空間,而後設置maven的信息,settings.xml使用官方提供的配置文件點擊下載。下載能夠根據須要設置本身本地倉庫的存儲路徑。git

    由於爲引入kettle項目源碼的時候,會去默認的maven倉庫地址下載項目構建所需的依賴,但這些依賴只在Kettle官方的倉庫有,因此先配置好kettle的maven倉庫地址。github

3.引入已存在的maven項目,將解壓後的kettle源碼引入工做空間,以下圖所示選擇全部的項目apache

4.修改pom.xml中swt版本信息,官方的源碼在linux系統中開發的,若在windows系統或其餘系統中開發時須要更換爲相應的swt版本,本文在在windows環境中開發。windows

工做空間全文搜索「<artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>」更改成「 <artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>」app

修改前eclipse

修改後maven

5.配置maven的Lifecycle Mappings
項目導入會存在不少如下錯誤,須要配置Lifecycle Mappings解決此問題ui

解決方法以下圖:

lifecycle-mapping-metadata.xml文件內容:

<?xml version="1.0" encoding="UTF-8"?>
<lifecycleMappingMetadata>
  <pluginExecutions>
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <goals>
          <goal>create-timestamp</goal>
        </goals>
        <versionRange>[0.0,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>

    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <goals>
          <goal>list</goal>
        </goals>
        <versionRange>[0.0,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>

    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.zeroturnaround</groupId>
        <artifactId>jrebel-maven-plugin</artifactId>
        <goals>
          <goal>generate</goal>
        </goals>
        <versionRange>[0.0,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>

    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <goals>
          <goal>compile</goal>
        </goals>
        <versionRange>[0.0,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>

    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <goals>
          <goal>copy-dependencies</goal>
          <goal>unpack</goal>
        </goals>
        <versionRange>[0.0,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>

    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <goals>
          <goal>bundle</goal>
        </goals>
        <versionRange>[1.5,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>    
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <goals>
          <goal>add-resource</goal>
          <goal>parse-version</goal>
        </goals>
        <versionRange>[1.9.1,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>
    
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.commonjava.maven.plugins</groupId>
        <artifactId>directory-maven-plugin</artifactId>
        <goals>
          <goal>highest-basedir</goal>
        </goals>
        <versionRange>[0.1,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>
    
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.pentaho.maven.plugins</groupId>
        <artifactId>license-helper-maven-plugin</artifactId>
        <goals>
          <goal>check-license</goal>
          <goal>bundle</goal>
        </goals>
        <versionRange>[1.5,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>
    
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>com.soebes.maven.plugins</groupId>
        <artifactId>iterator-maven-plugin</artifactId>
        <goals>
          <goal>iterator</goal>
          <goal>bundle</goal>
        </goals>
        <versionRange>[0.4,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>
    
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>karaf-maven-plugin</artifactId>
        <goals>
          <goal>features-generate-descriptor</goal>
        </goals>
        <versionRange>[3.0.3,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>    
    
    <pluginExecution>
      <pluginExecutionFilter>
        <groupId>com.google.code.maven-replacer-plugin</groupId>
        <artifactId>replacer</artifactId>
        <goals>
          <goal>replace</goal>
        </goals>
        <versionRange>[1.5.2,)</versionRange>
      </pluginExecutionFilter>
      <action>
        <ignore />
      </action>
    </pluginExecution>    
        
        
  </pluginExecutions>
</lifecycleMappingMetadata>

6.將pentaho-kettle-8.2.0.0-R\assemblies\static\src\main\resources\ui下的文件複製一下粘貼到pentaho-kettle-8.2.0.0-R\ui\src\main\resources\ui文件夾下

7.執行maven clean install,而後運行org.pentaho.di.ui.spoon.Spoon

調整完畢的源碼代碼地址:https://gitee.com/gq2010/pentaho-kettle-8.2.0.0-R

相關文章
相關標籤/搜索