Maven build problem
- Dominant language
- Java
- Stars
- 1.4k
- Forks
- 350
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I set up Eclipse, JDK8, cloned imagej/imagej, imported the project -> everything OK.
I can also start & debug ImageJ 2.1.1-snapshot from with Eclipse. (go to net.imagej->main.java and Run As->Java App)
But I can't get the maven build to succeed to build the package or do an install.
It will fail during the tests.
What can I do to skip the tests? What is my mistake, so that I can build the package, or do a maven install?
My goal is to create and test a stand-alone version for testing my modifications.
```
[ERROR] Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 4.614 s <<< FAILURE! - in net.imagej.app.MainTest
[ERROR] testMains(net.imagej.app.MainTest) Time elapsed: 3.787 s <<< ERROR!
org.scijava.NoSuchServiceException: Service net.imagej.app.MainTest$LitmusService not found.
at net.imagej.app.MainTest.testMains(MainTest.java:60)
[ERROR] testHeadless(net.imagej.app.MainTest) Time elapsed: 0.719 s <<< ERROR!
org.scijava.NoSuchServiceException: Service net.imagej.app.MainTest$LitmusService not found.
at net.imagej.app.MainTest.testHeadless(MainTest.java:75)
[INFO] Running net.imagej.app.ServiceCompletenessTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.073 s - in net.imagej.app.ServiceCompletenessTest
[INFO] Running net.imagej.app.ToplevelImageJAppTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.071 s <<< FAILURE! - in net.imagej.app.ToplevelImageJAppTest
[ERROR] testApp(net.imagej.app.ToplevelImageJAppTest) Time elapsed: 0.07 s <<< FAILURE!
java.lang.AssertionError
at net.imagej.app.ToplevelImageJAppTest.testApp(ToplevelImageJAppTest.java:71)
[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR] ToplevelImageJAppTest.testApp:71
[ERROR] Errors:
[ERROR] MainTest.testHeadless:75 » NoSuchService Service net.imagej.app.MainTest$Litmu...
[ERROR] MainTest.testMains:60 » NoSuchService Service net.imagej.app.MainTest$LitmusSe...
[INFO]
[ERROR] Tests run: 5, Failures: 1, Errors: 2, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19.141 s
[INFO] Finished at: 2020-12-16T21:04:18+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project imagej: There are test failures.
[ERROR]
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the Maven Surefire failure and read net.imagej.app.MainTest at lines 60 and 75, plus ToplevelImageJAppTest at line 71. Use the reported service lookup errors and assertion failure to trace the test setup. Done means the relevant tests pass and Maven can build or install the package.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100