歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> 關於Linux >> 【成功】maven編譯 apache falcon0.9源碼_RedHat6.4

【成功】maven編譯 apache falcon0.9源碼_RedHat6.4

日期:2017/3/1 12:08:53   编辑:關於Linux

事前准備

apache falcon源碼 (本次使用的是最新的apache-falcon-0.9-sources.tar.gz)
jdk(1.7/1.8)maven(3.X) apache-maven-3.0.3-bin.tar.gz 【後續提示出錯,換成maven3.1.0】

安裝

JDK

JDK的安裝,此處就不再說明了,很簡單,裝完後記得配置/etc/profile裡JAVA_HOME,完後source一下就OK了,確認如下:
[root@sv004 project]# java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

maven

maven的安裝,本人第一次,也很簡單,解壓,配置MAVEN_BIN,然後使用mvn -v確認是否安裝。效果如下所示:
[root@sv004 apache-maven-3.0.3]# ./bin/mvn -v
Apache Maven 3.0.3 (r1075438; 2011-03-01 02:31:09+0900)
Maven home: /home/project/apache-maven-3.0.3
Java version: 1.7.0_67, vendor: Oracle Corporation
Java home: /usr/java/jdk1.7.0_67/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.el6.x86_64", arch: "amd64", family: "unix"

本次的重點來了

使用maven編譯falcon源碼

1.解壓falcon源碼

tar -xzvf apache-falcon-${project.version}-source.tar.gz
cd falcon-sources-${project.version}

2.編譯falcon

export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m -noverify" && mvn clean install

但此時報錯了

