2018年5月28日星期一

intellij import bazel 项目报错

intellij 加载 bazel 项目刚开始就报错:cannot run program bazel error=2

解决:在 settings 中的 other settings -> bazel settings 将 bazel binary location 改为 /usr/local/bin/bazel 即可。

2018年5月23日星期三

设置maven镜像源

由于国内网络原因,官方maven镜像源经常无法访问,全局设置maven镜像源:

vim ~/.m2/settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          https://maven.apache.org/xsd/settings-1.0.0.xsd">
      <mirrors>
        <mirror>
            <id>alimaven</id>
            <name>aliyun maven</name>
            <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
            <mirrorOf>central</mirrorOf>       
        </mirror>
      </mirrors>
</settings>

将maven源修改为阿里云的镜像源。