将之后的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
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