[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/org/apache/apache/17/apache-17.pom
Downloading: https://raw.github.com/InMobi/mvn-repo/master/releases/org/apache/apache/17/apache-17.pom
Downloading: http://repo.hortonworks.com/content/repositories/releases/org/apache/apache/17/apache-17.pom
Downloading: https://repository.apache.org/content/groups/snapshots/org/apache/apache/17/apache-17.pom
Downloading: https://repository.apache.org/content/groups/public/org/apache/apache/17/apache-17.pom
Downloading: https://maven.java.net/content/groups/public/org/apache/apache/17/apache-17.pom
Downloading: https://repository.jboss.org/nexus/content/groups/public/org/apache/apache/17/apache-17.pom
Downloading: https://repository.cloudera.com/artifactory/cloudera-repos/org/apache/apache/17/apache-17.pom
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.apache.falcon:falcon-main:0.9 (/home/project/apache-maven-3.0.3/falcon-sources-0.9/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not transfer artifact org.apache:apache:pom:17 from/to central (http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org and 'parent.relativePath' points at wrong local POM @ line 21, column 13: Unknown host repo1.maven.org -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

原因

根據Unkown host信息調查了一下,應該是代理設置的有問題,我的maven使用的是默認的,沒有設置,坑就被我踩到了。

參考URL:http://stackoverflow.com/questions/15334394/could-not-transfer-artifact-org-apache-maven-pluginsmaven-surefire-pluginpom2/15334627#15334627

解決策

修改我的maven/conf/setting.xml,如下所示:

  
     
      true
      http
      ***.***.***.***  ?代理的IP地址
      8080
      maven
    
  

完後重新執行

export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m -noverify" && mvn clean install
第一次時間比較長,取決你的網速,因為要下載好多依賴包文件。

好事多磨呀.....

Exception while executing SCM command.
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO] 
[INFO] --- maven-remote-resources-plugin:1.5:process (default) @ falcon-ui ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Falcon ..................................... SUCCESS [18:56.122s]
[INFO] Apache Falcon UI .................................. FAILURE [3.810s]
[INFO] Checkstyle ........................................ SKIPPED
[INFO] Build Tools ....................................... SKIPPED
[INFO] Apache Falcon Java client ......................... SKIPPED
[INFO] Apache Falcon CLI client .......................... SKIPPED
[INFO] Apache Falcon Metrics ............................. SKIPPED
[INFO] Apache Falcon Hadoop Dependencies ................. SKIPPED
[INFO] Apache Falcon Test Utility ........................ SKIPPED
[INFO] Apache Falcon Commons ............................. SKIPPED
[INFO] Apache Falcon Oozie EL Extension .................. SKIPPED
[INFO] Apache Falcon Embedded Hadoop - Test Cluster ...... SKIPPED
[INFO] Apache Falcon Sharelib Hive - Test Cluster ........ SKIPPED
[INFO] Apache Falcon Sharelib Pig - Test Cluster ......... SKIPPED
[INFO] Apache Falcon Sharelib Hcatalog - Test Cluster .... SKIPPED
[INFO] Apache Falcon Sharelib Oozie - Test Cluster ....... SKIPPED
[INFO] Apache Falcon Test Tools - Test Cluster ........... SKIPPED
[INFO] Apache Falcon Messaging ........................... SKIPPED
[INFO] Apache Falcon LIfecycle Module .................... SKIPPED
[INFO] Apache Falcon Oozie Adaptor ....................... SKIPPED
[INFO] Apache Falcon Scheduler ........................... SKIPPED
[INFO] Apache Falcon Acquisition ......................... SKIPPED
[INFO] Apache Falcon Distcp Replication .................. SKIPPED
[INFO] Apache Falcon Retention ........................... SKIPPED
[INFO] Apache Falcon Archival ............................ SKIPPED
[INFO] Apache Falcon Rerun ............................... SKIPPED
[INFO] Apache Falcon Prism ............................... SKIPPED
[INFO] falcon-unit ....................................... SKIPPED
[INFO] Apache Falcon Web Application ..................... SKIPPED
[INFO] Apache Falcon Documentation ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19:04.642s
[INFO] Finished at: Thu Apr 14 02:38:36 JST 2016
[INFO] Final Memory: 18M/237M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:install-node-and-npm (install node and npm) on project falcon-ui: The plugin com.github.eirslett:frontend-maven-plugin:0.0.23 requires Maven version 3.1.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/PluginIncompatibleException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :falcon-ui

根據報錯信息來看,maven的版本與下載的插件的版本不一致導致的,根據提示信息,遂決定使用maven3.1.0。

構建好Maven3.1.0的環境後,重新再次編譯falcon源碼,結果悲劇了,install-node-and-npm無法下載.......

[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Falcon ..................................... SUCCESS [2.380s]
[INFO] Apache Falcon UI .................................. FAILURE [1:02.489s]
[INFO] Checkstyle ........................................ SKIPPED
[INFO] Build Tools ....................................... SKIPPED
[INFO] Apache Falcon Java client ......................... SKIPPED
[INFO] Apache Falcon CLI client .......................... SKIPPED
[INFO] Apache Falcon Metrics ............................. SKIPPED
[INFO] Apache Falcon Hadoop Dependencies ................. SKIPPED
[INFO] Apache Falcon Test Utility ........................ SKIPPED
[INFO] Apache Falcon Commons ............................. SKIPPED
[INFO] Apache Falcon Oozie EL Extension .................. SKIPPED
[INFO] Apache Falcon Embedded Hadoop - Test Cluster ...... SKIPPED
[INFO] Apache Falcon Sharelib Hive - Test Cluster ........ SKIPPED
[INFO] Apache Falcon Sharelib Pig - Test Cluster ......... SKIPPED
[INFO] Apache Falcon Sharelib Hcatalog - Test Cluster .... SKIPPED
[INFO] Apache Falcon Sharelib Oozie - Test Cluster ....... SKIPPED
[INFO] Apache Falcon Test Tools - Test Cluster ........... SKIPPED
[INFO] Apache Falcon Messaging ........................... SKIPPED
[INFO] Apache Falcon LIfecycle Module .................... SKIPPED
[INFO] Apache Falcon Oozie Adaptor ....................... SKIPPED
[INFO] Apache Falcon Scheduler ........................... SKIPPED
[INFO] Apache Falcon Acquisition ......................... SKIPPED
[INFO] Apache Falcon Distcp Replication .................. SKIPPED
[INFO] Apache Falcon Retention ........................... SKIPPED
[INFO] Apache Falcon Archival ............................ SKIPPED
[INFO] Apache Falcon Rerun ............................... SKIPPED
[INFO] Apache Falcon Prism ............................... SKIPPED
[INFO] falcon-unit ....................................... SKIPPED
[INFO] Apache Falcon Web Application ..................... SKIPPED
[INFO] Apache Falcon Documentation ....................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:05.883s
[INFO] Finished at: Thu Apr 14 20:57:47 JST 2016
[INFO] Final Memory: 30M/303M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:0.0.23:install-node-and-npm (install node and npm) on project falcon-ui: Could not extract the Node archive: Could not extract archive: '/home/project/apache-maven-3.1.0/falcon-sources-0.9/falcon-ui/node_tmp/node.tar.gz': EOFException -> [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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :falcon-ui

調查了好久,最終來發現,原來是磁盤沒有空間了,剛開始還以為是公司的網速的問題

清空一部分空間出來後,又出幺蛾子了.....

[ERROR] npm WARN package.json [email protected] No repository field.
[ERROR] npm http GET https://registry.npmjs.org/phantomjs
[ERROR] npm http GET https://registry.npmjs.org/protractor
[ERROR] npm http 304 https://registry.npmjs.org/protractor
[ERROR] npm http 304 https://registry.npmjs.org/phantomjs
[ERROR] npm http GET https://registry.npmjs.org/hasha
[ERROR] npm http GET https://registry.npmjs.org/kew
[ERROR] npm http GET https://registry.npmjs.org/progress
[ERROR] npm http GET https://registry.npmjs.org/request
[ERROR] npm http GET https://registry.npmjs.org/request-progress
[ERROR] npm http GET https://registry.npmjs.org/which
[ERROR] npm http GET https://registry.npmjs.org/extract-zip
[ERROR] npm http GET https://registry.npmjs.org/fs-extra
[ERROR] npm http GET https://registry.npmjs.org/request
[ERROR] npm http GET https://registry.npmjs.org/selenium-webdriver/2.44.0
[ERROR] npm http GET https://registry.npmjs.org/minijasminenode/1.1.1
[ERROR] npm http GET https://registry.npmjs.org/jasminewd/1.1.0
[ERROR] npm http GET https://registry.npmjs.org/jasminewd2/0.0.2
[ERROR] npm http GET https://registry.npmjs.org/jasmine/2.1.1
[ERROR] npm http GET https://registry.npmjs.org/saucelabs
[ERROR] npm http GET https://registry.npmjs.org/glob
[ERROR] npm http GET https://registry.npmjs.org/adm-zip/0.4.4
[ERROR] npm http GET https://registry.npmjs.org/optimist
[ERROR] npm http GET https://registry.npmjs.org/q/1.0.0
[ERROR] npm http GET https://registry.npmjs.org/lodash
[ERROR] npm http GET https://registry.npmjs.org/source-map-support
[ERROR] npm http GET https://registry.npmjs.org/html-entities
[ERROR] npm http GET https://registry.npmjs.org/accessibility-developer-tools
[ERROR] npm http 304 https://registry.npmjs.org/request-progress
[ERROR] npm http 304 https://registry.npmjs.org/request
[ERROR] npm http 304 https://registry.npmjs.org/hasha
[ERROR] npm http 304 https://registry.npmjs.org/fs-extra
[ERROR] npm http 304 https://registry.npmjs.org/html-entities
[ERROR] npm http 304 https://registry.npmjs.org/adm-zip/0.4.4
[ERROR] npm http 304 https://registry.npmjs.org/q/1.0.0
[ERROR] npm http 304 https://registry.npmjs.org/selenium-webdriver/2.44.0
[ERROR] npm http GET https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.44.0.tgz
[ERROR] npm http 304 https://registry.npmjs.org/accessibility-developer-tools
[ERROR] npm http 304 https://registry.npmjs.org/progress
[ERROR] npm http 304 https://registry.npmjs.org/jasminewd/1.1.0
[ERROR] npm http 304 https://registry.npmjs.org/request
[ERROR] npm http 304 https://registry.npmjs.org/jasmine/2.1.1
[ERROR] npm http 304 https://registry.npmjs.org/extract-zip
[ERROR] npm http 304 https://registry.npmjs.org/which
[ERROR] npm http 304 https://registry.npmjs.org/source-map-support
[ERROR] npm http 304 https://registry.npmjs.org/jasminewd2/0.0.2
[ERROR] npm http 200 https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-2.44.0.tgz
[ERROR] npm http 304 https://registry.npmjs.org/kew
[ERROR] npm http GET https://registry.npmjs.org/is-stream
[ERROR] npm http GET https://registry.npmjs.org/pinkie-promise
[ERROR] npm http GET https://registry.npmjs.org/mkdirp/0.5.0
[ERROR] npm http GET https://registry.npmjs.org/yauzl/2.4.1
[ERROR] npm http GET https://registry.npmjs.org/concat-stream/1.5.0
[ERROR] npm http GET https://registry.npmjs.org/debug/0.7.4
[ERROR] npm http GET https://registry.npmjs.org/is-absolute
[ERROR] npm http GET https://registry.npmjs.org/isexe
[ERROR] npm http GET https://registry.npmjs.org/throttleit
[ERROR] npm http GET https://registry.npmjs.org/graceful-fs
[ERROR] npm http GET https://registry.npmjs.org/jsonfile
[ERROR] npm http GET https://registry.npmjs.org/klaw
[ERROR] npm http GET https://registry.npmjs.org/path-is-absolute
[ERROR] npm http GET https://registry.npmjs.org/rimraf
[ERROR] npm http GET https://registry.npmjs.org/bl
[ERROR] npm http GET https://registry.npmjs.org/caseless
[ERROR] npm http GET https://registry.npmjs.org/extend
[ERROR] npm http GET https://registry.npmjs.org/forever-agent
[ERROR] npm http GET https://registry.npmjs.org/form-data
[ERROR] npm http GET https://registry.npmjs.org/json-stringify-safe
[ERROR] npm http GET https://registry.npmjs.org/mime-types
[ERROR] npm http GET https://registry.npmjs.org/node-uuid
[ERROR] npm http GET https://registry.npmjs.org/qs
[ERROR] npm http GET https://registry.npmjs.org/tunnel-agent
[ERROR] npm http GET https://registry.npmjs.org/tough-cookie
[ERROR] npm http GET https://registry.npmjs.org/http-signature
[ERROR] npm http GET https://registry.npmjs.org/oauth-sign
[ERROR] npm http GET https://registry.npmjs.org/aws-sign2
[ERROR] npm http GET https://registry.npmjs.org/hawk
[ERROR] npm http GET https://registry.npmjs.org/stringstream
[ERROR] npm http GET https://registry.npmjs.org/combined-stream
[ERROR] npm http GET https://registry.npmjs.org/isstream
[ERROR] npm http GET https://registry.npmjs.org/is-typedarray
[ERROR] npm http GET https://registry.npmjs.org/har-validator
[ERROR] npm http 304 https://registry.npmjs.org/saucelabs
[ERROR] npm http 304 https://registry.npmjs.org/mkdirp/0.5.0
[ERROR] npm http 304 https://registry.npmjs.org/pinkie-promise
[ERROR] npm http 304 https://registry.npmjs.org/is-stream
[ERROR] npm http 304 https://registry.npmjs.org/path-is-absolute
[ERROR] npm http GET https://registry.npmjs.org/pinkie
[ERROR] npm http 304 https://registry.npmjs.org/rimraf
[ERROR] npm http 304 https://registry.npmjs.org/concat-stream/1.5.0
[ERROR] npm http 304 https://registry.npmjs.org/isexe
[ERROR] npm http 304 https://registry.npmjs.org/graceful-fs
[ERROR] npm http 304 https://registry.npmjs.org/klaw
[ERROR] npm http 304 https://registry.npmjs.org/json-stringify-safe
[ERROR] npm http 304 https://registry.npmjs.org/qs
[ERROR] npm http 304 https://registry.npmjs.org/tough-cookie
[ERROR] npm http 304 https://registry.npmjs.org/http-signature
[ERROR] npm http 304 https://registry.npmjs.org/stringstream
[ERROR] npm http 304 https://registry.npmjs.org/isstream
[ERROR] npm http 304 https://registry.npmjs.org/har-validator
[ERROR] npm http 304 https://registry.npmjs.org/yauzl/2.4.1
[ERROR] npm http 304 https://registry.npmjs.org/tunnel-agent
[ERROR] npm http 304 https://registry.npmjs.org/form-data
[ERROR] npm http 304 https://registry.npmjs.org/combined-stream
[ERROR] npm http 304 https://registry.npmjs.org/mime-types
[ERROR] npm http 304 https://registry.npmjs.org/optimist
[ERROR] npm http 304 https://registry.npmjs.org/lodash
[ERROR] npm http 304 https://registry.npmjs.org/is-absolute
[ERROR] npm http GET https://registry.npmjs.org/is-relative
[ERROR] npm http 304 https://registry.npmjs.org/extend
[ERROR] npm http 304 https://registry.npmjs.org/caseless
[ERROR] npm http 304 https://registry.npmjs.org/is-typedarray
[ERROR] npm http 304 https://registry.npmjs.org/node-uuid
[ERROR] npm http 304 https://registry.npmjs.org/debug/0.7.4
[ERROR] npm http GET https://registry.npmjs.org/inherits
[ERROR] npm http GET https://registry.npmjs.org/typedarray
[ERROR] npm http GET https://registry.npmjs.org/readable-stream
[ERROR] npm http GET https://registry.npmjs.org/fd-slicer
[ERROR] npm http GET https://registry.npmjs.org/minimist/0.0.8
[ERROR] npm http 304 https://registry.npmjs.org/forever-agent
[ERROR] npm http 304 https://registry.npmjs.org/oauth-sign
[ERROR] npm http 304 https://registry.npmjs.org/is-relative
[ERROR] npm http 304 https://registry.npmjs.org/inherits
[ERROR] npm http 304 https://registry.npmjs.org/readable-stream
[ERROR] npm http 304 https://registry.npmjs.org/pinkie
[ERROR] npm http 304 https://registry.npmjs.org/glob
[ERROR] npm http 304 https://registry.npmjs.org/bl
[ERROR] npm http 304 https://registry.npmjs.org/hawk
[ERROR] npm http 304 https://registry.npmjs.org/minimist/0.0.8
[ERROR] npm http 304 https://registry.npmjs.org/throttleit
[ERROR] npm http 304 https://registry.npmjs.org/fd-slicer
[ERROR] npm http GET https://registry.npmjs.org/pend
[ERROR] npm http 304 https://registry.npmjs.org/pend
[ERROR] npm http 304 https://registry.npmjs.org/aws-sign2
[ERROR] npm WARN engine [email protected]: wanted: {"node":">=0.10.32"} (current: {"node":"v0.10.30","npm":"1.4.3"})
[ERROR] npm http GET https://registry.npmjs.org/delayed-stream
[ERROR] npm http GET https://registry.npmjs.org/mime-db
[ERROR] npm http GET https://registry.npmjs.org/async
[ERROR] npm http GET https://registry.npmjs.org/assert-plus
[ERROR] npm http GET https://registry.npmjs.org/jsprim
[ERROR] npm http GET https://registry.npmjs.org/sshpk
[ERROR] npm http GET https://registry.npmjs.org/chalk
[ERROR] npm http GET https://registry.npmjs.org/commander
[ERROR] npm http GET https://registry.npmjs.org/is-my-json-valid
[ERROR] npm http GET https://registry.npmjs.org/core-util-is
[ERROR] npm http GET https://registry.npmjs.org/isarray
[ERROR] npm http GET https://registry.npmjs.org/process-nextick-args
[ERROR] npm http GET https://registry.npmjs.org/string_decoder
[ERROR] npm http GET https://registry.npmjs.org/util-deprecate
[ERROR] npm http GET https://registry.npmjs.org/hoek
[ERROR] npm http GET https://registry.npmjs.org/boom
[ERROR] npm http GET https://registry.npmjs.org/cryptiles
[ERROR] npm http GET https://registry.npmjs.org/sntp
[ERROR] npm http 304 https://registry.npmjs.org/mime-db
[ERROR] npm http 304 https://registry.npmjs.org/delayed-stream
[ERROR] npm http 304 https://registry.npmjs.org/process-nextick-args
[ERROR] npm http 304 https://registry.npmjs.org/util-deprecate
[ERROR] npm http 304 https://registry.npmjs.org/assert-plus
[ERROR] npm http 304 https://registry.npmjs.org/hoek
[ERROR] npm http 304 https://registry.npmjs.org/is-my-json-valid
[ERROR] npm http 304 https://registry.npmjs.org/sshpk
[ERROR] npm http 304 https://registry.npmjs.org/core-util-is
[ERROR] npm http 200 https://registry.npmjs.org/isarray
[ERROR] npm http 304 https://registry.npmjs.org/chalk
[ERROR] npm http 304 https://registry.npmjs.org/cryptiles
[ERROR] npm http 304 https://registry.npmjs.org/boom
[ERROR] npm http 304 https://registry.npmjs.org/typedarray
[ERROR] npm http 304 https://registry.npmjs.org/sntp
[ERROR] npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.30","npm":"1.4.3"})
[ERROR] npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.30","npm":"1.4.3"})
[ERROR] npm WARN engine [email protected]: wanted: {"node":">=0.10.40"} (current: {"node":"v0.10.30","npm":"1.4.3"})
[ERROR] npm http 304 https://registry.npmjs.org/jsprim
[ERROR] npm http GET https://registry.npmjs.org/extsprintf/1.0.2
[ERROR] npm http GET https://registry.npmjs.org/json-schema/0.2.2
[ERROR] npm http GET https://registry.npmjs.org/verror/1.3.6
[ERROR] npm http 200 https://registry.npmjs.org/commander
[ERROR] npm http 200 https://registry.npmjs.org/async
[ERROR] npm http GET https://registry.npmjs.org/ansi-styles
[ERROR] npm http GET https://registry.npmjs.org/escape-string-regexp
[ERROR] npm http GET https://registry.npmjs.org/has-ansi
[ERROR] npm http GET https://registry.npmjs.org/strip-ansi
[ERROR] npm http GET https://registry.npmjs.org/supports-color
[ERROR] npm http GET https://registry.npmjs.org/graceful-readlink
[ERROR] npm http GET https://registry.npmjs.org/asn1
[ERROR] npm http GET https://registry.npmjs.org/dashdash
[ERROR] npm http GET https://registry.npmjs.org/jsbn
[ERROR] npm http GET https://registry.npmjs.org/tweetnacl
[ERROR] npm http GET https://registry.npmjs.org/jodid25519
[ERROR] npm http GET https://registry.npmjs.org/ecc-jsbn
[ERROR] npm http GET https://registry.npmjs.org/generate-function
[ERROR] npm http GET https://registry.npmjs.org/generate-object-property
[ERROR] npm http GET https://registry.npmjs.org/jsonpointer/2.0.0
[ERROR] npm http GET https://registry.npmjs.org/xtend
[ERROR] npm http 200 https://registry.npmjs.org/string_decoder
[ERROR] npm http 304 https://registry.npmjs.org/jsonfile
[ERROR] npm http GET https://registry.npmjs.org/glob
[ERROR] npm http 304 https://registry.npmjs.org/json-schema/0.2.2
[ERROR] npm http 304 https://registry.npmjs.org/supports-color
[ERROR] npm http 304 https://registry.npmjs.org/jodid25519
[ERROR] npm http 304 https://registry.npmjs.org/tweetnacl
[ERROR] npm http 304 https://registry.npmjs.org/jsbn
[ERROR] npm http 304 https://registry.npmjs.org/ansi-styles
[ERROR] npm http 304 https://registry.npmjs.org/asn1
[ERROR] npm http 304 https://registry.npmjs.org/dashdash
[ERROR] npm http 304 https://registry.npmjs.org/generate-object-property
[ERROR] npm http 304 https://registry.npmjs.org/strip-ansi
[ERROR] npm http 304 https://registry.npmjs.org/verror/1.3.6
[ERROR] npm http 304 https://registry.npmjs.org/ecc-jsbn
[ERROR] npm http 304 https://registry.npmjs.org/jsonpointer/2.0.0
[ERROR] npm http 304 https://registry.npmjs.org/graceful-readlink
[ERROR] npm http 304 https://registry.npmjs.org/generate-function
[ERROR] npm http 304 https://registry.npmjs.org/glob
[ERROR] npm http GET https://registry.npmjs.org/inflight
[ERROR] npm http GET https://registry.npmjs.org/inherits
[ERROR] npm http GET https://registry.npmjs.org/minimatch
[ERROR] npm http GET https://registry.npmjs.org/once
[ERROR] npm http 304 https://registry.npmjs.org/once
[ERROR] npm http 304 https://registry.npmjs.org/inherits
[ERROR] npm http 304 https://registry.npmjs.org/minimatch
[ERROR] npm http 304 https://registry.npmjs.org/has-ansi
[ERROR] npm http 304 https://registry.npmjs.org/xtend
[ERROR] npm http GET https://registry.npmjs.org/is-property
[ERROR] npm http 200 https://registry.npmjs.org/inflight
[ERROR] npm http GET https://registry.npmjs.org/wrappy
[ERROR] npm http GET https://registry.npmjs.org/brace-expansion
[ERROR] npm http 304 https://registry.npmjs.org/escape-string-regexp
[ERROR] npm http GET https://registry.npmjs.org/ansi-regex
[ERROR] npm http 304 https://registry.npmjs.org/ansi-regex
[ERROR] npm http 304 https://registry.npmjs.org/brace-expansion
[ERROR] npm http GET https://registry.npmjs.org/balanced-match
[ERROR] npm http GET https://registry.npmjs.org/concat-map/0.0.1
[ERROR] npm http 304 https://registry.npmjs.org/is-property
[ERROR] npm http 200 https://registry.npmjs.org/balanced-match
[ERROR] npm http 304 https://registry.npmjs.org/concat-map/0.0.1
[ERROR] npm http 200 https://registry.npmjs.org/wrappy
[ERROR] npm http GET https://registry.npmjs.org/minijasminenode/1.1.1
[ERROR] npm http 304 https://registry.npmjs.org/minijasminenode/1.1.1
[ERROR] npm http GET https://registry.npmjs.org/extsprintf/1.0.2
[ERROR] npm http 304 https://registry.npmjs.org/extsprintf/1.0.2

還有一個額外的信息:Exception while executing SCM command.

最後在英文網站上找到了一個解決策,但原因是什麼,沒有明白。

Find the lines that read:

org.codehaus.mojo
buildnumber-maven-plugin
1.0

and remove them. 

但,新的問題又出現了,打出的堆棧信息如下所示....

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (BUILD-OOZIE) on project build-tools: Command execution failed. Process exited with an error: 6 (Exit value: 6) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (BUILD-OOZIE) on project build-tools: Command execution failed.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:318)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
Caused by: org.apache.maven.plugin.MojoExecutionException: Command execution failed.
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:362)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 19 more
Caused by: org.apache.commons.exec.ExecuteException: Process exited with an error: 6 (Exit value: 6)
        at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:377)
        at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:160)
        at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:610)
        at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:352)
        ... 21 more
