xywuyiba8 发表于 2017-2-28 12:20:19

Ambari 1.7 源码编译笔记

环境CentOS 6.5
1.安装jdk
# 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
# rpm -ivh jdk-7u79-linux-x64.rpm
环境变量 :
# 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

# tar -zxvf apache-maven-3.0.5-bin.tar.gz -C /opt
# cd /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
# yum install rpm-build

5.安装gcc-c++
  # rpm -qa | grep gcc-c++
  # yum install gcc-c++
  

6.安装 nodejs
# wget http://nodejs.org/dist/v0.10.26/node-v0.10.26-linux-x64.tar.gz
# tar -zxvf node-v0.10.26-linux-x64.tar.gz -C /opt
# cd /opt

# ln -s node-v0.10.26-linux-x64 node

环境变量:


# vi /etc/profile
NODE_HOME=/opt/node
PATH=$PATH:NODE_HOME/bin
# source /etc/profile


检查
# node -v
v0.10.26
# npm -v
1.4.3

7.安装brunch
# 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.1, growl@1.8.1, date-utils@1.2.18)
├── anysort@1.0.1 (anymatch@1.3.0)
└── pushserve@0.1.6 (connect-slashes@0.0.11, express@3.3.8)


8.安装setuptools
# wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-12.0.3.tar.gz#md5=f07e4b0f4c1c9368fcd980d888b29a65
# tar -zxvf setuptools-12.0.3.tar.gz
# cd setuptools-12.0.3
# python setup.py install

8.获取ambari1.7.0源码并编译

# wget https://github.com/apache/ambari/archive/release-1.7.0.zip

# unzip release-1.7.0

# cd ambari-release-1.7.0/

# mvn versions:set -DnewVersion=1.7.0.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: --版本不匹配




--- build-helper-maven-plugin:1.8:regex-property (parse-package-version) @ ambari ---
No match to regex '^(+)\.(+)\.(+)(\.|-).*' found in '1.7.0'. The initial value '1.7.0' is left as-is...

--- build-helper-maven-plugin:1.8:regex-property (parse-package-release) @ ambari ---
------------------------------------------------------------------------
Reactor Summary:

Ambari Main ....................................... FAILURE
Apache Ambari Project POM ......................... SKIPPED
Ambari Web ........................................ SKIPPED
Ambari Views ...................................... SKIPPED
Ambari Admin View ................................. SKIPPED
Ambari Server ..................................... SKIPPED
Ambari Agent ...................................... SKIPPED
Ambari Client ..................................... SKIPPED
Ambari Python Client .............................. SKIPPED
Ambari Groovy Client .............................. SKIPPED
Ambari Shell ...................................... SKIPPED
Ambari Python Shell ............................... SKIPPED
Ambari Groovy Shell ............................... SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 3.846s
Finished at: Fri Jan 29 06:57:20 PST 2016
Final Memory: 8M/19M
------------------------------------------------------------------------
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 '^(+)\.(+)\.(+)(\.|-)((+)|(SNAPSHOT)).*' found in '1.7.0'. ->

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


解决办法:
之前将1.7.0.0手误写成1.7.0导致,改成-DnewVersion=1.7.0.0即可
当然,也可以修改pom.xml代码:
# vi pom.xml

搜索“SNAPSHOT“,定位到111行: <regex>^(+)\.(+)\.(+)(\.|-)((+)|(SNAPSHOT)).*</regex>

将之后的113行改为: <failIfNoMatch>false</failIfNoMatch>

# mvn -B clean install package rpm:rpm -DnewVersion=1.7.0 -DskipTests -Dpython.ver="python>= 2.6"

9. 错误2:安装过程中发现phantomjs无法下载--需手动安装phantomjs

    > phantomjs@1.9.19 install /root/zzh/ambari-1.7.0/ambari-web/node_modules/phantomjs
    > node install.js
   
   
   
    PhantomJS not found on PATH
    Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
    Saving to /root/zzh/ambari-1.7.0/ambari-web/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
    Receiving...
   
   
    Error making request.
    Error: read ECONNRESET
      at errnoException (net.js:904:11)
      at TCP.onread (net.js:558:19)
      ..........................................................

