概述
1.从Kettle官网下载源码,本文使用的是pentaho-kettle-8.2.0.0-R
下载地址:https://codeload.github.com/pentaho/pentaho-kettle/zip/8.2.0.0-R
2.打开eclipse,选择一个新的工作空间,然后设置maven的信息,settings.xml使用官方提供的配置文件点击下载。下载可以根据需要设置自己本地仓库的存储路径。
因为为引入kettle项目源码的时候,会去默认的maven仓库地址下载项目构建所需的依赖,但这些依赖只在Kettle官方的仓库有,所以先配置好kettle的maven仓库地址。
3.引入已存在的maven项目,将解压后的kettle源码引入工作空间,如下图所示选择所有的项目
4.修改pom.xml中swt版本信息,官方的源码在linux系统中开发的,若在windows系统或其他系统中开发时需要更换为相应的swt版本,本文在在windows环境中开发。
工作空间全文搜索“<artifactId>org.eclipse.swt.gtk.linux.x86_64</artifactId>”更改为“ <artifactId>org.eclipse.swt.win32.win32.x86_64</artifactId>”
修改前
修改后
5.配置maven的Lifecycle Mappings
项目导入会存在很多以下错误,需要配置Lifecycle Mappings解决此问题
解决方法如下图:
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-Rassembliesstaticsrcmainresourcesui下的文件复制一下粘贴到pentaho-kettle-8.2.0.0-Ruisrcmainresourcesui文件夹下
7.执行maven clean install,然后运行org.pentaho.di.ui.spoon.Spoon
调整完毕的源码代码地址:https://gitee.com/gq2010/pentaho-kettle-8.2.0.0-R
转载于:https://my.oschina.net/gq2010/blog/3062684
最后
以上就是纯真大山为你收集整理的pentaho-kettle-8.2.0.0-R源码开发环境搭建的全部内容,希望文章能够帮你解决pentaho-kettle-8.2.0.0-R源码开发环境搭建所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复