在Eclipse中使用Maven方式编译Kettle 8.0

准备工作,检查编译依赖程序版本,具体版本信息如下

  • Maven, version 3+
  • Java JDK 1.8
  • 下载 settings.xml 到你的 .m2 目录,请先备份原文件
正式开始:

一、从GitHub下载Kettle最新源码

    下载地址:https://github.com/pentaho/pentaho-kettle

二、导入项目

     导入项目之前请确保setting.xml已经放到.m2目录中,用Eclipse通过Maven方式导入刚下载的Kettle项目。

三、安装依赖

    项目有些jar包需要手动安装到本地maven库中,具体操作如下,所需 jar 包下载请 点击

mvn install:install-file  -Dfile=E:\Kettle\syslog4j-0.9.46.jar  -DgroupId=org.syslog4j -DartifactId=syslog4j -Dversion=0.9.46 -Dpackaging=jar

mvn install:install-file  -Dfile=E:\Kettle\libswt\win32\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.win32.win32.x86 -Dversion=4.3.2 -Dpackaging=jar
mvn install:install-file  -Dfile=E:\Kettle\libswt\win32\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.win32.win32.x86 -Dversion=4.6 -Dpackaging=jar

mvn install:install-file  -Dfile=E:\Kettle\libswt\win64\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.win32.win32.x86_64 -Dversion=4.6 -Dpackaging=jar
mvn install:install-file  -Dfile=E:\Kettle\libswt\win64\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.gtk.win64.x86_64 -Dversion=4.6 -Dpackaging=jar

mvn install:install-file  -Dfile=E:\Kettle\libswt\linux\x86\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.gtk.linux.x86 -Dversion=4.3.2 -Dpackaging=jar
mvn install:install-file  -Dfile=E:\Kettle\libswt\linux\x86\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.gtk.linux.x86 -Dversion=4.6 -Dpackaging=jar

mvn install:install-file  -Dfile=E:\Kettle\libswt\linux\x86_64\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.gtk.linux.x86_64 -Dversion=4.3.2 -Dpackaging=jar
mvn install:install-file  -Dfile=E:\Kettle\libswt\linux\x86_64\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.gtk.linux.x86_64 -Dversion=4.6 -Dpackaging=jar

mvn install:install-file  -Dfile=E:\Kettle\libswt\osx64\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.cocoa.macosx.x86_64 -Dversion=4.3.2 -Dpackaging=jar
mvn install:install-file  -Dfile=E:\Kettle\libswt\osx64\swt.jar  -DgroupId=org.eclipse.swt -DartifactId=org.eclipse.swt.cocoa.macosx.x86_64 -Dversion=4.6 -Dpackaging=jar

四、编译

1、在 pantaho-kettle-master 项目上右键选择 Maven >> Update Project... ,此时会下载项目所需依赖,时间较长,需等待.......

2、Update 操作完毕之后在 pantaho-kettle-master 项目上右键选择 Run As >> Maven Build.. ,具体内容如下所示,点击 Run 运行,该操作需要下载运行所需的 OSGi 插件,等待时间更久...

当控制台出现下面的输出时表示构建完成。