INFO] ------------------------------------------------------------------------
Reactor Summary:

Ambari Web ........................................ FAILURE
Ambari Views ...................................... SKIPPED
Ambari Admin View ................................. SKIPPED
Ambari Server ..................................... SKIPPED
Ambari Agent ...................................... SKIPPED
Ambari Client ..................................... SKIPPED
Ambari Python Client .............................. SKIPPED
Ambari Groovy Client .............................. SKIPPED
Ambari Shell ...................................... SKIPPED
Ambari Python Shell ............................... SKIPPED
Ambari Groovy Shell ............................... SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 12:00.978s
Finished at: Fri Jan 29 07:50:00 PST 2016
Final Memory: 8M/19M
------------------------------------------------------------------------
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
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
->

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


解决办法:
手动安装对应版本的phantomjs
# wget http://npm.taobao.org/mirrors/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2

# vi /etc/profile
PHANTOMJS_HOME=/opt/phantomjs
PATH=$PATH:$PHANTOMJS_HOME/bin
# source /etc/profile
# mvn -B clean install package rpm:rpm -DnewVersion=1.7.0.0 -DskipTests -Dpython.ver="python>= 2.6" -rf ambari-web



错误3:安装过程中发现还是有错误,切换taobao的npm源:

# npm config get registry
npm config set registryhttps://registry.npmjs.org/
# npm config set registry https://registry.npm.taobao.org # npm info underscore (如果上面配置正确这个命令会有字符串response)

错误4:gyp: /root/.node-gyp/0.10.26/common.gypi not found

   
    > 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
    > node-gyp rebuild
   
    npm http GET https://registry.npm.taobao.org/brace-expansion
    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
    gyp ERR! configure error
    gyp ERR! stack Error: `gyp` failed with exit code: 1
    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)
    gyp ERR! stack   at ChildProcess.EventEmitter.emit (events.js:98:17)
    gyp ERR! stack   at Process.ChildProcess._handle.onexit (child_process.js:797:12)
    gyp ERR! System Linux 2.6.32-431.el6.x86_64
    gyp ERR! command "node" "/opt/node-v0.10.26-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /root/zzh/ambari-1.7.0/ambari-web/node_modules/karma-ember-precompiler-brunch/node_modules/jsdom/node_modules/contextify
    gyp ERR! node -v v0.10.26
    gyp ERR! node-gyp -v v0.12.2
    gyp ERR! not ok

解决办法:

# rm ~/.node-gyp/ -rf
# mvn -B clean install package rpm:rpm -DnewVersion=1.7.0.0 -DskipTests -Dpython.ver="python>= 2.6" -rf ambari-web

错误5. 依赖项错误
------------------------------------------------------------------------
Reactor Summary:

Ambari Main ....................................... SUCCESS
Apache Ambari Project POM ......................... SUCCESS
Ambari Web ........................................ SUCCESS
Ambari Views ...................................... SUCCESS
Ambari Admin View ................................. SUCCESS
Ambari Server ..................................... FAILURE
Ambari Agent ...................................... SKIPPED
Ambari Client ..................................... SKIPPED
Ambari Python Client .............................. SKIPPED
Ambari Groovy Client .............................. SKIPPED
Ambari Shell ...................................... SKIPPED
Ambari Python Shell ............................... SKIPPED
Ambari Groovy Shell ............................... SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 21:29.129s
Finished at: Wed Feb 17 04:52:34 PST 2016
Final Memory: 31M/76M
------------------------------------------------------------------------
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 : 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 ->

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

After correcting the problems, you can resume the build with the command
   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>

使用下面命令继续:

# 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]                                                                        
------------------------------------------------------------------------
Building Ambari Agent 1.7.0.0
------------------------------------------------------------------------

