2015-04-23 27 views
1

我收到此警告,然後嘗試下載這個神祕+ gson版本時出現錯誤。我的POM正在請求版本2.3.1,但不是這個神祕的+。那麼這是從哪裏來的?我也有類似的問題與Android支持v20我的POM請求V18,但它試圖拉V20。這個maven依賴從何而來?

[WARNING] The POM for com.google.code.gson:gson:jar:+ is missing, no dependency information available 

org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: com.google.code.gson:gson:jar:+, com.android.support:support-v4:jar:20.+: Failure to find com.google.code.gson:gson:jar:+ in file://C:\Dev\git\MyApp\main/../repo was cached in the local repository, resolution will not be reattempted until the update interval of repo has elapsed or updates are forced 

我已經嘗試了強制更新做mvn安裝-U但這並沒有幫助。

在我的pom.xml

<dependency> 
     <groupId>com.google.code.gson</groupId> 
     <artifactId>gson</artifactId> 
     <version>2.3.1</version> 
    </dependency> 

回答

2

mvn clean 

然後

mvn dependency:tree 

,並分析哪些是拉動這種依賴性

+0

謝謝。我嘗試過,但它似乎沒有顯示依賴關係拉入的依賴關係。我通過檢查依賴關係的POM,發現我正在使用的是一個「+」版本的GSON。刪除後,這已解決。 – lahsrah