zoukankan      html  css  js  c++  java
  • Ambari 1.7 源码编译笔记

    环境CentOS 6.5
    1.安装jdk
    [root@localhost zzh]# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jdk-7u79-linux-x64.rpm
    [root@localhost zzh]# rpm -ivh jdk-7u79-linux-x64.rpm
    环境变量 :
    [root@localhost zzh]# vi /etc/profile
    JAVA_HOME=/usr/java/jdk1.7.0_79
    JRE_HOME=/usr/java/jdk1.7.0_79/jre
    PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
    CLASSPATH=.:$JAVA_HOME/lib.dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
    export JAVA_HOME JRE_HOME PATH CLASSPATH
     
    2. 安装maven 3.0.5
    下载 apache-maven-3.0.5-bin.tar.gz
     [root@localhost zzh]# tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /opt
    [root@localhost zzh]# cd /opt
     [root@localhost opt]# ln -s /opt/apache-maven-3.0.5 maven
    环境变量:
    vi /etc/profile
    MAVEN_HOME=/opt/maven
    PATH=$PATH:$MAVEN_HOME/bin
     
    3. 安装python2.6
     
    4.安装  rpm-build
    [root@localhost zzh]# yum install rpm-build
     
    5.安装gcc-c++

    [root@localhost zzh]# rpm -qa | grep gcc-c++

    [root@localhost zzh]# yum install gcc-c++

     

    6.安装 nodejs
    [root@localhost zzh]# wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz
    [root@localhost zzh]# tar -zxvf node-v0.10.26-linux-x64.tar.gz -C /opt
    [root@localhost zzh]# cd /opt
    [root@localhost opt]# ln -s node-v0.10.26-linux-x64 node
    环境变量:
    [root@localhost opt]# vi /etc/profile
    NODE_HOME=/opt/node
    PATH=$PATH:NODE_HOME/bin
    [root@localhost zzh]# source /etc/profile
    检查
    [root@localhost zzh]# node -v
    v0.10.26
    [root@localhost zzh]# npm -v
    1.4.3
     
    7.安装brunch
    [root@localhost zzh]# npm install -g brunch@1.7.20
    npm http GET https://registry.npmjs.org/brunch/1.7.20
    npm http 200 https://registry.npmjs.org/brunch/1.7.20
    ....
    /opt/node/bin/brunch -> /opt/node/lib/node_modules/brunch/bin/brunch
    brunch@1.7.20 /opt/node/lib/node_modules/brunch
    ├── debug@0.7.4
    ├── async-waterfall@0.1.5
    ├── commonjs-require-definition@0.1.2
    ├── async-each@0.1.6
    ├── commander@2.0.0
    ├── ncp@0.4.2
    ├── mkdirp@0.3.5
    ├── coffee-script@1.8.0
    ├── init-skeleton@0.2.4 (rimraf@2.2.8)
    ├── source-map@0.1.43 (amdefine@1.0.0)
    ├── anymatch@1.0.0 (minimatch@1.0.0)
    ├── chokidar@0.12.6 (readdirp@1.3.0)
    ├── read-components@0.6.1 (component-builder@0.10.1)
    ├── loggy@0.2.2 (ansi-color@0.2.1growl@1.8.1date-utils@1.2.18)
    ├── anysort@1.0.1 (anymatch@1.3.0)
    └── pushserve@0.1.6 (connect-slashes@0.0.11express@3.3.8)
     
    8.安装setuptools
    [root@localhost zzh]# wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-12.0.3.tar.gz#md5=f07e4b0f4c1c9368fcd980d888b29a65 
    [root@localhost zzh]# tar -zxvf setuptools-12.0.3.tar.gz
    [root@localhost zzh]# cd setuptools-12.0.3
    [root@localhost zzh]# python setup.py install
     
    8.获取ambari1.7.0源码并编译
    [root@localhost zzh]# wget https://github.com/apache/ambari/archive/release-1.7.0.zip
    [root@localhost zzh]# unzip release-1.7.0
    [root@localhost zzh]# cd ambari-release-1.7.0/
    [root@localhost ambari-release-1.7.0]# mvn versions:set -DnewVersion=1.7.0.0
    [root@localhost ambari-release-1.7.0]# mvn -B clean install package rpm:rpm -DnewVersion=1.7.0.0 -DskipTests -Dpython.ver="python>= 2.6"
     
    如果出现域名不能解析的情况
    vi /etc/resolv.conf,增加
    nameserver 8.8.8.8
    nameserver 202.106.196.115
     
    另,安装过程中出现了很多错误,解决过程记录如下:
     
    错误1: --版本不匹配
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.8:regex-property (parse-package-version) @ ambari ---
    [INFO] No match to regex '^([0-9]+).([0-9]+).([0-9]+)(.|-).*' found in '1.7.0'. The initial value '1.7.0' is left as-is...
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.8:regex-property (parse-package-release) @ ambari ---
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] Ambari Main ....................................... FAILURE [1.526s]
    [INFO] Apache Ambari Project POM ......................... SKIPPED
    [INFO] Ambari Web ........................................ SKIPPED
    [INFO] Ambari Views ...................................... SKIPPED
    [INFO] Ambari Admin View ................................. SKIPPED
    [INFO] Ambari Server ..................................... SKIPPED
    [INFO] Ambari Agent ...................................... SKIPPED
    [INFO] Ambari Client ..................................... SKIPPED
    [INFO] Ambari Python Client .............................. SKIPPED
    [INFO] Ambari Groovy Client .............................. SKIPPED
    [INFO] Ambari Shell ...................................... SKIPPED
    [INFO] Ambari Python Shell ............................... SKIPPED
    [INFO] Ambari Groovy Shell ............................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3.846s
    [INFO] Finished at: Fri Jan 29 06:57:20 PST 2016
    [INFO] Final Memory: 8M/19M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.mojo:build-helper-maven-plugin:1.8:regex-property (parse-package-release) on project ambari: No match to regex '^([0-9]+).([0-9]+).([0-9]+)(.|-)(([0-9]+)|(SNAPSHOT)).*' found in '1.7.0'. -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
     
    解决办法:
    之前将1.7.0.0手误写成1.7.0导致,改成-DnewVersion=1.7.0.0即可
    当然,也可以修改pom.xml代码:
    [root@localhost ambari-release-1.7.0]vi pom.xml 
    搜索“SNAPSHOT“,定位到111行: <regex>^([0-9]+).([0-9]+).([0-9]+)(.|-)(([0-9]+)|(SNAPSHOT)).*</regex>
    将之后的113行改为: <failIfNoMatch>false</failIfNoMatch>
    [root@localhost ambari-release-1.7.0]mvn -B clean install package rpm:rpm -DnewVersion=1.7.0 -DskipTests -Dpython.ver="python>= 2.6" 
     
    9. 错误2:安装过程中发现phantomjs无法下载--需手动安装phantomjs
         [exec] > phantomjs@1.9.19 install /root/zzh/ambari-1.7.0/ambari-web/node_modules/phantomjs
         [exec] > node install.js
         [exec] 
         [exec] 
         [exec] 
         [exec] PhantomJS not found on PATH
         [exec] Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
         [exec] Saving to /root/zzh/ambari-1.7.0/ambari-web/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
         [exec] Receiving...
         [exec] 
         [exec] 
         [exec] Error making request.
         [exec] Error: read ECONNRESET
         [exec]     at errnoException (net.js:904:11)
         [exec]     at TCP.onread (net.js:558:19)
          ..........................................................
    INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] Ambari Web ........................................ FAILURE [11:58.242s]
    [INFO] Ambari Views ...................................... SKIPPED
    [INFO] Ambari Admin View ................................. SKIPPED
    [INFO] Ambari Server ..................................... SKIPPED
    [INFO] Ambari Agent ...................................... SKIPPED
    [INFO] Ambari Client ..................................... SKIPPED
    [INFO] Ambari Python Client .............................. SKIPPED
    [INFO] Ambari Groovy Client .............................. SKIPPED
    [INFO] Ambari Shell ...................................... SKIPPED
    [INFO] Ambari Python Shell ............................... SKIPPED
    [INFO] Ambari Groovy Shell ............................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 12:00.978s
    [INFO] Finished at: Fri Jan 29 07:50:00 PST 2016
    [INFO] Final Memory: 8M/19M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (compile) on project ambari-web: An Ant BuildException has occured: exec returned: 8
    [ERROR] around Ant part ...<exec dir="/root/zzh/ambari-1.7.0/ambari-web" executable="brunch" failonerror="true">... @ 8:88 in /root/zzh/ambari-1.7.0/ambari-web/target/antrun/build-ambari-web-compile.xml
    [ERROR] -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
     
    解决办法:
    手动安装对应版本的phantomjs
    [root@localhost zzh]# wget http://npm.taobao.org/mirrors/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
    [root@localhost zzh]# vi /etc/profile
    PHANTOMJS_HOME=/opt/phantomjs
    PATH=$PATH:$PHANTOMJS_HOME/bin
    [root@localhost zzh]# source /etc/profile
    [root@localhost ambari-release-1.7.0]mvn -B clean install package rpm:rpm -DnewVersion=1.7.0.0 -DskipTests -Dpython.ver="python>= 2.6" -rf ambari-web
     
     
    错误3:安装过程中发现还是有错误,切换taobao的npm源:
    [root@localhost ambari-release-1.7.0]npm config get registry
    npm config set registry  https://registry.npmjs.org/
    [root@localhost ambari-release-1.7.0]# npm config set registry https://registry.npm.taobao.org [root@localhost ambari-release-1.7.0]# npm info underscore (如果上面配置正确这个命令会有字符串response

    错误4:gyp: /root/.node-gyp/0.10.26/common.gypi not found
         [exec] 
         [exec] > contextify@0.1.15 install /root/zzh/ambari-1.7.0/ambari-web/node_modules/karma-ember-precompiler-brunch/node_modules/jsdom/node_modules/contextify
         [exec] > node-gyp rebuild
         [exec] 
         [exec] npm http GET https://registry.npm.taobao.org/brace-expansion
         [exec] gyp: /root/.node-gyp/0.10.26/common.gypi not found (cwd: /root/zzh/ambari-1.7.0/ambari-web/node_modules/karma-ember-precompiler-brunch/node_modules/jsdom/node_modules/contextify) while reading includes of binding.gyp
         [exec] gyp ERR! configure error 
         [exec] gyp ERR! stack Error: `gyp` failed with exit code: 1
         [exec] gyp ERR! stack     at ChildProcess.onCpExit (/opt/node-v0.10.26-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:337:16)
         [exec] gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
         [exec] gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
         [exec] gyp ERR! System Linux 2.6.32-431.el6.x86_64
         [exec] gyp ERR! command "node" "/opt/node-v0.10.26-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
         [exec] gyp ERR! cwd /root/zzh/ambari-1.7.0/ambari-web/node_modules/karma-ember-precompiler-brunch/node_modules/jsdom/node_modules/contextify
         [exec] gyp ERR! node -v v0.10.26
         [exec] gyp ERR! node-gyp -v v0.12.2
         [exec] gyp ERR! not ok 
     
    解决办法:
    [root@localhost ~]# rm ~/.node-gyp/ -rf
    [root@localhost ambari-release-1.7.0]mvn -B clean install package rpm:rpm -DnewVersion=1.7.0.0 -DskipTests -Dpython.ver="python>= 2.6" -rf ambari-web
     
    错误5. 依赖项错误
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] Ambari Main ....................................... SUCCESS [24.486s]
    [INFO] Apache Ambari Project POM ......................... SUCCESS [2.171s]
    [INFO] Ambari Web ........................................ SUCCESS [4:03.923s]
    [INFO] Ambari Views ...................................... SUCCESS [32.005s]
    [INFO] Ambari Admin View ................................. SUCCESS [2:53.443s]
    [INFO] Ambari Server ..................................... FAILURE [13:30.971s]
    [INFO] Ambari Agent ...................................... SKIPPED
    [INFO] Ambari Client ..................................... SKIPPED
    [INFO] Ambari Python Client .............................. SKIPPED
    [INFO] Ambari Groovy Client .............................. SKIPPED
    [INFO] Ambari Shell ...................................... SKIPPED
    [INFO] Ambari Python Shell ............................... SKIPPED
    [INFO] Ambari Groovy Shell ............................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 21:29.129s
    [INFO] Finished at: Wed Feb 17 04:52:34 PST 2016
    [INFO] Final Memory: 31M/76M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project ambari-server: Could not resolve dependencies for project org.apache.ambari:ambari-server:jar:1.7.0.0: Failed to collect dependencies for [org.apache.ambari:ambari-views:jar:1.7.0.0 (compile), commons-io:commons-io:jar:2.1 (compile), com.google.inject.extensions:guice-assistedinject:jar:3.0 (compile), com.google.inject.extensions:guice-persist:jar:3.0 (compile), com.google.inject.extensions:guice-servlet:jar:3.0 (compile), com.google.inject.extensions:guice-multibindings:jar:3.0 (compile), org.apache.derby:derby:jar:10.9.1.0 (compile), org.springframework.security:spring-security-core:jar:3.1.2.RELEASE (compile), org.springframework.security:spring-security-config:jar:3.1.2.RELEASE (compile), org.springframework.security:spring-security-web:jar:3.1.2.RELEASE (compile), org.springframework:spring-mock:jar:2.0.8 (test), org.springframework.security:spring-security-ldap:jar:3.1.2.RELEASE (compile), org.springframework.ldap:spring-ldap-core:jar:1.3.1.RELEASE (compile), org.apache.directory.server:apacheds-core:jar:1.5.5 (compile), org.apache.directory.server:apacheds-protocol-ldap:jar:1.5.5 (compile), org.apache.directory.shared:shared-ldap:jar:0.9.17 (compile), org.slf4j:slf4j-api:jar:1.7.2 (compile), org.slf4j:slf4j-log4j12:jar:1.7.2 (compile), log4j:log4j:jar:1.2.16 (compile), org.eclipse.persistence:eclipselink:jar:2.4.0 (compile), org.mockito:mockito-core:jar:1.8.5 (test), org.eclipse.jetty:jetty-security:jar:7.6.7.v20120910 (compile), org.eclipse.jetty:jetty-servlet:jar:7.6.7.v20120910 (compile), org.eclipse.jetty:jetty-webapp:jar:7.6.7.v20120910 (compile), org.eclipse.jetty:jetty-server:jar:7.6.7.v20120910 (compile), commons-logging:commons-logging:jar:1.1.1 (compile), commons-codec:commons-codec:jar:1.8 (compile), commons-lang:commons-lang:jar:2.5 (compile), commons-httpclient:commons-httpclient:jar:3.1 (compile), commons-net:commons-net:jar:1.4.1 (compile), javax.servlet:servlet-api:jar:2.5 (compile), com.sun.jersey:jersey-json:jar:1.11 (compile), com.sun.jersey:jersey-server:jar:1.11 (compile), com.sun.jersey:jersey-client:jar:1.11 (compile), com.sun.jersey.contribs:jersey-multipart:jar:1.11 (compile), com.sun.jersey.contribs:jersey-guice:jar:1.11 (compile), org.codehaus.jackson:jackson-mapper-asl:jar:1.9.2 (compile), org.codehaus.jackson:jackson-core-asl:jar:1.9.9 (compile), org.codehaus.jackson:jackson-jaxrs:jar:1.9.9 (compile), org.codehaus.jackson:jackson-xc:jar:1.9.9 (compile), com.sun.jersey.jersey-test-framework:jersey-test-framework-core:jar:1.11 (test), com.sun.jersey.jersey-test-framework:jersey-test-framework-grizzly2:jar:1.11 (test), org.codehaus.jettison:jettison:jar:1.1 (test), junit:junit:jar:4.10 (test), org.easymock:easymock:jar:3.1 (test), org.powermock:powermock-core:jar:1.5 (test), org.powermock:powermock-reflect:jar:1.5 (test), org.powermock:powermock-api-easymock:jar:1.5 (test), org.powermock:powermock-module-junit4:jar:1.5 (test), org.objenesis:objenesis-tck:jar:1.2 (compile), cglib:cglib:jar:2.2.2 (compile), asm:asm:jar:3.3.1 (compile), com.google.inject:guice:jar:3.0 (compile), com.google.code.gson:gson:jar:2.2.2 (compile), org.postgresql:postgresql:jar:9.3-1101-jdbc4 (compile), org.apache.httpcomponents:httpclient:jar:4.2.5 (compile), com.google.guava:guava:jar:14.0.1 (compile), com.google.code.findbugs:jsr305:jar:1.3.9 (compile), org.quartz-scheduler:quartz:jar:2.2.1 (compile), org.quartz-scheduler:quartz-jobs:jar:2.2.1 (compile), org.apache.velocity:velocity:jar:1.7 (compile)]: Failed to read artifact descriptor for com.sun.jersey:jersey-core:jar:1.11: Could not transfer artifact com.sun.jersey:jersey-core:pom:1.11 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known: Unknown host repo.maven.apache.org: Name or service not known -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
    [ERROR] 
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR]   mvn <goals> -rf :ambari-server
     
     
    解决办法:
    默认的maven镜像有问题,一些包下载不下来,网上搜索了一下,增加两个mirror
    vi /opt/maven/conf/setting.xml

    <mirror>

    <id>jboss-public-repository-group</id>

    <mirrorOf>central</mirrorOf>

    <name>JBoss Public Repository Group</name>

    <url>http://repository.jboss.org/nexus/content/groups/public</url>

    </mirror>

     

    <mirror>

    <id>ibiblio</id>

    <mirrorOf>central</mirrorOf>

    <name>Human Readable Name for this Mirror.</name>

    <url>http://mirrors.ibiblio.org/pub/mirrors/maven2/</url>

    </mirror>

    使用下面命令继续:
    [root@localhost ambari-1.7.0]# mvn -B clean install package rpm:rpm -DnewVersion=1.7.0.0 -DskipTests -Dpython.ver="python>= 2.6" -rf ambari-server
     
     
    错误6:Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (python-package) on project ambari-agent
    INFO]                                                                         
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Ambari Agent 1.7.0.0
    [INFO] ------------------------------------------------------------------------
    [INFO] 
    [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ ambari-agent ---
    [INFO] Deleting /root/zzh/ambari-1.7.0/ambari-agent (includes = [**/*.pyc], excludes = [])
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.8:regex-property (parse-package-version) @ ambari-agent ---
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.8:regex-property (parse-package-release) @ ambari-agent ---
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.8:parse-version (parse-version) @ ambari-agent ---
    [INFO] 
    [INFO] --- build-helper-maven-plugin:1.8:regex-property (regex-property) @ ambari-agent ---
    [INFO] 
    [INFO] --- buildnumber-maven-plugin:1.2:create (default) @ ambari-agent ---
    Downloading: http://download.java.net/maven/2/antlr/antlr/2.7.7/antlr-2.7.7.jar
    Downloaded: http://download.java.net/maven/2/antlr/antlr/2.7.7/antlr-2.7.7.jar (0 B at 0.0 KB/sec)
    [INFO] Checking for local modifications: skipped.
    [INFO] Updating project files from SCM: skipped.
    [INFO] Executing: /bin/sh -c cd /root/zzh/ambari-1.7.0/ambari-agent && git rev-parse --verify HEAD
    [INFO] Working directory: /root/zzh/ambari-1.7.0/ambari-agent
    [INFO] Storing buildNumber: null at timestamp: 1455732001279
    [INFO] Executing: /bin/sh -c cd /root/zzh/ambari-1.7.0/ambari-agent && git rev-parse --verify HEAD
    [INFO] Working directory: /root/zzh/ambari-1.7.0/ambari-agent
    [INFO] Storing buildScmBranch: UNKNOWN_BRANCH
    [INFO] 
    [INFO] --- exec-maven-plugin:1.2:exec (python-test) @ ambari-agent ---
    [INFO] skipping execute as per configuraion
    [INFO] 
    [INFO] --- apache-rat-plugin:0.11:check (default) @ ambari-agent ---
    [INFO] 51 implicit excludes (use -debug for more details).
    [INFO] Exclude: src/examples/*
    [INFO] Exclude: src/test/python/dummy*.txt
    [INFO] Exclude: src/test/python/ambari_agent/dummy_files/*
    [INFO] Exclude: src/test/python/ambari_agent/dummy*.txt
    [INFO] Exclude: src/main/python/ambari_agent/imports.txt
    [INFO] Exclude: **/*.erb
    [INFO] Exclude: **/*.json
    [INFO] Exclude: **/*.pydevproject
    [INFO] 105 resources included (use -debug for more details)
    Warning:  org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
    Compiler warnings:
      WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
    Warning:  org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
    Warning:  org.apache.xerces.parsers.SAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
    Warning:  org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
    [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 105 licence.
    [INFO] 
    [INFO] --- maven-assembly-plugin:2.2-beta-5:single (build-tarball) @ ambari-agent ---
    [INFO] Reading assembly descriptor: src/packages/tarball/all.xml
    [INFO] Copying files to /root/zzh/ambari-1.7.0/ambari-agent/target/ambari-agent-1.7.0.0
    [WARNING] Assembly file: /root/zzh/ambari-1.7.0/ambari-agent/target/ambari-agent-1.7.0.0 is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:copy-resources (copy-resources) @ ambari-agent ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 880 resources
    [INFO] 
    [INFO] --- maven-resources-plugin:2.6:copy-resources (copy-resources-filter) @ ambari-agent ---
    [INFO] Using 'UTF-8' encoding to copy filtered resources.
    [INFO] Copying 1 resource
    [INFO] Copying 1 resource
    [INFO] 
    [INFO] --- maven-assembly-plugin:2.2-beta-5:single (make-assembly) @ ambari-agent ---
    [INFO] Reading assembly descriptor: src/packages/tarball/all.xml
    [INFO] Copying files to /root/zzh/ambari-1.7.0/ambari-agent/target/ambari-agent-1.7.0.0
    [WARNING] Assembly file: /root/zzh/ambari-1.7.0/ambari-agent/target/ambari-agent-1.7.0.0 is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.
    [INFO] 
    [INFO] --- exec-maven-plugin:1.2:exec (python-package) @ ambari-agent ---
    Traceback (most recent call last):
      File "/root/zzh/ambari-1.7.0/ambari-agent/src/main/python/setup.py", line 16, in <module>
        from setuptools import setup
    ImportError: No module named setuptools
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] Ambari Server ..................................... SUCCESS [4:21:03.664s]
    [INFO] Ambari Agent ...................................... FAILURE [13.439s]
    [INFO] Ambari Client ..................................... SKIPPED
    [INFO] Ambari Python Client .............................. SKIPPED
    [INFO] Ambari Groovy Client .............................. SKIPPED
    [INFO] Ambari Shell ...................................... SKIPPED
    [INFO] Ambari Python Shell ............................... SKIPPED
    [INFO] Ambari Groovy Shell ............................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 4:21:19.470s
    [INFO] Finished at: Wed Feb 17 10:00:12 PST 2016
    [INFO] Final Memory: 56M/239M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:exec (python-package) on project ambari-agent: Command execution failed. Process exited with an error: 1(Exit value: 1) -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
    [ERROR] 
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR]   mvn <goals> -rf :ambari-agent
     
    解决办法:可能是网络错误,重新编译就过了
     
    错误7: Could not find artifact org.codehaus.groovy:groovy-all:jar:2.1.8 --- maven有些包下载不下来,需手动下载
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Ambari Groovy Client 1.7.0.0
    [INFO] ------------------------------------------------------------------------
    Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom
    Downloading: http://download.java.net/maven/glassfish/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom
    Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom
    Downloaded: https://maven.atlassian.com/repository/public/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.pom (10 KB at 0.8 KB/sec)
    Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-plugins/24/maven-plugins-24.pom
    Downloading: http://download.java.net/maven/glassfish/org/apache/maven/plugins/maven-plugins/24/maven-plugins-24.pom
    Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/plugins/maven-plugins/24/maven-plugins-24.pom
    Downloaded: https://maven.atlassian.com/repository/public/org/apache/maven/plugins/maven-plugins/24/maven-plugins-24.pom (11 KB at 1.9 KB/sec)
    Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar
    Downloading: http://download.java.net/maven/glassfish/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar
    Downloading: https://maven.atlassian.com/repository/public/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar
    Downloaded: https://maven.atlassian.com/repository/public/org/apache/maven/plugins/maven-compiler-plugin/3.1/maven-compiler-plugin-3.1.jar (42 KB at 14.9 KB/sec)
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom
    Downloading: http://repo.spring.io/milestone/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/slf4j/slf4j-api/1.7.2/slf4j-api-1.7.2.pom
    [WARNING] The POM for org.slf4j:slf4j-api:jar:1.7.2 is missing, no dependency information available
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/slf4j/slf4j-log4j12/1.7.2/slf4j-log4j12-1.7.2.pom
    Downloading: http://repo.spring.io/milestone/org/slf4j/slf4j-log4j12/1.7.2/slf4j-log4j12-1.7.2.pom
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/slf4j/slf4j-log4j12/1.7.2/slf4j-log4j12-1.7.2.pom
    [WARNING] The POM for org.slf4j:slf4j-log4j12:jar:1.7.2 is missing, no dependency information available
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/codehaus/groovy/groovy-all/2.1.8/groovy-all-2.1.8.pom
    Downloading: http://repo.spring.io/milestone/org/codehaus/groovy/groovy-all/2.1.8/groovy-all-2.1.8.pom
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/codehaus/groovy/groovy-all/2.1.8/groovy-all-2.1.8.pom
    [WARNING] The POM for org.codehaus.groovy:groovy-all:jar:2.1.8 is missing, no dependency information available
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom
    Downloading: http://repo.spring.io/milestone/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.pom
    [WARNING] The POM for org.codehaus.groovy.modules.http-builder:http-builder:jar:0.7.1 is missing, no dependency information available
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/easymock/easymock/3.2/easymock-3.2.pom
    Downloading: http://repo.spring.io/milestone/org/easymock/easymock/3.2/easymock-3.2.pom
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/easymock/easymock/3.2/easymock-3.2.pom
    [WARNING] The POM for org.easymock:easymock:jar:3.2 is missing, no dependency information available
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/spockframework/spock-core/0.7-groovy-2.0/spock-core-0.7-groovy-2.0.pom
    Downloading: http://repo.spring.io/milestone/org/spockframework/spock-core/0.7-groovy-2.0/spock-core-0.7-groovy-2.0.pom
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/spockframework/spock-core/0.7-groovy-2.0/spock-core-0.7-groovy-2.0.pom
    [WARNING] The POM for org.spockframework:spock-core:jar:0.7-groovy-2.0 is missing, no dependency information available
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/commons-io/commons-io/2.1/commons-io-2.1.pom
    Downloading: http://repo.spring.io/milestone/commons-io/commons-io/2.1/commons-io-2.1.pom
    Downloading: http://repository.jboss.org/nexus/content/groups/public/commons-io/commons-io/2.1/commons-io-2.1.pom
    [WARNING] The POM for commons-io:commons-io:jar:2.1 is missing, no dependency information available
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.jar
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/easymock/easymock/3.2/easymock-3.2.jar
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/codehaus/groovy/groovy-all/2.1.8/groovy-all-2.1.8.jar
    Downloading: http://download.eclipse.org/rt/eclipselink/maven.repo/org/spockframework/spock-core/0.7-groovy-2.0/spock-core-0.7-groovy-2.0.jar
    Downloading: http://repo.spring.io/milestone/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.jar
    Downloading: http://repo.spring.io/milestone/org/easymock/easymock/3.2/easymock-3.2.jar
    Downloading: http://repo.spring.io/milestone/org/codehaus/groovy/groovy-all/2.1.8/groovy-all-2.1.8.jar
    Downloading: http://repo.spring.io/milestone/org/spockframework/spock-core/0.7-groovy-2.0/spock-core-0.7-groovy-2.0.jar
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/codehaus/groovy/groovy-all/2.1.8/groovy-all-2.1.8.jar
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.jar
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/easymock/easymock/3.2/easymock-3.2.jar
    Downloading: http://repository.jboss.org/nexus/content/groups/public/org/spockframework/spock-core/0.7-groovy-2.0/spock-core-0.7-groovy-2.0.jar
    [INFO] ------------------------------------------------------------------------
    [INFO] Reactor Summary:
    [INFO] 
    [INFO] Ambari Agent ...................................... SUCCESS [33.185s]
    [INFO] Ambari Client ..................................... SUCCESS [2.384s]
    [INFO] Ambari Python Client .............................. SUCCESS [3.655s]
    [INFO] Ambari Groovy Client .............................. FAILURE [1:10.271s]
    [INFO] Ambari Shell ...................................... SKIPPED
    [INFO] Ambari Python Shell ............................... SKIPPED
    [INFO] Ambari Groovy Shell ............................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1:52.395s
    [INFO] Finished at: Thu Feb 18 05:31:14 PST 2016
    [INFO] Final Memory: 16M/40M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project groovy-client: Could not resolve dependencies for project org.apache.ambari:groovy-client:jar:1.7.0.0: The following artifacts could not be resolved: org.codehaus.groovy:groovy-all:jar:2.1.8, org.codehaus.groovy.modules.http-builder:http-builder:jar:0.7.1, org.easymock:easymock:jar:3.2, org.spockframework:spock-core:jar:0.7-groovy-2.0: Could not find artifact org.codehaus.groovy:groovy-all:jar:2.1.8 in EclipseLink (http://download.eclipse.org/rt/eclipselink/maven.repo) -> [Help 1]
    [ERROR] 
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] 
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
    [ERROR] 
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR]   mvn <goals> -rf :groovy-client
     
     
    解决办法:
    从这个网站找到相应包,手动下载
    http://mvnrepository.com/artifact/org.easymock/easymock/3.2
     
    cd /root/.m2/repository/org/codehaus/groovy/groovy-all/2.1.8
    rm groovy-all-2.1.8.* -f
    wget http://central.maven.org/maven2/org/codehaus/groovy/groovy-all/2.1.8/groovy-all-2.1.8.jar
     
    类似的还有其他几个包,也做相同的处理,手动下载:
     
    cd /root/.m2/repository/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1
    rm http-builder-0.7.1.jar* -f
    wget http://central.maven.org/maven2/org/codehaus/groovy/modules/http-builder/http-builder/0.7.1/http-builder-0.7.1.jar
     
     
    cd /root/.m2/repository/org/easymock/easymock/3.2
    rm -f *.jar*
    wget http://central.maven.org/maven2/org/easymock/easymock/3.2/easymock-3.2.jar
     
    cd /root/.m2/repository/org/spockframework/spock-core/0.7-groovy-2.0
    rm -f *.jar*
    wget http://central.maven.org/maven2/org/spockframework/spock-core/0.7-groovy-2.0/spock-core-0.7-groovy-2.0.jar
     
     
  • 相关阅读:
    笔记12:maven项目管理工具
    笔记11:Oracle基础
    笔记10:springMVC
    笔记9:spring
    笔记8:mybatis
    Bad Sequence
    Optimal Currency Exchange
    Two Small Strings
    Equalizing by Division (easy version)&&(hard version)
    Codeforce 1096:D. Easy Problem(DP,思维)
  • 原文地址:https://www.cnblogs.com/zhaohz/p/5221755.html
Copyright © 2011-2022 走看看