I am trying to build the Californium repository (https://github.com/eclipse/californium) using maven and OpenJDK-8; following the instruction I cloned the repository and used mvn clean install inside the directory to build Californium.
The building continues to fail during TEST phase of Californium.core and also trying with mvn tree:dependency did not help.
Reading the logs it seems an error related to surefire plugin
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (small-tests) on project californium-core: There are test failures.
[ERROR]
[ERROR] Please refer to $HOME/californium/californium-core/target/surefire-reports for the individual test results.
I've read the file with errors in the aforementioned directory and the failure seems to depends on a particular exception in the ./californium-core/target/surefire-reports/TEST-org.eclipse.californium.core.coap.RequestTest.xml file
<testcase name="testSetURIRejectsUnresolvableHost" classname="org.eclipse.californium.core.coap.RequestTest" time="0.022">
<failure message="Expected exception: java.lang.IllegalArgumentException" type="java.lang.AssertionError">java.lang.AssertionError: Expected exception: java.lang.IllegalArgumentException
</failure>
</testcase>
I can't understand if I'm missing something about maven dependencies or it's not my fault Thanks in advance
From what I can see, the project is under active development. I assume you checked out the master branch. That will be changing quite often. The main README file clearly implies that the most recent builds will be volatile. The unit test probably failed because of very new changes that haven't been fully worked out yet.
If you want to use the library, you don't need to build it, just reference the Maven artifact. The README clearly states how to get it, in the "Using Californium in Maven Projects" section.
I tried cloning and building the project myself, and that unit test didn't fail for me, but that could simply be because someone fixed the test between when you cloned it and when I cloned it.