In the process of exploring kettle, how can you enjoy it without running the source code? The previous article used some jar packages, which can also be obtained from the compiled zip package.
Reference:
Copyright statement: This article is an original article by CSDN blogger "ifu25" and follows the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement when reprinting.
Original link: https://blog.csdn.net/ifu25/article/details/103239489
1. Environmental requirements
Reference link
2. Source code/file download
Kettle warehouse location: https://github.com/pentaho/pentaho-kettle (the download problem can be solved by yourself)
This compilation branch: 8.3.0.0-R
Configuration file (settings): https://raw.githubusercontent.com/pentaho/maven-parent-poms/master/maven-support-files/settings.xml (provided by github)
3. Import and run the source code
- Open idea Click open
2. Find the source code directory and click OK to open it.
- Don’t forget to configure the maven environment and kettle settings file
- Project loading (takes longer)
- As shown in the picture after completion
4. Compile and package
1. Compile through the Terminal of the idea, but I will get an error halfway through compilation, so I directly compile and run the command mvn clean install -DskipTests in the background (it will take a long time to package after running. If there is a failure, it is most likely a network problem. You can run it. command retry)
2. After successful compilation, the packaging file is here <source directory>\assemblies\pdi-ce\target\pdi-ce-8.3.0.0-SNAPSHOT.zip
5.debug debugging
- Find the startup method org/pentaho/di/ui/spoon/Spoon.java to start
- The startup will fail here, but idea will add the startup class to the toolbar startup item
- Click Configure Startup Items
- Add vm options -Djava.ext.dirs="lib" , append dist after Working directory
-
document
-
Create a new directory dist under the source code directory (that is, the directory just configured)
-
Place the ui directory in the previously compiled zip package directly under dist
-
Place the jar in the lib directory in the zip under the source code directory \lib\ (if there is still something missing, go to the lib directory under the zip to get it and put it here, such as database driver package, third-party tool package, system development kit)
jar: dom4j-2.1.1.jar,jaxen-1.1.6.jar,slf4j-api-1.7.7.jar
-
If there is a custom plug-in, create a new directory plugins in dist and put the custom plug-in in it.
-
- Start, kill easily
6. Common startup errors:
1. See reference link