hbase编译遇到的问题

因为公司内外网切换,我原来放在外网可以开发hbase的环境不能用,只能整个copy 开发环境(linux vm)到外网。但打开eclipse,hbase一堆错误。一个个解决

1. 由于外网也只要靠proxy才能上网。先设置好linux 的proxy。

2. 在eclipse环境下执行maven update,总报错Could not calculate build plan: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved(原来hbase是1.6. 之前改成1.3,就编译通过了)

1) 先看资料说是在plugins的目录下删除 .lastUpdated结尾的文件,然后clean就可以了。照着执行还是报同样的错。

        2) 因为我的maven用的是maven3,想说是不是因为maven-antrun-plugin是在maven2下的。试着加入maven2的库

     <pluginRepository>

        <id>plugin.repo.maven.central</id>

        <url>http://repo1.maven.org/maven2/</url>

        <snapshots>   

            <enabled>false</enabled>

        </snapshots>

    </pluginRepository>  

       在eclipse里面一maven update就报错

     3) 试着在shell命令下执行mvn compile,发现每次都在download 这个jar,而且总是download失败。想着自己下载这个jar,丢到repository相应目录下面。但仍会去下载,而且下不了卡在那里。修改setttings.xml,加入<offline>true</offline>。仍然不起作用。

     4) 进入eclipse,勾选perferences-》maven-offline。再maven update,错误消失,编译通过。

(说明下:maven-antrun-plugin-1.3相关的jar,pom文件都是要自己先下载下来的)


猜你喜欢

转载自lioo.iteye.com/blog/1754578
今日推荐