Just murmur

Intellij IDEA 出現 Unindexed remote maven repositories found 的錯誤訊息

最近心血來潮想改用 Intellij IDEA,在匯入 Gradle 專案時出現了如下的錯誤訊息:

Unindexed remote maven repositories found. Disable...
        The following repositories used in your gradle projects were not indexed yet: 
        http://repo1.maven.org/maven2
        If you want to use dependency completion for these repositories artifacts,
        Open Repositories List, select required repositories and press "Update" button (show balloon)

Google 查了一堆解法似乎都不太對,最後從 Stack Overflow 這篇文章找到正確解法,就是 Maven 的部份要額外加上 proxy 的設定,位置在 File -> Setting -> Build, Execution, Deployment -> Build Tools -> Maven -> Importing,要在 VM options for importer 這個設定加上 -DproxySet=true -DproxyHost=host -DproxyPort=port