[ERROR] 
[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  -rf :build-tools

根據上面的提示信息,找到一個對應的帖子:

http://mail-archives.apache.org/mod_mbox/falcon-dev/201402.mbox/%[email protected]%3E

https://issues.apache.org/jira/browse/FALCON-291

看著是Falcon的一個降級BUG,發郵件詢問Falcon社區的負責人,一天過去了,沒有回信。

自己動手去琢磨,falcon0.4作入的BUG,0.9的話,應該是已經被修正了,估計是自己這邊的環境有問題,再繼續折騰吧,找到解決策後再繼續追加。

@2016-4-15 15:32

全局使用maven編譯的時候,一直報錯

Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (BUILD-OOZIE)

但具體是哪有問題,即使使用mvn clean install -X打印出詳細的堆棧信息,對於不清楚源碼的人來說,還是沒有什麼實質性的幫助。遂決定單獨去編譯build-tool模塊。

單獨編譯build-tool時,出錯信息就詳細多了,且很有價值的信息。具體如下所示:

[INFO] --- exec-maven-plugin:1.2.1:exec (BUILD-OOZIE) @ build-tools ---
oozie version 
Using maven from  /home/project/apache-maven-3.1.0/bin/mvn
+ VERSION=4.1.0
+ BUILD_VERSION=4.1.0-falcon
+ FORCE_BUILD=false
+ echo 'oozie version '
+ '[' -z /home/project/apache-maven-3.1.0 ']'
+ export MVN_CMD=/home/project/apache-maven-3.1.0/bin/mvn
+ MVN_CMD=/home/project/apache-maven-3.1.0/bin/mvn
+ echo 'Using maven from ' /home/project/apache-maven-3.1.0/bin/mvn
+ [[ false == \f\a\l\s\e ]]
++ cut '-d>' -f2
++ cut '-d<' -f1
++ grep localRepository
++ /home/project/apache-maven-3.1.0/bin/mvn help:effective-settings
+ [[ -f /root/.m2/repository/org/apache/oozie/oozie-webapp/4.1.0-falcon/oozie-webapp-4.1.0-falcon.war ]]
+ PKG_URL=http://archive.apache.org/dist/oozie/4.1.0/oozie-4.1.0.tar.gz
+ PKG=oozie-4.1.0
+ mkdir -p ../target
+ pushd ../target
/home/project/apache-maven-3.1.0/falcon-sources-0.9/target /home/project/apache-maven-3.1.0/falcon-sources-0.9/build-tools
+ rm -rf 'oozie-*'
+ curl -v http://archive.apache.org/dist/oozie/4.1.0/oozie-4.1.0.tar.gz -o oozie-4.1.0.tgz
* getaddrinfo(3) failed for archive.apache.org:80
* Couldn't resolve host 'archive.apache.org'
* Closing connection #0

curl: (6) Couldn't resolve host 'archive.apache.org'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.362s
[INFO] Finished at: Sat Apr 16 00:51:40 JST 2016
[INFO] Final Memory: 10M/239M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (BUILD-OOZIE) on project build-tools: Command execution failed. Process exited with an error: 6 (Exit value: 6) -> [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

看到上面黑體加錯的那三行,就知道是什麼原因造成build-tool一直無法編譯了。

getaddrinfo(3)出錯導致的。

繼續解析,發現是自己的虛擬機沒有配DNS,或者說,沒有在虛擬機中設置代理。可悲的是,下班後坐在車上才想通了,原來只需要在UI界面設置一下代理,就可以下載這個http://archive.apache.org/dist/oozie/4.1.0/oozie-4.1.0.tar.gz文件了。可惜,下班之前沒有搞定,只能下周一接著去確認了。

@2016/04/18

今天到公司後,配好虛擬機的代理。能上網,但就是ping不通www.baidu.com。主機這邊也是ping不通www.baidu.com。猜測應該是整個公司將DNS的解析給屏蔽掉了。再次執行mvn clean install,還是出問題,但在vmware下執行的時候,之前的錯誤就沒發生,這會一直處於關聯文件下載中,對公司的網速表示呵呵了。但沒報錯就是好事了....

新的問題又出現了,在build testcase的時候出錯了。。。

Tests run: 41, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.763 sec - in org.apache.falcon.workflow.WorkflowExecutionContextTest
Running org.apache.falcon.update.UpdateHelperTest
Tests run: 5, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 3.421 sec <<< FAILURE! - in org.apache.falcon.update.UpdateHelperTest
testIsEntityACLUpdated(org.apache.falcon.update.UpdateHelperTest)  Time elapsed: 0.397 sec  <<< FAILURE!
org.apache.hadoop.fs.ParentNotDirectoryException: Parent path is not a directory: /home/project/apache-maven-3.3.9/falcon-sources-0.9/common/target/falcon/tmp-hadoop-root/jail-fs/testCluster/projects/falcon/staging/falcon/workflows/process/sample
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:418)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:432)
        at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:281)
        at org.apache.falcon.hadoop.JailedFileSystem.mkdirs(JailedFileSystem.java:152)
        at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1815)
        at org.apache.falcon.update.UpdateHelperTest.prepare(UpdateHelperTest.java:90)
        at org.apache.falcon.update.UpdateHelperTest.testIsEntityACLUpdated(UpdateHelperTest.java:262)

