Orekit-10.3.1 build failed in ubuntu 20.04

ant jar orekit-10.3.1-sources.jar Buildfile: build.xml does not exist! Build failed ant jar orekit-10.3.1.jar
Buildfile: build.xml does not exist!
Build failed

The sources.jar file is not intended for rebuilding the project. It is only a maven artifact intended
to be associated to the binary jar by IDE like eclipse to help debugging higher level applications that
call Orekit.

In order to rebuild (and also to get the full test suite and run it), you should use the source distribution.
This can be found in the orekit download page. The latest version is here. The source distribution contains the build.xml used to build with ant and pom.xml used to build with maven.

Thanks luc for the immediate answer. however I tried the source tar and find errors. I will post you the error message shortly.

/media/loga/Toshiba931/ARCHIVES/orekit-10.3.1$ mvn install
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects…
-------------------------< org.orekit:orekit >--------------------------
[INFO] Building ORbit Extrapolation KIT 10.3.1
[INFO] --------------------------------[ jar ]---------------------------------

Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.069 s - in org.orekit.attitudes.YawSteeringTest
[INFO] Running org.orekit.bodies.CelestialBodyFactoryTest
[ERROR] Tests run: 10, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.638 s <<< FAILURE! - in org.orekit.bodies.CelestialBodyFactoryTest
[ERROR] multithreadTest(org.orekit.bodies.CelestialBodyFactoryTest) Time elapsed: 5.035 s <<< FAILURE!
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32:39 min
[INFO] Finished at: 2021-07-07T14:38:04+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project orekit: There are test failures.

This warning, despite very annoying, is known and not a problem we can solve on out side. It is related to tooling (mvn or java itself, I don’t know, it corresponds to Google Guice dependency injection framework issue 1133 that has plagued many libraries for years. I don’t known if we have just to wait until tools depend on Guice 5.0+ or if we have to require a more recent minimum Java version. Anyway, it is not a problem, just a very annoying warning.

This one is a problem.
The test attempts to run some code in multi-thread mode, with some time limits tat were considered safe (several seconds for something that should run in less than 1/2 second). This kind of test may fail randomly on very slow machines (it however didn’t fail on my previous machine which was an awfully slow 12 years old computer, and it doesn’t fail either on the continuous integration which runs on a basic virtual machine). What make me think about the timeout is the fact the test took 5.638s to run when the time limit is set to 5s. On my own computer the 10 tests from this class run in 0.75s (and this specific test counts for about 0.4s).

Could you try again a few time to see if this failure always occur or it is is transient and was just bad luck? If it can be reproduced frequently (or worse, at each attempt), then could you try to increase the time out near line 262 of CelestialBodyFactoryTest from 5 seconds to something larger (say 10 seconds or more)? Do you see a message like “Not all threads finished → possible deadlock” somewhere in the output? The message may be out-of sync with other outputs because of multi-threading. What version of Java are you using? Is there any problem with multi-threading at other places?

Could you add the following lines above line 267 in CelestialBodyFactoryTest (i.e. between the try with executorService.shutdown and the loop on results Future instances) run the test and check if you get a an output like “nb run: 10, nb done: 10, nb cancelled: 0”?

        int doneCount = 0;
        int cancelledCount = 0;
        for (Future<?> result : results) {
            if (result.isDone()) {
            if (result.isCancelled()) {
        System.out.format("nb run: %d, nb done: %d, nb cancelled: %d%n",
                          results.size(), doneCount, cancelledCount);

Thank luc for the observations, comments and suggestions. i will tryout your suggestions soon. my lap is Lenovo-Yoga-2-Pro Intel® Core™ i5-4200U CPU @ 1.60GHz × 4, Intel® HD Graphics 4400