Configuring IDE w/Latest Version

I’m trying to load up the latest version of Orekit into my prefered IDE (IntelliJ) and then Eclipse (if I have to) and am failing on both accounts. These both seem to be around the DefaultDataContextPlugin object. In both cases when trying to run the unit tests it won’t compile because the DefaultDataContectPulugin object isn’t found. Under Eclipse it shows up as source code error. Under IntelliJ it shows up as a ServiceConfigurationError. In IntelliJ I was getting compiling errors until I added the tools.jar path manually to my settings but once removed it seems to have stuck.

Is there a manual on configuring IDEs or if not can anyone shed some light on how they setup their development environment for the new build with this plugin architecture? I’m having no problem building from the command line thankfully but we have to be able to quickly get people up and running in IDEs as well.

Hi Hank,

We had some discussions with Evan about this issue. The discussion start from the post at the following link. In summary, Evan proposes to think about multi-modules project for Orekit.

Bryan

1 Like

Hi Hank,

Bryan and I are using Eclipse and we identified the issue a few weeks ago in the thread Bryan mentioned.
Eclipse Maven plugin is not following the Maven build properly and it leads to a compilation error; and an error in the tests.
For now with Eclipse what I’m doing is a “clean install” with skipping the tests.
If I want to run the tests I do it manually (right click on src/test/java package -> run with JUnit).
Or, as you said, you can run a Maven command line, it works!
I don’t think there will be a solution for Eclipse until Maven plugin is fixed or we move to multi-modules (next major version) as Bryan also mentioned.
I think @luc opened an issue on the Maven plugin forge, I ran into it while I was looking for clues but I haven’t tried to find it again. I can do some digging if you’re interested.

As for IntelliJ I think @evan.ward (and maybe @yannick too ?) managed to make it work on their own machines, maybe they would be able to help you set it up.

Cheers,
Maxime

1 Like

I only had Eclipse on long enough to test but I’m continuing to debug with IntelliJ. Since the problem is in the build process the only thing I’ve been able to come up with is manually building the tests from the command line and disabling building of tests in the run configuration. You never realize how much incremental compilation speeds things up until you have to rebuild stuff like this over and over. I’m glad there is an issue for this. It seems like setting up standard IDEs should be a streamlined thing. Thankfully this is just a problem for Orekit developers not users.

Before I jumped to just disabling building through the IDE I tried adding the tools.jar to the classpath in the javac configuration for IntelliJ and it did not help with avoiding the not being able to find all the com.sun.source... classes.

Short term fix is to do the build once with maven (mvn verify) then you can run the tests in IntelliJ, just don’t rebuild the whole thing. IntelliJ will just recompile the files you changed. You may have to exclude the plugin package from compilation.

Hi @hankgrabowski,

I use IntelliJ both on my work computer and private computer. It was some time ago, but at work I am fairly sure that adding tools.jar was enough to solve my build issues. At home (using OpenJDK 13) I struggled more. I had to resort to the trick mentionned by @evan.ward.

I agree that this is a bit problematic. It could potentially scare off new developers.