[INFO] Reactor Summary:
[INFO] 
[INFO] Pentaho Data Integration ........................... SUCCESS [  6.037 s]
[INFO] PDI Engine Extensions .............................. SUCCESS [  0.217 s]
[INFO] PDI Engine API ..................................... SUCCESS [  8.255 s]
[INFO] PDI Engine Serializers ............................. SUCCESS [ 33.815 s]
[INFO] PDI Core ........................................... SUCCESS [ 18.967 s]
[INFO] PDI Engine ......................................... SUCCESS [02:30 min]
[INFO] PDI DB Dialog ...................................... SUCCESS [ 10.903 s]
[INFO] PDI User Interface ................................. SUCCESS [ 40.877 s]
[INFO] PDI Plugins ........................................ SUCCESS [  0.059 s]
[INFO] PDI Log4j Plugin ................................... SUCCESS [  0.080 s]
[INFO] PDI Log4j Plugin Core .............................. SUCCESS [  1.157 s]
[INFO] PDI Log4j Plugin Assemblies ........................ SUCCESS [  0.031 s]
[INFO] PDI Log4j Plugin Distribution ...................... SUCCESS [  1.434 s]
[INFO] PDI Core Plugins ................................... SUCCESS [  0.038 s]
[INFO] PDI Core Plugins Impl .............................. SUCCESS [  1.574 s]
[INFO] PDI Core Plugins Assemblies ........................ SUCCESS [  0.040 s]
[INFO] PDI Core Plugins Distribution ...................... SUCCESS [  0.475 s]
[INFO] PDI File Open and Save Plugin ...................... SUCCESS [  0.091 s]
[INFO] PDI File Open and Save Plugin Core ................. SUCCESS [ 24.594 s]
[INFO] PDI File Open and Save Plugin Assemblies ........... SUCCESS [  0.123 s]
[INFO] PDI File Open and Save Plugin Distribution ......... SUCCESS [  7.046 s]
[INFO] PDI Repositories Plugin ............................ SUCCESS [  0.073 s]
[INFO] PDI Repositories Plugin Core ....................... SUCCESS [  6.652 s]
[INFO] PDI Repositories Plugin Assemblies ................. SUCCESS [  0.040 s]
[INFO] PDI Repositories Plugin Feature .................... SUCCESS [  3.550 s]
[INFO] PDI Metadata Injection Plugin ...................... SUCCESS [ 16.183 s]
[INFO] PDI Engine Configuration Plugin .................... SUCCESS [  0.038 s]
[INFO] PDI Engine Configuration Plugin API ................ SUCCESS [  1.401 s]
[INFO] PDI Engine Configuration Plugin Implementation ..... SUCCESS [ 11.644 s]
[INFO] PDI Engine Configuration Plugin UI ................. SUCCESS [  1.776 s]
[INFO] PDI Engine Configuration Plugin Assemblies ......... SUCCESS [  0.028 s]
[INFO] PDI Engine Configuration Plugin Feature ............ SUCCESS [  6.010 s]
[INFO] PDI Get Previous Row Field Plugin .................. SUCCESS [  0.025 s]
[INFO] PDI Get Previous Row Field Plugin Core ............. SUCCESS [  1.128 s]
[INFO] PDI Get Previous Row Field Assemblies .............. SUCCESS [  0.036 s]
[INFO] PDI Get Previous Row Field Plugin .................. SUCCESS [  0.417 s]
[INFO] PDI Aggregate Rows Plugin .......................... SUCCESS [  0.100 s]
[INFO] PDI Aggregate Rows Plugin Core ..................... SUCCESS [  1.350 s]
[INFO] PDI Aggregate Rows Plugin Assemblies ............... SUCCESS [  0.045 s]
[INFO] PDI Aggregate Rows Plugin Distribution ............. SUCCESS [01:00 min]
[INFO] PDI Elasticsearch Bulk Insert Plugin ............... SUCCESS [  0.052 s]
[INFO] PDI Elasticsearch Bulk Insert Plugin Core .......... SUCCESS [  1.308 s]
[INFO] PDI Elasticsearch Bulk Insert Plugin Assemblies .... SUCCESS [  0.031 s]
[INFO] PDI Elasticsearch Bulk Insert Plugin Distribution .. SUCCESS [05:34 min]
[INFO] PDI Google Analytics Plugin ........................ SUCCESS [  0.031 s]
[INFO] PDI Google Analytics Plugin Core ................... SUCCESS [  0.792 s]
[INFO] PDI Google Analytics Plugin Assemblies ............. SUCCESS [  0.034 s]
[INFO] PDI Google Analytics Plugin Distribution ........... SUCCESS [  1.014 s]
[INFO] PDI GP Bulk Loader Plugin .......................... SUCCESS [  0.071 s]
[INFO] PDI GP Bulk Loader Plugin Core ..................... SUCCESS [  1.345 s]
[INFO] PDI GP Bulk Loader Plugin Assemblies ............... SUCCESS [  0.024 s]
[INFO] PDI GP Bulk Loader Plugin Distribution ............. SUCCESS [ 59.320 s]
[INFO] PDI HL7 Plugin ..................................... SUCCESS [  0.488 s]
[INFO] PDI HL7 Plugin Core ................................ SUCCESS [  1.147 s]
[INFO] PDI HL7 Plugin Assemblies .......................... SUCCESS [  0.024 s]
[INFO] PDI HL7 Plugin Distribution ........................ SUCCESS [ 57.969 s]
[INFO] PDI Drools Plugin .................................. SUCCESS [  0.029 s]
[INFO] PDI Drools Plugin Core ............................. SUCCESS [  1.330 s]
[INFO] PDI Drools Plugin Assemblies ....................... SUCCESS [  0.047 s]
[INFO] PDI Drools Plugin Distribution ..................... SUCCESS [ 10.705 s]
[INFO] PDI Dummy Plugin ................................... SUCCESS [  0.020 s]
[INFO] PDI Dummy Plugin Core .............................. SUCCESS [  0.967 s]
[INFO] PDI Dummy Plugin Assemblies ........................ SUCCESS [  0.035 s]
[INFO] PDI Dummy Plugin Distribution ...................... SUCCESS [  0.225 s]
[INFO] PDI Json Plugin .................................... SUCCESS [  0.020 s]
[INFO] PDI Json Plugin Core ............................... SUCCESS [  0.978 s]
[INFO] PDI Json Plugin Assemblies ......................... SUCCESS [  0.025 s]
[INFO] PDI Json Plugin Distribution ....................... SUCCESS [  0.227 s]
[INFO] PDI S3 CSV Input Plugin ............................ SUCCESS [  0.019 s]
[INFO] PDI S3 CSV Input Plugin Core ....................... SUCCESS [  0.884 s]
[INFO] PDI S3 CSV Input Plugin Assemblies ................. SUCCESS [  0.037 s]
[INFO] PDI S3 CSV Input Plugin Distribution ............... SUCCESS [  0.576 s]
[INFO] PDI SAP Plugin ..................................... SUCCESS [  0.035 s]
[INFO] PDI SAP Plugin Core ................................ SUCCESS [  0.999 s]
[INFO] PDI SAP Plugin Assemblies .......................... SUCCESS [  0.024 s]
[INFO] PDI SAP Plugin Distribution ........................ SUCCESS [  0.333 s]
[INFO] PDI Shape File Reader Plugin ....................... SUCCESS [  0.058 s]
[INFO] PDI Shape File Reader Plugin Core .................. SUCCESS [  1.255 s]
[INFO] PDI Shape File Reader Plugin Assemblies ............ SUCCESS [  0.023 s]
[INFO] PDI Shape File Reader Plugin Distribution .......... SUCCESS [  0.194 s]
[INFO] PDI GPLoad Plugin .................................. SUCCESS [  0.519 s]
[INFO] PDI GPLoad Plugin Core ............................. SUCCESS [  1.275 s]
[INFO] PDI GPLoad Plugin Assemblies ....................... SUCCESS [  0.024 s]
[INFO] PDI GPLoad Plugin Distribution ..................... SUCCESS [  0.244 s]
[INFO] PDI Openerp Plugin ................................. SUCCESS [  0.045 s]
[INFO] PDI Openerp Plugin Core ............................ SUCCESS [  1.605 s]
[INFO] PDI Openerp Plugin Assemblies ...................... SUCCESS [  0.067 s]
[INFO] PDI Openerp Plugin Distribution .................... SUCCESS [  0.421 s]
[INFO] PDI Palo Plugin .................................... SUCCESS [  0.039 s]
[INFO] PDI Palo Plugin Core ............................... SUCCESS [  4.791 s]
[INFO] PDI Palo Plugin Assemblies ......................... SUCCESS [  0.031 s]
[INFO] PDI Palo Plugin Distribution ....................... SUCCESS [  0.328 s]
[INFO] PDI Version Checker Plugin ......................... SUCCESS [  0.028 s]
[INFO] PDI Version Checker Plugin Core .................... SUCCESS [  4.541 s]
[INFO] PDI Version Checker Plugin Assemblies .............. SUCCESS [  0.025 s]
[INFO] PDI Version Checker Plugin Distribution ............ SUCCESS [  0.502 s]
[INFO] PDI Lucid DB Streaming Loader Plugin ............... SUCCESS [  0.047 s]
[INFO] PDI Lucid DB Streaming Loader Plugin Core .......... SUCCESS [  0.884 s]
[INFO] PDI Lucid DB Streaming Loader Plugin Assemblies .... SUCCESS [  0.035 s]
[INFO] PDI Lucid DB Streaming Loader Plugin Distribution .. SUCCESS [  0.166 s]
[INFO] PDI Salesforce Plugin .............................. SUCCESS [  0.019 s]
[INFO] PDI Salesforce Plugin Core ......................... SUCCESS [  2.046 s]
[INFO] PDI Salesforce Plugin Assemblies ................... SUCCESS [  0.021 s]
[INFO] PDI Salesforce Plugin Distribution ................. SUCCESS [  0.365 s]
[INFO] PDI PUR Plugin ..................................... SUCCESS [  0.033 s]
[INFO] PDI PUR Plugin Core ................................ SUCCESS [ 35.176 s]
[INFO] PDI PUR Plugin Assemblies .......................... SUCCESS [  0.028 s]
[INFO] PDI PUR Plugin Distribution ........................ SUCCESS [  0.697 s]
[INFO] PDI Ms Access Bulk Loader Plugin ................... SUCCESS [  0.028 s]
[INFO] PDI Ms Access Bulk Loader Plugin Core .............. SUCCESS [  0.813 s]
[INFO] PDI Ms Access Bulk Loader Plugin Assemblies ........ SUCCESS [  0.031 s]
[INFO] PDI Ms Access Bulk Loader Plugin Distribution ...... SUCCESS [  0.166 s]
[INFO] PDI XML Plugin ..................................... SUCCESS [  0.022 s]
[INFO] PDI XML Plugin Core ................................ SUCCESS [ 11.335 s]
[INFO] PDI XML Plugin Assemblies .......................... SUCCESS [  0.023 s]
[INFO] PDI XML Plugin Distribution ........................ SUCCESS [  0.281 s]
[INFO] PDI Assemblies ..................................... SUCCESS [  0.026 s]
[INFO] PDI Client Community Edition ....................... SUCCESS [05:19 min]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 23:45 min
[INFO] Finished at: 2017-10-20T17:14:13+08:00
[INFO] Final Memory: 228M/934M
[INFO] ------------------------------------------------------------------------

五、运行程序

1、从生成的最终文件运行

进入工作空间中的 pentaho-kettle-master\assemblies\pdi-ce\target 目录,找到 pdi-ce-8.0-SNAPSHOT.zip 文件,解压后运行 Spoon.bat 启动应用。

2、从Eclipse中运行

运行 kettle-ui-swt 项目的 org.pentaho.di.ui.spoon.Spoon 类。


运行结果:



至此已全部完成,后期修改后重新构建、打包即可。

已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 数字20 设计师:CSDN官方博客 返回首页