Clone and Build Pentaho Kettle - eclipse

Sorry for basic question, but I have been trying for a while and cannot get anywhere with this.
Any one have experience clone the Pentaho-kettle project and import it into eclipse?
I follow the instruction from https://github.com/pentaho/pentaho-kettle.
I did the following
cd pentaho-kettle
ant clean-all resolve create-dot-classpath
Then I go into eclipse and Import Existing Project into workspace. Note that I am importing from the root folder. Should I include the option scan the nested projects?
Even that, I went into almost all the module(core, engine, ui...) to run the same ant task. However, I still have a bunch of error within eclipse.
Some errors are : Cannot find Type java.lang.Object (which is really strange), and a bunch other not resolving.
Is there any other step I need to follow. If you have success cloning and building from the repo, please help me out here.
To update, this is what I got after following the instruction:

How to build Pentahos Kettle
Simple instructions are underneath.
Necessary tools
eclipse http://www.eclipse.org
ant https://ant.apache.org
First, execute to get latest master
git checkout https://github.com/pentaho/pentaho-kettle.git
then execute (to get stable release u need)
git checkout -b production origin/production
where production is one of names can be found (highlighted red)
u actually already may import this project into eclipse (File->Import). Better if u will assign to eclipse at least 2GB RAM (it is pretty big project). Make some changes in $ECLIPSE_HOME/eclipse.ini file:
-Xms2048m
-Xmx2048m
Now after import is done, eclipse will look this way
Highlighted:
red (default projects after import pentaho-kettle project)
blue are projects i checked out (consider version as well) and add to pentaho-kettle project in build path (Some of class missing despite they have to be in classpath according ivy)
green errors are bugs in eclipse. Those left after even I successfully build/run/execute kettle DI. Another errors are no good.
Open console (I assume ant already available on u machine and ant command already in your PATH)
cd pentaho-kettle
enter to each projects (highlighted red, except pentaho-kettle project) directories and execute
ant clean-all resolve create-dot-classpath
refresh projects in eclipse.
Note: do not execute in pentaho-kettle directory command
ant clean-all resolve create-dot-classpath
It will erase all libraries in subprojects and u will have to start from beginning.
You are done. Now start/debug kettle in eclipse (item in Run Configuration pentaho-kettle will be available)
Some of projects on image highlighted blue, they are used in pentaho-kettle (I think they suppose to be precompiled as jar files in pentaho-kettle/lib but ivy script didn't download them and didn't add them to pentaho-kettle project classpath. Eclipse will report "Some of classes are missing". I just checked them out from github manually as separate project (respect version) and add them to pentaho-kettle project in build path options
This is it.

Related

what is the right way of importing a maven project in Eclipse and run it as a Java project?

I don't understand exactly what is the way of working with maven projects in Eclipse.
The problems I have are often with projects I download from github. If I set the project myself it usually work, so I think I'm doing something different from the majority of people.
I'll try to detail a specific case:
I clone a repo, let's say: https://github.com/spring-guides/tut-spring-boot-oauth2
In Eclipse I import "existing maven project"
The project has a "Maven nature" as indicated by M on the folder icon
I try to run java class with main from Eclipse. First strange thins is that the "Run As" menu doesn't have "Run as a Java application"
I have to configure the configuration manually. Now it runs, but strange things happens, like I can't edit the file as the "content assist" throw errors instead of giving the normal assists.
I notice that the project has no "source folder". So my first instinct is to add a Java nature or select src as source folder
So I add Java nature to the project. This is a disaster. It can compile anymore as it can find packages. All classes have errors. I try to play around setting source folders on /src or /src/main/java. Sometimes I fix the errors but I can't run (and now I have run as Java application) but when I run it can't load the class
So in the end, I'm a bit confused and I don't know if I explained clearly what I'm doing.
I think I would like to know in a simple way how people are doing it, rather than trying to correct my steps as I'm probably creating a mess myself.
Any help or suggestion welcome.
I'm using the last version of eclipse. I don't know which other tool's versions are relevant.
P.S. I also refresh,restart,clean rebuild the project often after touching things...but it doesn't get better
Maven is a build (management) tool. Simply spoken, its task is to create a JAR that can be used as a dependency/library by other projects or when running java -jar ....
Running a project's code isn't part of it (apart from unit and integration tests code and by using non-default plugins for special situations). Running code is part of Eclipse (or any other IDE) with its Run Configurations.

Importing multimodule maven project from Git into Eclipse/STS

I have been desperately trying to import a multimodule maven project from GIT into my (freshly installed) STS 3.9.4.
During the last hours I tried lots of solutions that were posted on stack overflow, but none of them worked for me.
These are the steps I did:
git cloned the repo from the command line (intentionally, because it didn't work either when I used the GIT integration of STS)
imported the project via File / Import / Maven / Existing Maven Projects
After the project was imported, it looks like this:
(please ignore the red icon at the top left, the problems persists even when this icon is not there)
I can Run As / Maven Install any pom.xml, but when I try to edit java sourcecode Eclipse tells me The resource is not on the build path of a Java project.
To fix this I tried:
convert to faceted form
added Java nature
Configure Build Path / Set as source folder
add buildcommand org.eclipse.jdt.core.javabuilder to .project
Being able to build is fine, but editing sourcecode without support for Organize Imports, Format Source, and so on is a real pain.
From your screenshot I assume the modules are nested within the directory of the reactor pom(=parent pom) and you have imported all of them as projects (reactor and modules).
Don't add a java builder to the "reactor" project.
Make sure not to open the java files from the projects corresponding to the reactor pom, but from src folder within the corresponding module projects.
The solution to this problem was somehow hidden, but in the end I have to say the reason was clear.
After I checked with a different multimodule project (https://github.com/Activiti/Activiti.git), I was sure that my STS and other components don't suffer from a generic problem. So the cause must be located in the project itself.
The multimodule project was setup correctly on the pom.xml level. But the topmost pom.xml was modified: most of the modules had been commented out:
The developer who introduced that change didn't experience any problems because he kept his already existing workspace. And the problem only occurs when a new workspace gets created and maven scans the pom files.

are there different ways of importing git repository to Eclipse?

Why when I import a git project it does not appear like full package path view (main.java.comformance) like this image:
I have imported this project before but now in the package view, it only appears as a tree of folders and not full package path view like main.java.comformance with package icons. I wonder what I'm doing differently now. I followed the instructions in this video: https://www.youtube.com/watch?v=L8IeaWHZCRo)?
Both projects on the screenshot do not seem to be configured correctly (probably because they were not created with Eclipse or files like .project were not shared):
The project on the right side is obviously a Maven project (with probably this pom.xml file): the Java source folder should be src/main/java/ (default of Maven) instead of src (default of Eclipse) and the Java packages for instance uk.ac.manchester.cs.jfact instead of main.java.uk.ac.manchester.cs.jfact.
The project on the left side is not even configured as a Java project.
The simplest way is to use the Eclipse Smart Import feature (instead of configure everything manually): the Java nature of the project will be detected even without the .project file and also the pom.xml file is read to get the required JARs and to configure the Java build path and source folder(s) automatically:
Clone the Git repository
In the Git Repositories view right-click the Working Tree node and choose Import Projects...
Do you see the "J" in the icon next to the project name "jfact" at the right image?
That means that it is a "java" project. Eclipse does not know anything about your project.
You will have to do one of this:
Checkout the project again with Eclipse and use a "wizard" configuring it as a java project.
Enable Project Facets (right-click on the project name), and then enable "Java" in the Project Properties/Facets. This is not trivial, so I don't recommend this. - If this is a solution, actually I don't know for sure -
If you are using maven, close the project and execute mvn eclipse:eclipse to convert/create the project files for eclipse, and open again the project.
After you manage it to become a Java project, furter steps could be needed, but maybe will be enough.

Fixing my Scala Intellij project when loading it from an existing project in sbt and dependencies download fails

Oftentimes I have troubles with sbt downloading its dependencies when behind a corporate firewall when trying to "Load a project from existing sources" -> sbt. It eventually times out and leaves my project in the following state:
there is some problem when
I can at this point download all my dependencies through the sbt-terminal tool (or the command-line) but Intellij will still keep this "view", instead of correctly showing me the diverse folders the project contains (like src/, test/, etc).
Is there a way to fix this?
Thanks
I also have had this problem multiple times. I usually close IntelliJ, clean its repository rm -rf .idea/, and then open the project folder (instead of importing it). It's always done the job for me.

Gradle (gradlew) does not build Eclipse path correctly trying to build spring social

I downloaded spring-social-facebook and spring-social-linked in and built the sources as per the README of the github repo for the projects
After I did ./gradlew eclipse and nce I have imported the project into Eclipse, the build path is not set up correctly.
I tried a few manual set up but did not go very far with that.
I am not a gradle user.
I found out that when you do File -> Import -> Existing projects into workspace in Eclipse, I was using the wrong directory to start from.
When you initially clone the git repository, you have a spring-social-linkedin directory created which is the one you then cd to to do the gradlew operations. And then you have a second one which is created : git/spring-social-linkedin/spring-social-linkedin.
This is this second one you need to select as the root directory to look at when you import the project into eclipse and everything will work fine.
Probably obvious for gradle knowledgeable people...