1

I know there is a similar question to this (to question: Neo4j Spatial: can't run spatial), however that question seems to be solved when installing dependencies. I think that is not the solution to my case.

After installing Neo4j and installing maven

$ brew install neo4j
$ brew install maven

making a directory called spatial and cloning neo4j-spatial to this folder.

$ git clone https://github.com/neo4j-contrib/spatial.git

Then i tried to maven install this git clone.

/spatial$ mvn install

After a lot of test it returns a "Build failure"

Results :

Failed tests: 
  ProgressLoggingListenerTest.testProgressLoggingListnerWithAllLogs:38->testProgressLoggingListenerWithSpecifiedWaits:62 
Argument(s) are different! Wanted:
forwardingPrintStream.println(
    "100.00 (10/10) - Completed test"
);
-> at org.neo4j.gis.spatial.ProgressLoggingListenerTest.testProgressLoggingListenerWithSpecifiedWaits(ProgressLoggingListenerTest.java:62)
Actual invocation has different arguments:
forwardingPrintStream.println(
    "10,00 (1/10) - Running test"
);
-> at org.neo4j.gis.spatial.rtree.ProgressLoggingListener.lambda$new$1(ProgressLoggingListener.java:45)

  ProgressLoggingListenerTest.testProgressLoggingListnerWithOnlyStartAndEnd:46->testProgressLoggingListenerWithSpecifiedWaits:62 
Argument(s) are different! Wanted:
forwardingPrintStream.println(
    "100.00 (10/10) - Completed test"
);
-> at org.neo4j.gis.spatial.ProgressLoggingListenerTest.testProgressLoggingListenerWithSpecifiedWaits(ProgressLoggingListenerTest.java:62)
Actual invocation has different arguments:
forwardingPrintStream.println(
    "10,00 (1/10) - Running test"
);
-> at org.neo4j.gis.spatial.rtree.ProgressLoggingListener.lambda$new$1(ProgressLoggingListener.java:45)


Tests run: 146, Failures: 2, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:34 min
[INFO] Finished at: 2016-09-23T15:55:35+02:00
[INFO] Final Memory: 44M/558M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project neo4j-spatial: There are test failures.
[ERROR] 
[ERROR] Please refer to /Volumes/Macintosh HD/Users/Tom/spatial/target/surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

In my queeste to solve this "Build failure" I discovered that most maven install errors are due to dependencies. However these error messages do not indicate any missing dependencies?

I tried using mvn verify however this just seems to try to build the plugin again returning the same Build failure.

/spatial$ mvn verify 

Two questions; - Am I missing dependencies or is the problem in something else? - If I am missing dependencies, what are they and how to install them?

Thanks in advance!

Community
  • 1
  • 1
Tom Hemmes
  • 2,000
  • 2
  • 17
  • 23
  • 1
    This isn't a dependency problem, the build failure comes from tests failure. You can skip them and/or let the authors know of the issue. – Tunaki Sep 23 '16 at 14:35

1 Answers1

2

The tests depend on the locale of the build environment as it checks the result of number formatting with decimal number, expecting a point as the decimal separator:

"100.00 (10/10) - Completed test"

Your locale uses the comma as the decimal separator, based on the actual value reported:

"10,00 (1/10) - Running test"

You have 2 options:

  • Build the project without running the tests:

    mvn install -Dmaven.test.skip
    
  • Change the locale for the build:

    LANG=C mvn install
    

    or

    LANG=en_US mvn install
    
Frank Pavageau
  • 11,477
  • 1
  • 43
  • 53
  • I was a bit skeptical at first running Maven without the test, but OSM import is running now so it is working. Amazing, thanks Frank! – Tom Hemmes Sep 26 '16 at 07:55
  • By the way, you could report the issue on Github, so the project can be fixed to build with any locale. – Frank Pavageau Sep 26 '16 at 08:20