testIsEntityLateProcessUpdated(org.apache.falcon.update.UpdateHelperTest)  Time elapsed: 0.068 sec  <<< FAILURE!
org.apache.hadoop.fs.ParentNotDirectoryException: Parent path is not a directory: /home/project/apache-maven-3.3.9/falcon-sources-0.9/common/target/falcon/tmp-hadoop-root/jail-fs/testCluster/projects/falcon/staging/falcon/workflows/process/sample
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:418)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:432)
        at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:281)
        at org.apache.falcon.hadoop.JailedFileSystem.mkdirs(JailedFileSystem.java:152)
        at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1815)
        at org.apache.falcon.update.UpdateHelperTest.prepare(UpdateHelperTest.java:90)
        at org.apache.falcon.update.UpdateHelperTest.testIsEntityLateProcessUpdated(UpdateHelperTest.java:280)

testIsEntityUpdated(org.apache.falcon.update.UpdateHelperTest)  Time elapsed: 0.209 sec  <<< FAILURE!
org.apache.hadoop.fs.ParentNotDirectoryException: Parent path is not a directory: /home/project/apache-maven-3.3.9/falcon-sources-0.9/common/target/falcon/tmp-hadoop-root/jail-fs/testCluster/projects/falcon/staging/falcon/workflows/process/sample
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:418)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:432)
        at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:281)
        at org.apache.falcon.hadoop.JailedFileSystem.mkdirs(JailedFileSystem.java:152)
        at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1815)
        at org.apache.falcon.update.UpdateHelperTest.prepare(UpdateHelperTest.java:90)
        at org.apache.falcon.update.UpdateHelperTest.testIsEntityUpdated(UpdateHelperTest.java:117)

