windows環境中hbase源碼編譯遇到的問題


轉載請注明出處

問題一


[ERROR] Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.0:findbugs (default) 


on project
hbase: Unable to parse configuratio

mojo org.codehaus.mojo:findbugs-maven-plugin:3.0.0:findbugs for parameter pluginArtifacts: Cannot assign configuration entry 'pluginArtifacts' with value '${plugin.artifacts}' of type java.util.Collections.UnmodifiableRandomAccessList to property of type java.util.ArrayList -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.0:findbugs (default) on project hbase: Unable to parse configuration of mojo org.codehaus.mojo:findbugs-maven-plugin:3.0.0:findbugs for parameter pluginArtifacts: Cannot assign configuration entry 'pluginArtifacts' with value '${plugin.artifacts}' of type java.util.Collections.UnmodifiableRandomAccessList to property of type java.util.ArrayList

解決方案:

     降低maven的版本,在3.6.+的版本上會報這個錯

 

問題二

[ERROR] Failed to execute gol org.apache.maven.plugins:maven-enforcer-plugin:1.4:enforce (min-maven-min-java-banned-xerces) on project hbase: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -> [Help 1]

解決方案:

    修改一下pom

    apache版本:

 <compileSource>1.8</compileSource>

    cdh版本

<javaVersion>1.8</javaVersion>
<targetJavaVersion>1.8</targetJavaVersion>

  

問題三

Caused by: java.io.IOException: Cannot run program "bash" (in directory "。。。。。“”): CreateProcess error=2, 系統找不到指定的文件。

   解決方案:

     這是因為在Windows環境不能執行bash。那么需要能執行bash環境,有一個神器:Git安裝git后,打開Git Bash,即可在Windows系統中執行Linux命令。

cd到hbase源碼項目根目錄,執行mvn package  -DskipTests=true即可。

問題四

[WARNING] Some problems were encountered while building the effective model for org.apache.hbase:hbase-shaded-client:jar:1.2.0-cdh5.14.4
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-resources-plugin is missing. @ org.apache.hbase:hbase:1.2.0-cdh5.14.4, D:\hbase_src\cdh\hbase-1.2.0-cdh5.14.4-src\hbase-1.2.0-cdh5.14.4\pom.xml, line 1059, column 15
[WARNING]

  

解決方案:

POM.xml中maven-compiler-plugin插件信息如下

 

<plugins>    
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>    
        <configuration>    
            <source>1.6</source>    
            <target>1.6</target>    
        </configuration>    
    </plugin>    
</plugins>



<plugins>    
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>  
        <version>2.3.2</version>  
        <configuration>    
            <source>1.6</source>    
            <target>1.6</target>    
        </configuration>    
    </plugin>    
</plugins>

  

 問題五

編譯太慢,修改鏡像,找到mirrors元素, 在它里面添加子元素mirror:

    <!-- 阿里雲中央倉庫 -->
    <mirror>
        <id>nexus-aliyun</id>
        <mirrorOf>central</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
    </mirror>

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM