Trouble compiling scifio from Git repository

Hello,
I have trouble compiling SCIFIO.
What I want to achieve: create the scifio.jar
What I did:
I’m on Windows 10 x64

  • installed Eclipse 2019-09 for Java development
  • Installed OpenJDK 8 as JDK. Set as default for the project.
  • GIT cloned the master branch of https://github.com/scifio/scifio
  • imported the Maven project
  • Go to the pom.xml in Eclipse.
  • Right-click pom.xml and select -> Run As -> Maven Build

It starts to compile the classes and in the /target/ directory and all the *.class files are generated without problem. However, the tests fail and no .jar is created.
So, why do the tests fail? Is it supposed to fail?
What should I do different, or what is my mistake ?


...
...
[INFO] Running io.scif.writing.TiffFormatTest
[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.121 s - in io.scif.writing.TiffFormatTest
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   APNGFormatTest.baseTest:51->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   APNGFormatTest.testAlpha:60->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   APNGFormatTest.testAnimated:69->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   AVIFormatTest.t1_head:51->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   BMPFormatTest.testKidney_TFl_1:50->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   BMPFormatTest.testKidney_TFl_2:59->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   EPSFormatTest.testOne:59->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   GIFFormatTest.testAnimated:59->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   GIFFormatTest.testBase:50->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   ICSFormatTest.testICSBenchmark:70->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   ICSFormatTest.testICSBenchmark2:81->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   ICSFormatTest.testICSBenchmark3:90->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   ICSFormatTest.testICSBenchmark4:100->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   ICSFormatTest.testQdna1ICS:54->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   ICSFormatTest.testQdna1IDS:62->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   JPEG2000FormatTest.testOne:54->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   JPEG2000FormatTest.testTwo:63->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   JPEGFormatTest.testOne:53->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   PICTFormatTest.testPICT:53->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[ERROR]   QTFormatTest.testWTEmbryo:53->AbstractFormatTest.baseFolder:89->AbstractFormatTest.initBaseFolder:140 » NullPointer
[INFO] 
[ERROR] Tests run: 122, Failures: 0, Errors: 20, Skipped: 1
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  35.641 s
[INFO] Finished at: 2020-12-16T17:30:34+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project scifio: There are test failures.
[ERROR]

The error happens, when you try to build the project in Eclipse.
To resolve the error do the following:
Close Eclipse
Install Apache Maven and add it the path. Set JDK 8 path as well.
Delete the ‘target’ folder
open a command window and go to the SCIFIO root directory and run: ‘mvn’. Not it should build without testing errors.

More information is here:

1 Like