testShouldUpdateAffectedEntities(org.apache.falcon.update.UpdateHelperTest)  Time elapsed: 0.052 sec  <<< FAILURE!
org.apache.hadoop.fs.ParentNotDirectoryException: Parent path is not a directory: /home/project/apache-maven-3.3.9/falcon-sources-0.9/common/target/falcon/tmp-hadoop-root/jail-fs/testCluster/projects/falcon/staging/falcon/workflows/process/sample
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:418)
        at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:432)
        at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:281)
        at org.apache.falcon.hadoop.JailedFileSystem.mkdirs(JailedFileSystem.java:152)
        at org.apache.hadoop.fs.FileSystem.mkdirs(FileSystem.java:1815)
        at org.apache.falcon.update.UpdateHelperTest.prepare(UpdateHelperTest.java:90)
        at org.apache.falcon.update.UpdateHelperTest.testShouldUpdateAffectedEntities(UpdateHelperTest.java:157)

Running org.apache.falcon.metadata.MetadataMappingServiceTest
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.512 sec - in org.apache.falcon.metadata.MetadataMappingServiceTest
Running org.apache.falcon.security.AuthenticationInitializationServiceTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.027 sec - in org.apache.falcon.security.AuthenticationInitializationServiceTest
Running org.apache.falcon.security.DefaultAuthorizationProviderTest
Tests run: 34, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.884 sec - in org.apache.falcon.security.DefaultAuthorizationProviderTest
Running org.apache.falcon.security.CurrentUserTest
Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.062 sec - in org.apache.falcon.security.CurrentUserTest
Running org.apache.falcon.security.SecurityUtilTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.202 sec - in org.apache.falcon.security.SecurityUtilTest
Running org.apache.falcon.cleanup.LogCleanupServiceTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.601 sec - in org.apache.falcon.cleanup.LogCleanupServiceTest
Running org.apache.falcon.util.RadixTreeTest
Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.894 sec - in org.apache.falcon.util.RadixTreeTest
Running org.apache.falcon.util.ApplicationPropertiesTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.514 sec - in org.apache.falcon.util.ApplicationPropertiesTest
Running org.apache.falcon.util.RadixNodeTest
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.432 sec - in org.apache.falcon.util.RadixNodeTest
Running org.apache.falcon.util.ReflectionUtilsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.133 sec - in org.apache.falcon.util.ReflectionUtilsTest
Running org.apache.falcon.expression.ExpressionHelperTest
Tests run: 23, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.458 sec - in org.apache.falcon.expression.ExpressionHelperTest
Running org.apache.falcon.group.FeedGroupMapTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.25 sec - in org.apache.falcon.group.FeedGroupMapTest

