2016-09-23 78 views
1

我知道還有一個類似的問題(問題:Neo4j Spatial: can't run spatial),但是這個問題在安裝依賴關係時似乎解決了。我認爲這不是我的案子的解決方案。Neo4j-spatial maven build failure

安裝的Neo4j和安裝Maven

$ brew install neo4j 
$ brew install maven 

作出稱爲空間和克隆的Neo4j空間到該文件夾​​目錄之後。

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

然後我試圖讓maven安裝這個git clone。

/spatial$ mvn install 

大量測試後,它會返回一個「構建失敗」

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 

在我queeste解決這個「構建失敗」我發現,大多數行家安裝錯誤是由於依賴關係。但是,這些錯誤消息不表示任何缺失的依賴關係?

我嘗試使用mvn驗證,但是這似乎嘗試構建插件再次返回相同的生成失敗。

/spatial$ mvn verify 

有兩個問題; - 我是否缺少依賴或者是其他問題? - 如果我缺少依賴關係,它們是什麼以及如何安裝它們?

提前致謝!

+1

這不是依賴性問題,構建失敗來自測試失敗。你可以跳過它們和/或讓作者知道這個問題。 – Tunaki

回答

2

的測試取決於構建環境的區域,因爲它檢查與十進制數數字格式的結果,期望的點作爲小數分隔:

「100.00(10/10) - 完成測試「

您的區域設置使用逗號作爲小數點分隔符,根據實際值報:

」10,00(1/10) - 運行測試「

你有2種選擇:

  • 生成項目,但不運行測試:

    mvn install -Dmaven.test.skip 
    
  • 更改語言環境的構建:

    LANG=C mvn install 
    

    LANG=en_US mvn install 
    
+0

我在第一次運行Maven時沒有測試,但有點懷疑,但是OSM導入現在正在運行,所以它正在工作。非常感謝,謝謝弗蘭克! –

+0

順便說一句,你可以在Github上報告這個問題,所以這個項目可以被修復以用任何語言環境來構建。 –

+0

是的,只是。感謝您的提醒 ;-) –