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

轉載請註明出處java

問題一


[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

解決方案:git

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

 

問題二

[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]

解決方案:bash

    修改一下pomdom

    apache版本:maven

 <compileSource>1.8</compileSource>

    cdh版本ui

<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命令。url

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

spa

問題四

[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>
相關文章
相關標籤/搜索