Results :

Failed tests: 
  UpdateHelperTest.testIsEntityACLUpdated:262->prepare:90 » ParentNotDirectory P...
  UpdateHelperTest.testIsEntityLateProcessUpdated:280->prepare:90 » ParentNotDirectory
  UpdateHelperTest.testIsEntityUpdated:117->prepare:90 » ParentNotDirectory Pare...
  UpdateHelperTest.testShouldUpdateAffectedEntities:157->prepare:90 » ParentNotDirectory

Tests run: 575, Failures: 4, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Falcon ...................................... SUCCESS [  2.882 s]
[INFO] Apache Falcon UI ................................... SUCCESS [  7.223 s]
[INFO] Checkstyle ......................................... SUCCESS [  0.470 s]
[INFO] Build Tools ........................................ SUCCESS [  4.177 s]
[INFO] Apache Falcon Java client .......................... SUCCESS [ 12.203 s]
[INFO] Apache Falcon CLI client ........................... SUCCESS [  3.790 s]
[INFO] Apache Falcon Metrics .............................. SUCCESS [  4.277 s]
[INFO] Apache Falcon Hadoop Dependencies .................. SUCCESS [  1.939 s]
[INFO] Apache Falcon Test Utility ......................... SUCCESS [  3.077 s]
[INFO] Apache Falcon Commons .............................. FAILURE [01:44 min]
[INFO] Apache Falcon Oozie EL Extension ................... SKIPPED
[INFO] Apache Falcon Embedded Hadoop - Test Cluster ....... SKIPPED
[INFO] Apache Falcon Sharelib Hive - Test Cluster ......... SKIPPED
[INFO] Apache Falcon Sharelib Pig - Test Cluster .......... SKIPPED
[INFO] Apache Falcon Sharelib Hcatalog - Test Cluster ..... SKIPPED
[INFO] Apache Falcon Sharelib Oozie - Test Cluster ........ SKIPPED
[INFO] Apache Falcon Test Tools - Test Cluster ............ SKIPPED
[INFO] Apache Falcon Messaging ............................ SKIPPED
[INFO] Apache Falcon LIfecycle Module ..................... SKIPPED
[INFO] Apache Falcon Oozie Adaptor ........................ SKIPPED
[INFO] Apache Falcon Scheduler ............................ SKIPPED
[INFO] Apache Falcon Acquisition .......................... SKIPPED
[INFO] Apache Falcon Distcp Replication ................... SKIPPED
[INFO] Apache Falcon Retention ............................ SKIPPED
[INFO] Apache Falcon Archival ............................. SKIPPED
[INFO] Apache Falcon Rerun ................................ SKIPPED
[INFO] Apache Falcon Prism ................................ SKIPPED
[INFO] falcon-unit ........................................ SKIPPED
[INFO] Apache Falcon Web Application ...................... SKIPPED
[INFO] Apache Falcon Documentation ........................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:25 min
[INFO] Finished at: 2016-04-18T22:29:01+09:00
[INFO] Final Memory: 154M/567M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.16:test (default-test) on project falcon-common: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/project/apache-maven-3.3.9/falcon-sources-0.9/common/target/surefire-reports for the individual test results.
[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/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :falcon-common

因為本次編譯的重點是falcon源碼,至於自帶的測試項,對後續的使用是沒有用處的,換句話說,編譯測試項,只是進一步證明了而已,為了,解決方案是跳過它。

解決命令:

export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=256m -noverify" && mvn clean install -Dhadoop.version=2.5.2 -DskipTests
再次執行,編譯又可以繼續了,又是不停的下載關聯的文件的模式了......

但,還是看到了希望

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Falcon ...................................... SUCCESS [  3.030 s]
[INFO] Apache Falcon UI ................................... SUCCESS [  7.757 s]
[INFO] Checkstyle ......................................... SUCCESS [  0.504 s]
[INFO] Build Tools ........................................ SUCCESS [  4.186 s]
[INFO] Apache Falcon Java client .......................... SUCCESS [ 10.193 s]
[INFO] Apache Falcon CLI client ........................... SUCCESS [  3.747 s]
[INFO] Apache Falcon Metrics .............................. SUCCESS [  3.663 s]
[INFO] Apache Falcon Hadoop Dependencies .................. SUCCESS [  1.945 s]
[INFO] Apache Falcon Test Utility ......................... SUCCESS [  2.465 s]
[INFO] Apache Falcon Commons .............................. SUCCESS [  9.517 s]
[INFO] Apache Falcon Oozie EL Extension ................... SUCCESS [  5.234 s]
[INFO] Apache Falcon Embedded Hadoop - Test Cluster ....... SUCCESS [07:07 min]
[INFO] Apache Falcon Sharelib Hive - Test Cluster ......... SUCCESS [  8.564 s]
[INFO] Apache Falcon Sharelib Pig - Test Cluster .......... SUCCESS [01:01 min]
[INFO] Apache Falcon Sharelib Hcatalog - Test Cluster ..... SUCCESS [  0.826 s]
[INFO] Apache Falcon Sharelib Oozie - Test Cluster ........ SUCCESS [  0.093 s]
[INFO] Apache Falcon Test Tools - Test Cluster ............ SUCCESS [  0.049 s]
[INFO] Apache Falcon Messaging ............................ SUCCESS [  2.779 s]
[INFO] Apache Falcon LIfecycle Module ..................... SUCCESS [01:25 min]
[INFO] Apache Falcon Oozie Adaptor ........................ SUCCESS [  7.485 s]
[INFO] Apache Falcon Scheduler ............................ SUCCESS [02:04 min]
[INFO] Apache Falcon Acquisition .......................... SUCCESS [  0.251 s]
[INFO] Apache Falcon Distcp Replication ................... SUCCESS [  1.719 s]
[INFO] Apache Falcon Retention ............................ SUCCESS [  1.805 s]
[INFO] Apache Falcon Archival ............................. SUCCESS [  0.243 s]
[INFO] Apache Falcon Rerun ................................ SUCCESS [  3.625 s]
[INFO] Apache Falcon Prism ................................ SUCCESS [09:49 min]
[INFO] falcon-unit ........................................ SUCCESS [  5.552 s]
[INFO] Apache Falcon Web Application ...................... SUCCESS [02:45 min]
[INFO] Apache Falcon Documentation ........................ FAILURE [ 11.370 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25:50 min
[INFO] Finished at: 2016-04-18T22:56:18+09:00
[INFO] Final Memory: 252M/868M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.4:site (default) on project falcon-docs: SiteToolException: The site descriptor cannot be resolved from the repository: ArtifactResolutionException: Unable to locate site descriptor: Could not transfer artifact org.apache:apache:xml:site_en:17 from/to java.net-Public (https://maven.java.net/content/groups/public/): Failed to transfer file: https://maven.java.net/content/groups/public/org/apache/apache/17/apache-17-site_en.xml. Return code is: 503 , ReasonPhrase:Service Unavailable.
[ERROR] org.apache:apache:xml:17
[ERROR] 
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo1.maven.org/maven2, releases=true, snapshots=false),
[ERROR] im (https://raw.github.com/InMobi/mvn-repo/master/releases, releases=true, snapshots=false),
[ERROR] hortonworks.repo (http://repo.hortonworks.com/content/repositories/releases, releases=true, snapshots=false),
[ERROR] apache.snapshots.repo (https://repository.apache.org/content/groups/snapshots, releases=true, snapshots=true),
[ERROR] default (https://repository.apache.org/content/groups/public/, releases=true, snapshots=true),
[ERROR] java.net-Public (https://maven.java.net/content/groups/public/, releases=true, snapshots=true),
[ERROR] repository.jboss.org-public (https://repository.jboss.org/nexus/content/groups/public, releases=true, snapshots=true),
[ERROR] cdh.repo (https://repository.cloudera.com/artifactory/cloudera-repos/, releases=true, snapshots=false),
[ERROR] apache.snapshots (http://repository.apache.org/snapshots, releases=false, snapshots=true)
[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
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn  -rf :falcon-docs
[INFO] Shutdown hook executing
[INFO] Shutdown hook complete
Shutting down hive metastore.

根據這報錯信息,以及這麼久折騰falcon的經驗來看,應該還是網速的原因,在timeout時間內沒有找到對應的服務器導致了,果斷的重新來過一次,果然,這次編譯過了,效果如下所示:
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Falcon ...................................... SUCCESS [  2.613 s]
[INFO] Apache Falcon UI ................................... SUCCESS [  7.466 s]
[INFO] Checkstyle ......................................... SUCCESS [  0.414 s]
[INFO] Build Tools ........................................ SUCCESS [  4.255 s]
[INFO] Apache Falcon Java client .......................... SUCCESS [ 10.174 s]
[INFO] Apache Falcon CLI client ........................... SUCCESS [  3.492 s]
[INFO] Apache Falcon Metrics .............................. SUCCESS [  3.342 s]
[INFO] Apache Falcon Hadoop Dependencies .................. SUCCESS [  1.973 s]
[INFO] Apache Falcon Test Utility ......................... SUCCESS [  2.497 s]
[INFO] Apache Falcon Commons .............................. SUCCESS [  8.428 s]
[INFO] Apache Falcon Oozie EL Extension ................... SUCCESS [  2.378 s]
[INFO] Apache Falcon Embedded Hadoop - Test Cluster ....... SUCCESS [ 26.021 s]
[INFO] Apache Falcon Sharelib Hive - Test Cluster ......... SUCCESS [  3.103 s]
[INFO] Apache Falcon Sharelib Pig - Test Cluster .......... SUCCESS [  0.378 s]
[INFO] Apache Falcon Sharelib Hcatalog - Test Cluster ..... SUCCESS [  0.677 s]
[INFO] Apache Falcon Sharelib Oozie - Test Cluster ........ SUCCESS [  0.097 s]
[INFO] Apache Falcon Test Tools - Test Cluster ............ SUCCESS [  0.042 s]
[INFO] Apache Falcon Messaging ............................ SUCCESS [  2.377 s]
[INFO] Apache Falcon LIfecycle Module ..................... SUCCESS [ 11.402 s]
[INFO] Apache Falcon Oozie Adaptor ........................ SUCCESS [  6.631 s]
[INFO] Apache Falcon Scheduler ............................ SUCCESS [  6.307 s]
[INFO] Apache Falcon Acquisition .......................... SUCCESS [  0.280 s]
[INFO] Apache Falcon Distcp Replication ................... SUCCESS [  1.735 s]
[INFO] Apache Falcon Retention ............................ SUCCESS [  1.936 s]
[INFO] Apache Falcon Archival ............................. SUCCESS [  0.277 s]
[INFO] Apache Falcon Rerun ................................ SUCCESS [  4.892 s]
[INFO] Apache Falcon Prism ................................ SUCCESS [ 37.770 s]
[INFO] falcon-unit ........................................ SUCCESS [  6.706 s]
[INFO] Apache Falcon Web Application ...................... SUCCESS [01:09 min]
[INFO] Apache Falcon Documentation ........................ SUCCESS [ 25.824 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:14 min
[INFO] Finished at: 2016-04-18T23:03:24+09:00
[INFO] Final Memory: 141M/739M
[INFO] ------------------------------------------------------------------------
[INFO] Shutdown hook executing
[INFO] Shutdown hook complete
Shutting down hive metastore.

至此,apache falcon的源碼終於編譯成功了。

部署嵌入式模式:

命令:

mvn clean assembly:assembly -DskipTests -DskipITs

效果:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Falcon ...................................... SUCCESS [03:40 min]
[INFO] Apache Falcon UI ................................... SUCCESS [  0.008 s]
[INFO] Checkstyle ......................................... SUCCESS [  0.002 s]
[INFO] Build Tools ........................................ SUCCESS [  0.004 s]
[INFO] Apache Falcon Java client .......................... SUCCESS [  0.033 s]
[INFO] Apache Falcon CLI client ........................... SUCCESS [  0.007 s]
[INFO] Apache Falcon Metrics .............................. SUCCESS [  0.007 s]
[INFO] Apache Falcon Hadoop Dependencies .................. SUCCESS [  0.017 s]
[INFO] Apache Falcon Test Utility ......................... SUCCESS [  0.004 s]
[INFO] Apache Falcon Commons .............................. SUCCESS [  0.024 s]
[INFO] Apache Falcon Oozie EL Extension ................... SUCCESS [  0.006 s]
[INFO] Apache Falcon Embedded Hadoop - Test Cluster ....... SUCCESS [  0.092 s]
[INFO] Apache Falcon Sharelib Hive - Test Cluster ......... SUCCESS [  0.004 s]
[INFO] Apache Falcon Sharelib Pig - Test Cluster .......... SUCCESS [  0.004 s]
[INFO] Apache Falcon Sharelib Hcatalog - Test Cluster ..... SUCCESS [  0.004 s]
[INFO] Apache Falcon Sharelib Oozie - Test Cluster ........ SUCCESS [  0.003 s]
[INFO] Apache Falcon Test Tools - Test Cluster ............ SUCCESS [  0.003 s]
[INFO] Apache Falcon Messaging ............................ SUCCESS [  0.006 s]
[INFO] Apache Falcon LIfecycle Module ..................... SUCCESS [  0.020 s]
[INFO] Apache Falcon Oozie Adaptor ........................ SUCCESS [  0.020 s]
[INFO] Apache Falcon Scheduler ............................ SUCCESS [  0.049 s]
[INFO] Apache Falcon Acquisition .......................... SUCCESS [  0.004 s]
[INFO] Apache Falcon Distcp Replication ................... SUCCESS [  0.005 s]
[INFO] Apache Falcon Retention ............................ SUCCESS [  0.004 s]
[INFO] Apache Falcon Archival ............................. SUCCESS [  0.004 s]
[INFO] Apache Falcon Rerun ................................ SUCCESS [  0.006 s]
[INFO] Apache Falcon Prism ................................ SUCCESS [  0.118 s]
[INFO] falcon-unit ........................................ SUCCESS [  0.007 s]
[INFO] Apache Falcon Web Application ...................... SUCCESS [  0.245 s]
[INFO] Apache Falcon Documentation ........................ SUCCESS [  0.008 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:43 min
[INFO] Finished at: 2016-04-18T23:13:40+09:00
[INFO] Final Memory: 603M/882M
[INFO] ------------------------------------------------------------------------ 

解壓apache-falcon-${project.version}-bin.tar.gz

文件tree:

|- bin
   |- falcon
   |- falcon-start
   |- falcon-stop
   |- falcon-config.sh
   |- service-start.sh
   |- service-stop.sh
|- conf
   |- startup.properties
   |- runtime.properties
   |- client.properties
   |- log4j.xml
   |- falcon-env.sh
|- docs
|- client
   |- lib (client support libs)
|- server
   |- webapp
      |- falcon.war
|- hadooplibs
|- README
|- NOTICE.txt
|- LICENSE.txt
|- DISCLAIMER.txt
|- CHANGES.txt

位置:{project dir}/target/apache-falcon-${project.version}-bin.tar.gz

* tar -xzvf apache-falcon-${project.version}-bin.tar.gz
* cd falcon-${project.version}

啟動falcon:

bin/falcon-start

Hadoop home is set, adding libraries from '/home/project/hadoop-2.5.2/bin/hadoop classpath' into falcon classpath
/home/project/apache-maven-3.3.9/falcon-sources-0.9/target/falcon-0.9
falcon started using hadoop version:  Hadoop 2.5.2

注意點:
falcon.url=https://localhost:15443/

firfox或者chorme或者IE9以上登錄,追加認證後就可以顯示falcon的畫面了。

感觸:

1.本次的搭建環境從頭到尾,制約因素最大的就是網速了

2.虛擬機的DNS和代理沒有配置,導致開始building時沒有准確的定位到。以為設置了maven的代理,應該就沒事了。

3.沒有善用-x參數,在解析maven.apche.org的時候,不知所措。

Copyright © Linux教程網 All Rights Reserved