--- maven-clean-plugin:2.5:clean (default-clean) @ ambari-agent ---
Deleting /root/zzh/ambari-1.7.0/ambari-agent (includes = [**/*.pyc], excludes = [])

--- build-helper-maven-plugin:1.8:regex-property (parse-package-version) @ ambari-agent ---

--- build-helper-maven-plugin:1.8:regex-property (parse-package-release) @ ambari-agent ---

--- build-helper-maven-plugin:1.8:parse-version (parse-version) @ ambari-agent ---

--- build-helper-maven-plugin:1.8:regex-property (regex-property) @ ambari-agent ---

--- 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)
Checking for local modifications: skipped.
Updating project files from SCM: skipped.
Executing: /bin/sh -c cd /root/zzh/ambari-1.7.0/ambari-agent && git rev-parse --verify HEAD
Working directory: /root/zzh/ambari-1.7.0/ambari-agent
Storing buildNumber: null at timestamp: 1455732001279
Executing: /bin/sh -c cd /root/zzh/ambari-1.7.0/ambari-agent && git rev-parse --verify HEAD
Working directory: /root/zzh/ambari-1.7.0/ambari-agent
Storing buildScmBranch: UNKNOWN_BRANCH

--- exec-maven-plugin:1.2:exec (python-test) @ ambari-agent ---
skipping execute as per configuraion

--- apache-rat-plugin:0.11:check (default) @ ambari-agent ---
51 implicit excludes (use -debug for more details).
Exclude: src/examples/*
Exclude: src/test/python/dummy*.txt
Exclude: src/test/python/ambari_agent/dummy_files/*
Exclude: src/test/python/ambari_agent/dummy*.txt
Exclude: src/main/python/ambari_agent/imports.txt
Exclude: **/*.erb
Exclude: **/*.json
Exclude: **/*.pydevproject
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.
Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 approved: 105 licence.

--- maven-assembly-plugin:2.2-beta-5:single (build-tarball) @ ambari-agent ---
Reading assembly descriptor: src/packages/tarball/all.xml
Copying files to /root/zzh/ambari-1.7.0/ambari-agent/target/ambari-agent-1.7.0.0
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.

--- maven-resources-plugin:2.6:copy-resources (copy-resources) @ ambari-agent ---
Using 'UTF-8' encoding to copy filtered resources.
Copying 880 resources

--- maven-resources-plugin:2.6:copy-resources (copy-resources-filter) @ ambari-agent ---
Using 'UTF-8' encoding to copy filtered resources.
Copying 1 resource
Copying 1 resource

--- maven-assembly-plugin:2.2-beta-5:single (make-assembly) @ ambari-agent ---
Reading assembly descriptor: src/packages/tarball/all.xml
Copying files to /root/zzh/ambari-1.7.0/ambari-agent/target/ambari-agent-1.7.0.0
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.

--- 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
------------------------------------------------------------------------
Reactor Summary:

Ambari Server ..................................... SUCCESS
Ambari Agent ...................................... FAILURE
Ambari Client ..................................... SKIPPED
Ambari Python Client .............................. SKIPPED
Ambari Groovy Client .............................. SKIPPED
Ambari Shell ...................................... SKIPPED
Ambari Python Shell ............................... SKIPPED
Ambari Groovy Shell ............................... SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 4:21:19.470s
Finished at: Wed Feb 17 10:00:12 PST 2016
Final Memory: 56M/239M
------------------------------------------------------------------------
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) ->

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

After correcting the problems, you can resume the build with the command
   mvn <goals> -rf :ambari-agent


解决办法:可能是网络错误,重新编译就过了


错误7: Could not find artifact org.codehaus.groovy:groovy-all:jar:2.1.8 --- maven有些包下载不下来,需手动下载

------------------------------------------------------------------------
Building Ambari Groovy Client 1.7.0.0

------------------------------------------------------------------------
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
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
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
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
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
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
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
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
------------------------------------------------------------------------
Reactor Summary:

Ambari Agent ...................................... SUCCESS
Ambari Client ..................................... SUCCESS
Ambari Python Client .............................. SUCCESS
Ambari Groovy Client .............................. FAILURE
Ambari Shell ...................................... SKIPPED
Ambari Python Shell ............................... SKIPPED
Ambari Groovy Shell ............................... SKIPPED
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1:52.395s
Finished at: Thu Feb 18 05:31:14 PST 2016
Final Memory: 16M/40M
------------------------------------------------------------------------
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) ->

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

After correcting the problems, you can resume the build with the command
   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
页: [1]
查看完整版本: Ambari 1.7 源码编译笔记